Qwen-Image InstantX ControlNet
Qwen-Image InstantX ControlNet으로 이미지를 생성하며, canny, 소프트 엣지, 깊이, 포즈를 지원합니다
정보
Qwen-Image InstantX Union ControlNet 워크플로는 고급 ControlNet 기능을 갖춘 Qwen-Image 모델을 사용해 고품질 이미지를 생성하도록 설계되었습니다. 이 워크플로는 canny 에지 감지, 소프트 에지, 깊이, 포즈 추정 같은 여러 컨트롤 기법을 통합해 이미지 생성 과정을 세밀하게 제어할 수 있게 합니다. 이러한 기법을 활용하면 특정 시각적 제약이나 스타일 가이드라인을 더 잘 따르는 이미지를 만들 수 있습니다. 기술적으로 이 워크플로는 SaveImage, LoadImage, PreviewImage 같은 노드를 조합해 이미지 데이터를 처리하며, 0e306186-0dda-4b49-bfcb-98cab32901d9 및 f8e756aa-94b4-4c02-943d-2e7910344622 같은 특수 노드는 ControlNet 변환을 적용하는 데 사용됩니다. FluxKontextImageScale 노드는 이미지 스케일링을 추가로 정교화해 출력이 입력 파라미터에 높은 충실도를 유지하도록 합니다.
제공할 항목
- 워크플로 읽는 중
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({
"60": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI",
"images": [
"111:8",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"71": {
"class_type": "LoadImage",
"inputs": {
"image": "image_qwen_image_instantx_controlnet_input_image.jpg"
},
"_meta": {
"title": "Load Image"
}
},
"73": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"112:22",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"113": {
"class_type": "FluxKontextImageScale",
"inputs": {
"image": [
"71",
0
]
},
"_meta": {
"title": "FluxKontextImageScale"
}
},
"111:3": {
"class_type": "KSampler",
"inputs": {
"cfg": 1,
"denoise": 1,
"latent_image": [
"111:76",
0
],
"model": [
"111:66",
0
],
"negative": [
"111:85",
1
],
"positive": [
"111:85",
0
],
"sampler_name": "euler",
"scheduler": "simple",
"seed": 498544006715206,
"steps": 4
},
"_meta": {
"title": "KSampler"
}
},
"111:37": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "qwen_image_fp8_e4m3fn.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"111:38": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "qwen_2.5_vl_7b_fp8_scaled.safetensors",
"device": "default",
"type": "qwen_image"
},
"_meta": {
"title": "Load CLIP"
}
},
"111:39": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "qwen_image_vae.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"111:6": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"111:38",
0
],
"text": "Post-apocalyptic style clothing, long wavy hair, rough texture, exotic woman, tattered coarse-woven linen fabric, wearing a hood, mechanical aesthetics, mainly in dark gray tones, low-saturation earthy yellow, sense of impact and rebellion, doomsday aesthetics, grotesque aesthetics, works of art, backlighting, film photography, professional photography works, clear visible face, emotional and atmospheric dynamic photography, Fujichrome color positive film, shot with a 17mm Hasselblad ultra-wide-angle lens, f/1.2 large aperture, side backlighting, artistic light, hair light, Rembrandt light, 8K high-definition image quality, delicate real human skin texture."
},
"_meta": {
"title": "CLIP Text Encode (Positive Prompt)"
}
},
"111:66": {
"class_type": "ModelSamplingAuraFlow",
"inputs": {
"model": [
"111:80",
0
],
"sampling": "flow",
"shift": 3.1000000000000005
},
"_meta": {
"title": "ModelSamplingAuraFlow"
}
},
"111:7": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"111:38",
0
],
"text": ""
},
"_meta": {
"title": "CLIP Text Encode (Negative Prompt)"
}
},
"111:76": {
"class_type": "VAEEncode",
"inputs": {
"pixels": [
"112:22",
0
],
"vae": [
"111:39",
0
]
},
"_meta": {
"title": "VAE Encode"
}
},
"111:8": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"111:3",
0
],
"vae": [
"111:39",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"111:80": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "Qwen-Image-Lightning-4steps-V1.0.safetensors",
"model": [
"111:37",
0
],
"strength_model": 1
},
"_meta": {
"title": "Load LoRA"
}
},
"111:84": {
"class_type": "ControlNetLoader",
"inputs": {
"control_net_name": "Qwen-Image-InstantX-ControlNet-Union.safetensors"
},
"_meta": {
"title": "Load ControlNet Model"
}
},
"111:85": {
"class_type": "ControlNetApplyAdvanced",
"inputs": {
"control_net": [
"111:84",
0
],
"end_percent": 1,
"image": [
"112:22",
0
],
"negative": [
"111:7",
0
],
"positive": [
"111:6",
0
],
"start_percent": 0,
"strength": 1,
"vae": [
"111:39",
0
]
},
"_meta": {
"title": "Apply ControlNet"
}
},
"112:10": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "lotus-depth-d-v1-1.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"112:14": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "vae-ft-mse-840000-ema-pruned.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"112:16": {
"class_type": "SamplerCustomAdvanced",
"inputs": {
"guider": [
"112:19",
0
],
"latent_image": [
"112:23",
0
],
"noise": [
"112:18",
0
],
"sampler": [
"112:21",
0
],
"sigmas": [
"112:28",
0
]
},
"_meta": {
"title": "SamplerCustomAdvanced"
}
},
"112:18": {
"class_type": "DisableNoise",
"inputs": {},
"_meta": {
"title": "DisableNoise"
}
},
"112:19": {
"class_type": "BasicGuider",
"inputs": {
"conditioning": [
"112:68",
0
],
"model": [
"112:10",
0
]
},
"_meta": {
"title": "Basic Guider"
}
},
"112:20": {
"class_type": "BasicScheduler",
"inputs": {
"denoise": 1,
"model": [
"112:10",
0
],
"scheduler": "normal",
"steps": 1
},
"_meta": {
"title": "BasicScheduler"
}
},
"112:21": {
"class_type": "KSamplerSelect",
"inputs": {
"sampler_name": "euler"
},
"_meta": {
"title": "KSamplerSelect"
}
},
"112:22": {
"class_type": "ImageInvert",
"inputs": {
"image": [
"112:8",
0
]
},
"_meta": {
"title": "Invert Image Colors"
}
},
"112:23": {
"class_type": "VAEEncode",
"inputs": {
"pixels": [
"113",
0
],
"vae": [
"112:14",
0
]
},
"_meta": {
"title": "VAE Encode"
}
},
"112:28": {
"class_type": "SetFirstSigma",
"inputs": {
"sigma": 999.0000000000002,
"sigmas": [
"112:20",
0
]
},
"_meta": {
"title": "SetFirstSigma"
}
},
"112:68": {
"class_type": "LotusConditioning",
"inputs": {},
"_meta": {
"title": "LotusConditioning"
}
},
"112:8": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"112:16",
0
],
"vae": [
"112:14",
0
]
},
"_meta": {
"title": "VAE Decode"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)질문과 답변
Huggingface 또는 Modelscope에서 확산 모델 'lotus-depth-d-v1-1.safetensors'과 VAE 모델 'vae-ft-mse-840000-ema-pruned.safetensors'을 다운로드해야 합니다.
이 워크플로는 실시간 애플리케이션보다 고품질 이미지 생성에 최적화되어 있습니다. 처리 시간이 덜 중요할 때 적합합니다.
프로젝트 요구에 따라 선택하세요. 에지 감지는 canny, 더 부드러운 전환은 소프트 에지, 3D 효과는 깊이, 특정 신체 포지션은 포즈를 사용합니다.
예. 여러 노드를 설정해 다양한 컨트롤 기법을 동시에 적용할 수 있어 복잡하고 커스텀한 출력이 가능합니다.