Match lighting from a reference
Relight a portrait using the lighting and color of a reference image.
워크플로 다운로드Cloud에서 사용해 보기 API 문서
워크플로 내부
소스 템플릿의 읽기 전용 미리보기입니다. Cloud에서 열어 노드를 살펴보고 변경할 수 있습니다.
코드에서 이 모델 호출하기
아래 요청은 Playground와 동일하게 준비된 그래프와 설정을 사용합니다. 제출할 때마다 유료 실행이 시작될 수 있으므로 결과를 알 수 없는 제출을 자동으로 재시도하지 마세요.
1 API 키 가져오기 ↗
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({
"5": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI-light_migration",
"images": [
"469:118",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"6": {
"class_type": "LoadImage",
"inputs": {
"image": "UPLOADED_image2_FILENAME"
},
"_meta": {
"title": "Load Lighting Image"
}
},
"7": {
"class_type": "LoadImage",
"inputs": {
"image": "UPLOADED_image1_FILENAME"
},
"_meta": {
"title": "Load Subject Image"
}
},
"469:110": {
"class_type": "CFGNorm",
"inputs": {
"model": [
"469:115",
0
],
"pre_cfg": False,
"strength": 1
},
"_meta": {
"title": "CFGNorm"
}
},
"469:111": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "qwen_image_vae.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"469:112": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "qwen_2.5_vl_7b_fp8_scaled.safetensors",
"device": "default",
"type": "qwen_image"
},
"_meta": {
"title": "Load CLIP"
}
},
"469:113": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "qwen_image_edit_2509_fp8_e4m3fn.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"469:114": {
"class_type": "TextEncodeQwenImageEditPlus",
"inputs": {
"clip": [
"469:112",
0
],
"image1": [
"469:120",
0
],
"image2": [
"6",
0
],
"prompt": "",
"vae": [
"469:111",
0
]
},
"_meta": {
"title": "TextEncodeQwenImageEditPlus"
}
},
"469:115": {
"class_type": "ModelSamplingAuraFlow",
"inputs": {
"model": [
"469:440",
0
],
"sampling": "flow",
"shift": 3
},
"_meta": {
"title": "ModelSamplingAuraFlow"
}
},
"469:116": {
"class_type": "TextEncodeQwenImageEditPlus",
"inputs": {
"clip": [
"469:112",
0
],
"image1": [
"469:120",
0
],
"image2": [
"6",
0
],
"prompt": "参考色调,移除图1原有的光照并参考图2的光照和色调对图1重新照明",
"vae": [
"469:111",
0
]
},
"_meta": {
"title": "TextEncodeQwenImageEditPlus"
}
},
"469:117": {
"class_type": "VAEEncode",
"inputs": {
"pixels": [
"469:120",
0
],
"vae": [
"469:111",
0
]
},
"_meta": {
"title": "VAE Encode"
}
},
"469:118": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"469:121",
0
],
"vae": [
"469:111",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"469:119": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "Qwen-Image-Edit-2509-Lightning-4steps-V1.0-bf16.safetensors",
"model": [
"469:470",
0
],
"strength_model": 1
},
"_meta": {
"title": "Load LoRA"
}
},
"469:120": {
"class_type": "FluxKontextImageScale",
"inputs": {
"image": [
"7",
0
]
},
"_meta": {
"title": "FluxKontextImageScale"
}
},
"469:121": {
"class_type": "KSampler",
"inputs": {
"cfg": [
"469:442",
0
],
"denoise": 1,
"latent_image": [
"469:117",
0
],
"model": [
"469:110",
0
],
"negative": [
"469:114",
0
],
"positive": [
"469:116",
0
],
"sampler_name": "euler",
"scheduler": "simple",
"seed": 67733640390271,
"steps": [
"469:441",
0
]
},
"_meta": {
"title": "KSampler"
}
},
"469:436": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 4
},
"_meta": {
"title": "Stpes"
}
},
"469:437": {
"class_type": "PrimitiveFloat",
"inputs": {
"value": 1
},
"_meta": {
"title": "CFG"
}
},
"469:438": {
"class_type": "PrimitiveInt",
"inputs": {
"value": 20
},
"_meta": {
"title": "Steps"
}
},
"469:439": {
"class_type": "PrimitiveFloat",
"inputs": {
"value": 4
},
"_meta": {
"title": "CFG"
}
},
"469:440": {
"class_type": "ComfySwitchNode",
"inputs": {
"on_false": [
"469:470",
0
],
"on_true": [
"469:119",
0
],
"switch": [
"469:443",
0
]
},
"_meta": {
"title": "Switch (Model)"
}
},
"469:441": {
"class_type": "ComfySwitchNode",
"inputs": {
"on_false": [
"469:438",
0
],
"on_true": [
"469:436",
0
],
"switch": [
"469:443",
0
]
},
"_meta": {
"title": "Switch (Steps)"
}
},
"469:442": {
"class_type": "ComfySwitchNode",
"inputs": {
"on_false": [
"469:439",
0
],
"on_true": [
"469:437",
0
],
"switch": [
"469:443",
0
]
},
"_meta": {
"title": "Switch (CFG)"
}
},
"469:443": {
"class_type": "PrimitiveBoolean",
"inputs": {
"value": False
},
"_meta": {
"title": "Enable Lightning LoRA"
}
},
"469:470": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "Qwen-Image-Edit-2509-Light-Migration.safetensors",
"model": [
"469:113",
0
],
"strength_model": 1
},
"_meta": {
"title": "Load LoRA"
}
}
})
workflow.set_input("7", "image", client.assets.from_url("https://cdn.jsdelivr.net/gh/Comfy-Org/workflow_templates@90c71fb78b3726392d010ff62a8e79e92d7296ad/input/input_1-relight.png"))
workflow.set_input("6", "image", client.assets.from_url("https://cdn.jsdelivr.net/gh/Comfy-Org/workflow_templates@90c71fb78b3726392d010ff62a8e79e92d7296ad/input/input_2-relight.png"))
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)
for output in job.get_outputs("5"):
output.to_file(output.name)예시 사용해 보기
관련 워크플로
- Qwen-Image-Edit
Change a material
- Qwen-Image-Edit
See your subject from a new angle
- Qwen-Image-Edit, Wan2.2
1개 이미지 입력 분할 스택 - Qwen 멀티앵글 + Wan 2.2
- Flux.2 Dev, Flux.2 Klein, GPT-Image-1.5, Grok, Nano Banana Pro, Qwen-Image-Edit, Seedream
1개 입력 및 다중 편집 모델 비교
- Qwen-Image-Edit
3D 카메라 노드로 여러 각도 생성
- Qwen-Image-Edit
INFL8 LoRA를 사용한 이미지 팽창 효과
- Qwen-Image-Edit
Qwen Image Edit 2511 - 소재 교체
- Qwen-Image-Edit
Qwen Image Edit 일러스트레이션 v 1.0
- Qwen-Image-Edit
Qwen 이미지 편집
- Qwen-Image-Edit
SYSTMS ACTION: QWEN IMAGE EDIT 2511
- Hunyuan3D, Qwen-Image-Edit
단일 이미지 기반 3D 모델
- Qwen-Image-Edit
리라이트 및 환경 합성