사진을 만화 스타일 캐리커처로 변환
This workflow is as simple as uploading your picture and selecting one of 15 preset cartoon styles to transform it into.
정보
This ComfyUI workflow turns a regular photo into a cartoon-style caricature using one of 15 preset looks. It starts with LoadImage for your source photo, passes your style choice from a CustomCombo dropdown, extracts the matching preset parameters via JsonExtractString, and assembles any required identifiers with StringConcatenate. The core stylization happens in a custom processing node (UUID d4c06663-cb1a-4a41-a36b-f09c93e55e7e), which takes the source image plus the selected style key and outputs a single stylized frame.
You can inspect results live with PreviewAny and save the final image via SaveImage.
Under the hood, the preset system keeps results consistent and repeatable across images. The JSON-driven mapping decouples the user-friendly style names from the actual configuration values the processing node expects, making it easy to swap styles without touching low-level settings. Because the heavy lifting is encapsulated inside the d4c06663-cb1a-4a41-a36b-f09c93e55e7e node, the graph stays simple and fast to use—no additional model loading or sampler tuning required.
제공할 항목
- 워크플로 읽는 중
ComfyUI에서 실행됩니다. 이 워크플로는 이 페이지에서 실행할 수 없습니다. 모든 항목이 로드된 Comfy Cloud에서 열거나, 자체 ComfyUI에서 사용하려면 다운로드하세요.
Cloud에서 사용해 보기워크플로 내부
노드 그래프의 읽기 전용 미리보기입니다. 노드를 편집하려면 Comfy Cloud에서 열거나 다운로드하세요.
Loading the graph
Open full-size workflow preview코드에서 이 워크플로 사용하기
가능한 경우 워크플로 그래프와 입력을 기반으로 생성되며, 그렇지 않은 경우 저장된 예시가 표시됩니다. 비용이 발생할 수 있으므로 코드를 실행하기 전에 자격 증명과 엔드포인트를 검토하세요.
What you need
- Runs on
- Comfy Cloud
- 키
- COMFY_API_KEY
유료 Cloud 요금제와 크레딧이 필요합니다.
# Python 3.10+: pip install comfy-sdk==0.4.0
import os
from comfy_sdk import Comfy
api_key = os.environ.get("COMFY_API_KEY", "").strip()
if not api_key: raise RuntimeError("Set COMFY_API_KEY")
os.environ.setdefault("COMFY_BASE_URL", "https://cloud.comfy.org")
client = Comfy(api_key=api_key)
workflow = client.workflows.from_json({
"132": {
"class_type": "LoadImage",
"inputs": {
"image": "f91bccebcc07a40d5c61625f96084268613a1845ca64f9472c54e37d7a1733db.png"
},
"_meta": {
"title": "Load Image"
}
},
"197": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "Qwen_Edit_2511",
"images": [
"196:175",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"234": {
"class_type": "StringConcatenate",
"inputs": {
"delimiter": " ",
"string_a": "Keep the exact same composition, camera framing, crop, pose, character outfit, background, environment, perspective, and lighting as the original photo.",
"string_b": [
"240",
0
]
},
"_meta": {
"title": "Assemble Prompt"
}
},
"235": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"234",
0
]
},
"_meta": {
"title": "Preview as Text"
}
},
"239": {
"class_type": "CustomCombo",
"inputs": {
"choice": "Classic Caricature"
},
"_meta": {
"title": "Cartoon Style"
}
},
"240": {
"class_type": "JsonExtractString",
"inputs": {
"json_string": "{\n \"Classic Caricature\": \"Transform the attached photo into a caricature portrait in the tradition of classic literary and editorial caricature illustration \\u2014 enlarge the head slightly and perch it on a smaller, elongated body. Preserve the subject's true likeness and identity while wittily exaggerating their most distinctive features.\",\n \"Sunday Comics\": \"Transform the attached photo into a vintage Sunday newspaper comic-strip caricature: bold confident ink outlines, flat saturated colors over visible Ben-Day halftone dots, slight newsprint texture and off-register color charm, cheerful panel-ready energy, slightly oversized head on a compact body. Preserve the subject's true likeness and identity while wittily exaggerating their most distinctive features.\",\n \"Watercolor Sketch\": \"Transform the attached photo into a loose watercolor caricature sketch: soft pencil underdrawing with expressive, flowing watercolor washes, gentle color bleeds, and airy unpainted paper showing through. Slightly enlarged head with delicate, painterly features. Preserve the subject's true likeness and identity while wittily exaggerating their most distinctive features.\",\n \"Street Fair Caricature\": \"Transform the attached photo into a lively caricature done in bold marker and quick airbrush: a big expressive grin, huge head on a tiny dynamic body, spontaneous drawn-while-you-wait energy. Preserve the subject's true likeness and identity while wittily exaggerating their most distinctive features.\",\n \"Rubber-Hose\": \"Transform the attached photo into a rubber-hose cartoon: rubberhose animation style, exaggerated stringy limb length, white gloves, thick bouncy outlines, soft film grain and gleeful old-timey charm. Preserve the subject's true likeness and identity while wittily exaggerating their most distinctive features.\",\n \"Anime Chibi\": \"Transform the attached photo into a chibi anime caricature: super-deformed proportions with an oversized head and tiny body, huge expressive sparkling eyes, simplified button nose, clean cel-shaded line art. Preserve the subject's true likeness and identity while wittily exaggerating their most distinctive features.\",\n \"Vinyl Collectible\": \"Transform the attached photo into a glossy 3D collectible vinyl-toy caricature figure: smooth sculpted surfaces, oversized head on a small stylized body, soft studio lighting with clean reflections, premium designer-toy finish. Preserve the subject's true likeness and identity while wittily exaggerating their most distinctive features.\",\n \"Oil Painting Satire\": \"Transform the attached photo into an 18th-century oil painting caricature: rich visible brushwork, warm old-master palette, theatrical chiaroscuro lighting, varnished gallery finish, subtly exaggerated proportions in the grand satirical portrait tradition. Preserve the subject's true likeness and identity while wittily exaggerating their most distinctive features.\",\n \"Inflatable Balloon\": \"Transform the attached photo into a shiny inflatable balloon caricature: taut glossy balloon-vinyl skin, softly over-inflated puffy cheeks and limbs, visible welded seams and a small inflation valve, squeaky rubber highlights, buoyant parade-float presence. Preserve the subject's true likeness and identity while wittily exaggerating their most distinctive features.\",\n \"Claymation\": \"Transform the attached photo into a hand-sculpted claymation caricature: matte plasticine surface with visible thumbprints and sculpting-tool marks, slightly lumpy hand-modeled shapes, big expressive sculpted brow and smile, stop-motion charm. Preserve the subject's true likeness and identity while wittily exaggerating their most distinctive features.\",\n \"Paper Cutout\": \"Transform the attached photo into a layered paper-cutout collage caricature: flat construction-paper shapes with torn and scissor-cut edges, visible drop shadows between paper layers, slightly wobbly hand-cut lines, bold flat colors. Preserve the subject's true likeness and identity while wittily exaggerating their most distinctive features.\",\n \"Pixel Sprite\": \"Transform the attached photo into a retro 16-bit pixel-art sprite caricature: chunky visible pixels, limited vibrant color palette, crisp dithered shading, oversized head sprite proportions. Preserve the subject's true likeness and identity while wittily exaggerating their most distinctive features.\",\n \"Bobblehead\": \"Transform the attached photo into a plastic exaggerated extremely large bobblehead figurine caricature: oversized wobbling head on a small neck and rigid body, hand-painted finish with subtle brush marks, collectible desk-toy presence. Preserve the subject's true likeness and identity while wittily exaggerating their most distinctive features.\",\n \"Neon Airbrush\": \"Transform the attached photo into a 90s neon airbrush caricature: vivid fluorescent airbrushed gradients over deep black shading, glowing neon rim light, confident freehand spray strokes, retro boardwalk T-shirt art energy. Preserve the subject's true likeness and identity while wittily exaggerating their most distinctive features.\"\n}",
"key": [
"239",
0
]
},
"_meta": {
"title": "Style Prompt (JSON)"
}
},
"196:152": {
"class_type": "CFGNorm",
"inputs": {
"model": [
"196:155",
0
],
"pre_cfg": False,
"strength": 1
},
"_meta": {
"title": "CFGNorm"
}
},
"196:155": {
"class_type": "ModelSamplingAuraFlow",
"inputs": {
"model": [
"196:166",
0
],
"sampling": "flow",
"shift": 3.1
},
"_meta": {
"title": "ModelSamplingAuraFlow"
}
},
"196:156": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "qwen_image_vae.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"196:161": {
"class_type": "TextEncodeQwenImageEditPlus",
"inputs": {
"clip": [
"196:167",
0
],
"image1": [
"196:176",
0
],
"prompt": [
"235",
0
],
"vae": [
"196:156",
0
]
},
"_meta": {
"title": "TextEncodeQwenImageEditPlus (Positive)"
}
},
"196:162": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "Qwen-Image-Edit-2511-Lightning-4steps-V1.0-bf16.safetensors",
"model": [
"196:152",
0
],
"strength_model": 1
},
"_meta": {
"title": "Load LoRA"
}
},
"196:163": {
"class_type": "PrimitiveFloat",
"inputs": {
"value": 4
},
"_meta": {
"title": "CFG"
}
},
"196:164": {
"class_type": "PrimitiveFloat",
"inputs": {
"value": 1
},
"_meta": {
"title": "CFG"
}
},
"196:165": {
"class_type": "VAEEncode",
"inputs": {
"pixels": [
"196:176",
0
],
"vae": [
"196:156",
0
]
},
"_meta": {
"title": "VAE Encode"
}
},
"196:166": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "qwen_image_edit_2511_bf16.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"196:167": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "qwen_2.5_vl_7b_fp8_scaled.safetensors",
"device": "default",
"type": "qwen_image"
},
"_meta": {
"title": "Load CLIP"
}
},
"196:168": {
"class_type": "ComfySwitchNode",
"inputs": {
"on_false": [
"196:152",
0
],
"on_true": [
"196:162",
0
],
"switch": [
"196:171",
0
]
},
"_meta": {
"title": "Switch (Model)"
}
},
"196:169": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 6
},
"_meta": {
"title": "Steps"
}
},
"196:170": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 30
},
"_meta": {
"title": "Steps"
}
},
"196:171": {
"class_type": "PrimitiveBoolean",
"inputs": {
"value": True
},
"_meta": {
"title": "Enable 4steps LoRA?"
}
},
"196:172": {
"class_type": "ComfySwitchNode",
"inputs": {
"on_false": [
"196:163",
0
],
"on_true": [
"196:164",
0
],
"switch": [
"196:171",
0
]
},
"_meta": {
"title": "Switch (CFG)"
}
},
"196:173": {
"class_type": "ComfySwitchNode",
"inputs": {
"on_false": [
"196:170",
0
],
"on_true": [
"196:169",
0
],
"switch": [
"196:171",
0
]
},
"_meta": {
"title": "Switch (Steps)"
}
},
"196:174": {
"class_type": "KSampler",
"inputs": {
"cfg": [
"196:172",
0
],
"denoise": 1,
"latent_image": [
"196:165",
0
],
"model": [
"196:168",
0
],
"negative": [
"196:229",
0
],
"positive": [
"196:161",
0
],
"sampler_name": "euler",
"scheduler": "simple",
"seed": 1029537144521435,
"steps": [
"196:173",
0
]
},
"_meta": {
"title": "KSampler"
}
},
"196:175": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"196:174",
0
],
"vae": [
"196:156",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"196:176": {
"class_type": "FluxKontextImageScale",
"inputs": {
"image": [
"132",
0
]
},
"_meta": {
"title": "FluxKontextImageScale"
}
},
"196:229": {
"class_type": "TextEncodeQwenImageEditPlus",
"inputs": {
"clip": [
"196:167",
0
],
"image1": [
"196:176",
0
],
"prompt": "",
"vae": [
"196:156",
0
]
},
"_meta": {
"title": "Text Encode Qwen Image Edit Plus"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)질문과 답변
처리 노드(d4c06663-cb1a-4a41-a36b-f09c93e55e7e)가 추가 스타일 키를 인식한다면 프리셋을 확장할 수 있습니다. JsonExtractString에 입력되는 JSON 프리셋을 수정하고 CustomCombo에 새 옵션을 추가하세요. 노드가 새 키를 지원하지 않으면 기본값으로 처리되거나 실패할 수 있습니다.
커스텀 처리 노드 구현 방식에 따라 다릅니다. 대부분의 스타일 변환 노드는 GPU에서 훨씬 빠르게 동작하지만, 일부 빌드는 CPU에서도 느리게 실행될 수 있습니다.
짧은 변 기준 512~1024픽셀의 인물 사진이 선명한 라인과 색상을 만듭니다. 얼굴과 어깨 위주로 크롭하고, 고른 조명과 흔들림 없는 사진을 사용하세요.
이 그래프는 LoadImage를 통한 단일 이미지 입력에 초점을 둡니다. 일괄 처리가 필요하다면 브랜치를 복제하거나 배치 지원 로더 노드를 교체해 동일한 CustomCombo/JSON 프리셋 매핑을 처리 노드에 연결하세요.