Qwen-Image Union Control
Qwen-Image의 통합 ControlNet LoRA를 사용하여 정밀한 구조 제어로 이미지를 생성합니다. 다양한 창의적 응용을 위한 canny, depth, lineart, softedge, normal 및 openpose를 포함한 여러 제어 유형을 지원합니다.
정보
Qwen-Image Union Control 워크플로는 Qwen-Image 모델의 통합 ControlNet LoRA를 사용해 이미지 생성에서 구조를 정밀하게 제어할 수 있도록 설계되었습니다. 이 워크플로는 canny, depth, lineart, softedge, normal, openpose 등 여러 컨트롤 유형을 통합해 폭넓은 제작 요구를 지원합니다. 이러한 컨트롤을 활용하면 이미지 생성 과정을 유도해 의도한 스타일과 구조에 더 가깝게 결과를 맞출 수 있습니다.
기술적으로 이 워크플로는 여러 노드를 사용해 이미지를 처리하고 다듬습니다. LoadImage 노드가 참조 이미지를 가져오며 시작합니다. Canny 노드는 에지를 감지해 이미지 생성에 사용할 구조 윤곽을 제공합니다. ImageScaleToTotalPixels 노드는 출력 품질 저하를 방지하도록 입력 이미지 크기를 적절히 조정합니다. PreviewImage 노드는 중간 결과를 확인할 수 있게 하며, SaveImage 노드는 생성된 이미지를 저장해 마무리합니다. 이미지의 구조적 요소를 높은 수준으로 통제해야 하는 아티스트 및 디자이너에게 특히 유용합니다.
제공할 항목
- 워크플로 읽는 중
ComfyUI에서 실행됩니다. 이 워크플로는 이 페이지에서 실행할 수 없습니다. 모든 항목이 로드된 Comfy Cloud에서 열거나, 자체 ComfyUI에서 사용하려면 다운로드하세요.
Cloud에서 사용해 보기워크플로 내부
노드 그래프의 읽기 전용 미리보기입니다. 노드를 편집하려면 Comfy Cloud에서 열거나 다운로드하세요.
코드에서 이 워크플로 사용하기
가능한 경우 워크플로 그래프와 입력을 기반으로 생성되며, 그렇지 않은 경우 저장된 예시가 표시됩니다. 비용이 발생할 수 있으므로 코드를 실행하기 전에 자격 증명과 엔드포인트를 검토하세요.
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": [
"84:8",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"73": {
"class_type": "LoadImage",
"inputs": {
"image": "image_qwen_image_union_control_lora_input_image.png"
},
"_meta": {
"title": "Load Image"
}
},
"74": {
"class_type": "Canny",
"inputs": {
"high_threshold": 0.8,
"image": [
"77",
0
],
"low_threshold": 0.4
},
"_meta": {
"title": "Detect Edges (Canny)"
}
},
"75": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"74",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"77": {
"class_type": "ImageScaleToTotalPixels",
"inputs": {
"image": [
"73",
0
],
"megapixels": 1,
"resolution_steps": 1,
"upscale_method": "lanczos"
},
"_meta": {
"title": "Scale Image to Total Pixels"
}
},
"84:3": {
"class_type": "KSampler",
"inputs": {
"cfg": 1,
"denoise": 1,
"latent_image": [
"84:72",
0
],
"model": [
"84:66",
0
],
"negative": [
"84:71",
0
],
"positive": [
"84:70",
0
],
"sampler_name": "euler",
"scheduler": "simple",
"seed": 70741926012422,
"steps": 4
},
"_meta": {
"title": "KSampler"
}
},
"84:37": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "qwen_image_fp8_e4m3fn.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"84:38": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "qwen_2.5_vl_7b_fp8_scaled.safetensors",
"device": "default",
"type": "qwen_image"
},
"_meta": {
"title": "Load CLIP"
}
},
"84:39": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "qwen_image_vae.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"84:6": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"84:38",
0
],
"text": "Extreme close-up shot, realistic digital illustration, close eyes, peaceful,oil painting with thick application, girl with curly hair, large black flower, black nail polish, ring details, soft light and shadow, dark green backdrop, delicate hair texture, smooth skin rendering, fine artistic details, dreamy and elegant atmosphere, dark style, grotesque. White hair, huge black flower behind her (with yellow stamens, green stems and leaves), black turtleneck clothing, green leaves and black flowers around, artistic illustration style, sharp color contrast, mysterious atmosphere, delicate brushstrokes, thick oil painting, thickly applied oil painting, the whole picture is filled with layered flowers, huge, petals spreading, beautiful composition, unexpected angle, layered background. Macro, eyes looking down, thick application, brushstrokes, splatters, mottled, old, extremely romantic, light and shadow, strong contrast, maximalist style, full-frame composition."
},
"_meta": {
"title": "CLIP Text Encode (Positive Prompt)"
}
},
"84:66": {
"class_type": "ModelSamplingAuraFlow",
"inputs": {
"model": [
"84:79",
0
],
"sampling": "flow",
"shift": 3.1
},
"_meta": {
"title": "ModelSamplingAuraFlow"
}
},
"84:69": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "qwen_image_union_diffsynth_lora.safetensors",
"model": [
"84:37",
0
],
"strength_model": 1
},
"_meta": {
"title": "Load LoRA"
}
},
"84:7": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"84:38",
0
],
"text": " "
},
"_meta": {
"title": "CLIP Text Encode (Negative Prompt)"
}
},
"84:70": {
"class_type": "ReferenceLatent",
"inputs": {
"conditioning": [
"84:6",
0
],
"latent": [
"84:72",
0
]
},
"_meta": {
"title": "Set Reference Latent"
}
},
"84:71": {
"class_type": "ReferenceLatent",
"inputs": {
"conditioning": [
"84:7",
0
],
"latent": [
"84:72",
0
]
},
"_meta": {
"title": "Set Reference Latent"
}
},
"84:72": {
"class_type": "VAEEncode",
"inputs": {
"pixels": [
"74",
0
],
"vae": [
"84:39",
0
]
},
"_meta": {
"title": "VAE Encode"
}
},
"84:79": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "Qwen-Image-Lightning-4steps-V1.0.safetensors",
"model": [
"84:69",
0
],
"strength_model": 1
},
"_meta": {
"title": "Load LoRA"
}
},
"84:8": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"84:3",
0
],
"vae": [
"84:39",
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)질문과 답변
'Canny' 노드는 참조 이미지의 에지를 감지해 이미지 생성 과정을 안내하는 구조 윤곽을 제공합니다.
이 워크플로는 참조 이미지로 구조를 제어하도록 설계되었습니다. 처음부터 생성하려면 참조 이미지에 의존하지 않는 다른 워크플로를 고려하세요.
원하는 결과에 따라 달라집니다. 예를 들어 'canny'는 에지 감지, 'depth'는 3D 느낌, 'openpose'는 포즈 제어에 사용합니다.
'ImageScaleToTotalPixels' 노드로 입력 이미지 크기가 적절한지 확인해 품질 문제를 방지하세요. 또한 컨트롤 설정을 조정해 출력을 더 다듬을 수 있습니다.