사진 재조명
Qwen-Image-Edit와 LoRA로 사진을 다시 조명하세요.
워크플로 내부
소스 템플릿의 읽기 전용 미리보기입니다. Cloud에서 열어 노드를 살펴보고 변경할 수 있습니다.
코드에서 이 모델 호출하기
아래 요청은 Playground와 동일하게 준비된 그래프와 설정을 사용합니다. 제출할 때마다 유료 실행이 시작될 수 있으므로 결과를 알 수 없는 제출을 자동으로 재시도하지 마세요.
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({
"11": {
"class_type": "LoadImage",
"inputs": {
"image": "UPLOADED_image_FILENAME"
},
"_meta": {
"title": "Load Image"
}
},
"12": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI",
"images": [
"10:8",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"14": {
"class_type": "StringConcatenate",
"inputs": {
"delimiter": "",
"string_a": "重新照明,",
"string_b": [
"15",
0
]
},
"_meta": {
"title": "LoRA trigger word"
}
},
"15": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": "relight the image as a calm winter evening after sunset: the windows now show a deep blue dusk outside, and the room is lit from inside by warm low lamps placed beside the sofa and on the console table, with a soft amber glow pooling on the linen cushions, the travertine table and the oak floor. Keep warm candle-like highlights on the terracotta and ceramic pieces, gentle warm falloff across the plaster walls, cool blue light spilling faintly through the window panes, and long soft shadows stretching away from each lamp. Keep every object, material and the room layout exactly the same; only the lighting, colour temperature and shadows change, giving a cosy, intimate, lived-in mood."
},
"_meta": {
"title": "Prompt"
}
},
"10:110": {
"class_type": "TextEncodeQwenImageEditPlus",
"inputs": {
"clip": [
"10:38",
0
],
"image1": [
"10:117",
0
],
"prompt": "",
"vae": [
"10:39",
0
]
},
"_meta": {
"title": "Text Encode Qwen Image Edit Plus"
}
},
"10:111": {
"class_type": "TextEncodeQwenImageEditPlus",
"inputs": {
"clip": [
"10:38",
0
],
"image1": [
"10:117",
0
],
"prompt": [
"14",
0
],
"vae": [
"10:39",
0
]
},
"_meta": {
"title": "Text Encode Qwen Image Edit Plus"
}
},
"10:117": {
"class_type": "FluxKontextImageScale",
"inputs": {
"image": [
"11",
0
]
},
"_meta": {
"title": "FluxKontextImageScale"
}
},
"10:118": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "Qwen-Image-Edit-2509-Relight.safetensors",
"model": [
"10:89",
0
],
"strength_model": 1
},
"_meta": {
"title": "Load LoRA"
}
},
"10:3": {
"class_type": "KSampler",
"inputs": {
"cfg": 1,
"denoise": 1,
"latent_image": [
"10:88",
0
],
"model": [
"10:75",
0
],
"negative": [
"10:110",
0
],
"positive": [
"10:111",
0
],
"sampler_name": "euler",
"scheduler": "simple",
"seed": 1118877715456453,
"steps": 4
},
"_meta": {
"title": "KSampler"
}
},
"10:37": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "qwen_image_edit_2509_fp8_e4m3fn.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"10:38": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "qwen_2.5_vl_7b_fp8_scaled.safetensors",
"device": "default",
"type": "qwen_image"
},
"_meta": {
"title": "Load CLIP"
}
},
"10:39": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "qwen_image_vae.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"10:66": {
"class_type": "ModelSamplingAuraFlow",
"inputs": {
"model": [
"10:118",
0
],
"sampling": "flow",
"shift": 3
},
"_meta": {
"title": "ModelSamplingAuraFlow"
}
},
"10:75": {
"class_type": "CFGNorm",
"inputs": {
"model": [
"10:66",
0
],
"pre_cfg": False,
"strength": 1
},
"_meta": {
"title": "CFGNorm"
}
},
"10:8": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"10:3",
0
],
"vae": [
"10:39",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"10:88": {
"class_type": "VAEEncode",
"inputs": {
"pixels": [
"10:117",
0
],
"vae": [
"10:39",
0
]
},
"_meta": {
"title": "VAE Encode"
}
},
"10:89": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "Qwen-Image-Edit-2509-Lightning-4steps-V1.0-bf16.safetensors",
"model": [
"10:37",
0
],
"strength_model": 1
},
"_meta": {
"title": "Load LoRA"
}
}
})
workflow.set_input("11", "image", client.assets.from_url("https://comfy.org/catalog-media/00a9f99c-a979-4359-b38e-fd61637c1023/42048864-3190-4865-8b71-19f186e98089"))
# 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("12"):
output.to_file(output.name)예시 사용해 보기
이 워크플로 정보
Image Relight 워크플로는 고급 AI 기법을 사용해 이미지의 조명을 개선하고 수정하도록 설계되었습니다. 이 워크플로의 핵심은 Qwen-Image-Edit 모델이며, 이 모델은 LoRA(Low-Rank Adaptation) 지원으로 특정 작업에 맞게 성능을 미세 조정할 수 있는 정교한 이미지 편집 능력으로 알려져 있습니다. 워크플로는 LoadImage 노드로 이미지를 로드하는 것부터 시작하며, 이 입력이 리라이팅 과정의 기반이 됩니다. 이후 Qwen-Image-Edit 모델이 이미지를 처리하면서 조명을 조정해 원하는 효과를 만듭니다. 이는 이미지의 분위기를 강화하거나 특정 요소를 강조하려는 사진가와 디지털 아티스트에게 특히 유용합니다. 워크플로는 SaveImage 노드로 새롭게 조정된 이미지를 출력하며, 다양한 용도에 바로 사용할 수 있습니다.
기술적으로 이 워크플로는 MarkdownNote 및 StringConcatenate 노드 조합을 통해 특정 조명 파라미터를 입력할 수 있도록 구성되어, 사용하기 쉬운 커스텀 인터페이스를 제공합니다. PrimitiveStringMultiline 노드는 복잡한 문자열 입력을 처리해, 상세한 지침과 설정을 수용할 수 있도록 합니다. 이를 통해 Image Relight 워크플로는 다양한 사용자 요구에 맞게 유연하게 적용할 수 있어 이미지 편집 역량을 개선하려는 사용자에게 유용합니다.
질문과 답변
Qwen-Image-Edit는 리라이트 등 고급 이미지 편집 작업을 위한 AI 모델로, LoRA 지원으로 성능을 강화할 수 있습니다.
네, MarkdownNote와 StringConcatenate 노드로 원하는 조명 파라미터를 직접 입력해 커스터마이즈할 수 있습니다.
강력한 기능을 제공하지만, 사용자 친화적으로 설계되어 초보자와 숙련자 모두 쉽게 사용할 수 있습니다.
JPEG, PNG 등 일반적인 이미지 포맷을 입력 및 출력으로 지원합니다.