1개 입력, 프롬프트 기반 다중 스타일
이미지 1장을 업로드하면 15초 이내에 Grok Imagine Quality로 12가지 스타일 변형 이미지를 생성합니다.
정보
이 ComfyUI 튜토리얼은 프롬프트 기반 편집으로 단일 이미지를 12가지 서로 다른 스타일 갤러리로 만드는 방법을 보여줍니다. 워크플로는 단순하고 빠릅니다. LoadImage가 원본을 가져오면, 이미지가 12개의 GrokImageEditNodeV2 인스턴스로 분기되며(각각 다른 스타일 프롬프트와 Grok Imagine Quality 엔진 사용), 각 결과는 SaveImage 노드로 디스크에 저장됩니다. 결과물은 탐색, A/B 테스트, 또는 클라이언트에게 옵션을 제시하기 위한 빠른 스타일 보드로 적합합니다.
기술적으로 그래프는 동일한 입력 이미지를 병렬 브랜치로 복제합니다. 각 GrokImageEditNodeV2는 원본의 핵심 콘텐츠와 구도를 유지하면서, 사용자가 제공한 스타일 지시(예: “수채화 스케치”, “사이버펑크 네온”, “스튜디오 인물 보정”)를 적용합니다. SaveImage 노드는 파일 이름과 출력 경로를 처리해 모든 변형이 개별 저장되도록 합니다. 각 브랜치는 독립적이므로 ComfyUI가 작업을 효율적으로 스케줄링할 수 있고, Grok Imagine Quality 모델은 빠르고 일관된 편집에 최적화되어 한 번 실행으로 12개 변형을 생성하는 데 실용적입니다.
제공할 항목
- 워크플로 읽는 중
ComfyUI에서 실행됩니다. 이 워크플로는 이 페이지에서 실행할 수 없습니다. 모든 항목이 로드된 Comfy Cloud에서 열거나, 자체 ComfyUI에서 사용하려면 다운로드하세요.
Cloud에서 사용해 보기워크플로 내부
노드 그래프의 읽기 전용 미리보기입니다. 노드를 편집하려면 Comfy Cloud에서 열거나 다운로드하세요.
Loading the graph
Open full-size workflow preview- 작성자
- Rob
사용자 지정 노드 필요
- 워크플로 읽는 중
코드에서 이 워크플로 사용하기
가능한 경우 워크플로 그래프와 입력을 기반으로 생성되며, 그렇지 않은 경우 저장된 예시가 표시됩니다. 비용이 발생할 수 있으므로 코드를 실행하기 전에 자격 증명과 엔드포인트를 검토하세요.
What you need
- Runs on
- Comfy Cloud
- 키
- COMFY_API_KEY
- 내 파일
- 코드가 해당 URL에서 업로드
유료 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({
"1": {
"class_type": "LoadImage",
"inputs": {
"image": "UPLOADED_image_FILENAME"
},
"_meta": {
"title": "Load Image"
}
},
"4": {
"class_type": "GrokImageEditNodeV2",
"inputs": {
"model": "grok-imagine-image-quality",
"model.aspect_ratio": "auto",
"model.images.image_1": [
"1",
0
],
"model.number_of_images": 1,
"model.resolution": "1K",
"prompt": "Change the style into 3d animation, maintain character and background identity",
"seed": 923725119
},
"_meta": {
"title": "Grok Image Edit"
}
},
"5": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-3d",
"images": [
"4",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"6": {
"class_type": "GrokImageEditNodeV2",
"inputs": {
"model": "grok-imagine-image-quality",
"model.aspect_ratio": "auto",
"model.images.image_1": [
"1",
0
],
"model.number_of_images": 1,
"model.resolution": "1K",
"prompt": "Change the style into claymation, maintain character and background identity",
"seed": 626651379
},
"_meta": {
"title": "Grok Image Edit"
}
},
"7": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-claymation",
"images": [
"6",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"10": {
"class_type": "GrokImageEditNodeV2",
"inputs": {
"model": "grok-imagine-image-quality",
"model.aspect_ratio": "auto",
"model.images.image_1": [
"1",
0
],
"model.number_of_images": 1,
"model.resolution": "1K",
"prompt": "Change the style into hyper realistic, maintain character and background identity",
"seed": 778259071
},
"_meta": {
"title": "Grok Image Edit"
}
},
"11": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-realistic",
"images": [
"10",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"12": {
"class_type": "GrokImageEditNodeV2",
"inputs": {
"model": "grok-imagine-image-quality",
"model.aspect_ratio": "auto",
"model.images.image_1": [
"1",
0
],
"model.number_of_images": 1,
"model.resolution": "1K",
"prompt": "Change the style into cross stitch, maintain character and background identity",
"seed": 1315151478
},
"_meta": {
"title": "Grok Image Edit"
}
},
"13": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-cross_stitch",
"images": [
"12",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"14": {
"class_type": "GrokImageEditNodeV2",
"inputs": {
"model": "grok-imagine-image-quality",
"model.aspect_ratio": "auto",
"model.images.image_1": [
"1",
0
],
"model.number_of_images": 1,
"model.resolution": "1K",
"prompt": "Change the style into oil painting with visible brushstrokes, maintain character and background identity",
"seed": 2089487176
},
"_meta": {
"title": "Grok Image Edit"
}
},
"15": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-oil_painting",
"images": [
"14",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"16": {
"class_type": "GrokImageEditNodeV2",
"inputs": {
"model": "grok-imagine-image-quality",
"model.aspect_ratio": "auto",
"model.images.image_1": [
"1",
0
],
"model.number_of_images": 1,
"model.resolution": "1K",
"prompt": "Change the style into detailed colored pencil, maintain character and background identity",
"seed": 1783897462
},
"_meta": {
"title": "Grok Image Edit"
}
},
"17": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-colored_pencil",
"images": [
"16",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"18": {
"class_type": "GrokImageEditNodeV2",
"inputs": {
"model": "grok-imagine-image-quality",
"model.aspect_ratio": "auto",
"model.images.image_1": [
"1",
0
],
"model.number_of_images": 1,
"model.resolution": "1K",
"prompt": "Change the style into flat vector illustration, maintain character and background identity",
"seed": 2035280383
},
"_meta": {
"title": "Grok Image Edit"
}
},
"19": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-vector",
"images": [
"18",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"20": {
"class_type": "GrokImageEditNodeV2",
"inputs": {
"model": "grok-imagine-image-quality",
"model.aspect_ratio": "auto",
"model.images.image_1": [
"1",
0
],
"model.number_of_images": 1,
"model.resolution": "1K",
"prompt": "Change the style into reflective metal sculpture, maintain character and background identity",
"seed": 1158415507
},
"_meta": {
"title": "Grok Image Edit"
}
},
"21": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-metal",
"images": [
"20",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"22": {
"class_type": "GrokImageEditNodeV2",
"inputs": {
"model": "grok-imagine-image-quality",
"model.aspect_ratio": "auto",
"model.images.image_1": [
"1",
0
],
"model.number_of_images": 1,
"model.resolution": "1K",
"prompt": "Change the style into charcoal sketch, maintain character and background identity",
"seed": 635577419
},
"_meta": {
"title": "Grok Image Edit"
}
},
"23": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-charcoal",
"images": [
"22",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"24": {
"class_type": "GrokImageEditNodeV2",
"inputs": {
"model": "grok-imagine-image-quality",
"model.aspect_ratio": "auto",
"model.images.image_1": [
"1",
0
],
"model.number_of_images": 1,
"model.resolution": "1K",
"prompt": "Change the style into lineart, maintain character and background identity",
"seed": 280525599
},
"_meta": {
"title": "Grok Image Edit"
}
},
"25": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-lineart",
"images": [
"24",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"26": {
"class_type": "GrokImageEditNodeV2",
"inputs": {
"model": "grok-imagine-image-quality",
"model.aspect_ratio": "auto",
"model.images.image_1": [
"1",
0
],
"model.number_of_images": 1,
"model.resolution": "1K",
"prompt": "Change the style into watercolor, maintain character and background identity",
"seed": 1050327575
},
"_meta": {
"title": "Grok Image Edit"
}
},
"27": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-watercolor",
"images": [
"26",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"45": {
"class_type": "GrokImageEditNodeV2",
"inputs": {
"model": "grok-imagine-image-quality",
"model.aspect_ratio": "auto",
"model.images.image_1": [
"1",
0
],
"model.number_of_images": 1,
"model.resolution": "1K",
"prompt": "Change the style into pixel art, maintain character and background identity",
"seed": 2140144728
},
"_meta": {
"title": "Grok Image Edit"
}
},
"46": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-pixel_art",
"images": [
"45",
0
]
},
"_meta": {
"title": "Save Image"
}
}
})
# Replace each example.com URL with a public URL of your file.
workflow.set_input("1", "image", client.assets.from_url("https://example.com/replace-with-a-url/image"))
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)질문과 답변
GrokImageEditNodeV2 → SaveImage 브랜치를 복제하거나 삭제하세요. 각 브랜치가 하나의 스타일 프롬프트에 해당합니다. 파일명 접두어를 다르게 해 덮어쓰기를 방지하세요.
외부 Grok 서비스를 사용하는 GrokImageEditNodeV2라면 노드나 설정에서 인증 정보를 입력해야 할 수 있습니다. 노드 문서나 UI에서 필요한 키 또는 엔드포인트를 확인하세요.
프롬프트에서 더 강하거나 약한 표현을 사용하세요(예: "은은한 필름 그레인" vs. "강한 그레인, 고대비"). 노드에 strength 등 강도 조절이 있다면 낮추면 부드럽게, 높이면 강하게 변형됩니다.
겹치는 스타일 용어가 비슷한 결과를 유도할 수 있습니다. 프롬프트를 더 차별화하고, 동일한 기본 설명어 반복을 피하며, 시드를 다르게 해보세요. 입력 이미지에서 피사체/배경이 명확히 구분되면 차별화에 도움이 됩니다.