SDXL Refiner 프롬프트
리파이너 모델을 사용하여 SDXL 이미지를 향상시킵니다.
워크플로 내부
소스 템플릿의 읽기 전용 미리보기입니다. Cloud에서 열어 노드를 살펴보고 변경할 수 있습니다.
Loading the graph
Open full-size workflow preview이 워크플로의 파일
- 출력
- 이미지
- 작성자
- ComfyUI
코드에서 이 모델 호출하기
아래 요청은 Playground와 동일하게 준비된 그래프와 설정을 사용합니다. 제출할 때마다 유료 실행이 시작될 수 있으므로 결과를 알 수 없는 제출을 자동으로 재시도하지 마세요.
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({
"4": {
"class_type": "CheckpointLoaderSimple",
"inputs": {
"ckpt_name": "sd_xl_base_1.0.safetensors"
},
"_meta": {
"title": "Load Checkpoint - BASE"
}
},
"5": {
"class_type": "EmptyLatentImage",
"inputs": {
"batch_size": 1,
"height": 768,
"width": 1344
},
"_meta": {
"title": "Empty Latent Image"
}
},
"6": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"4",
1
],
"text": "An atmospheric retro-fantasy illustration captured from an elevated bird's-eye perspective with a panoramic 24mm wide-angle lens. At the center, a colossal floating dodecahedron carved from rough, porous volcanic basalt and veined raw malachite hovers majestically. Intricate fractal cracks glow with deep interior smoldering embers, casting soft rim lighting across its weathered, matte stone facets. Flanking canyon ridges and staggered sandstone buttes stretch endlessly toward distant horizon lines, shrouded in low-lying ochre dust and golden atmospheric haze. Gentle late-afternoon sunbeams rake across the arid valley floor, creating long sweeping umber shadows and warm terracotta highlights. The rich, earthy palette balances burnt sienna, dusty sage green, and muted copper with the fiery molten core of the monolith. Deep cinematic shadows and diffused twilight haze emphasize the vast, quiet expanse around the solitary geometric relic."
},
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"7": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"4",
1
],
"text": "text, watermark"
},
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"10": {
"class_type": "KSamplerAdvanced",
"inputs": {
"add_noise": "enable",
"cfg": 8,
"end_at_step": 20,
"latent_image": [
"5",
0
],
"model": [
"4",
0
],
"negative": [
"7",
0
],
"noise_seed": 6767725640732,
"positive": [
"6",
0
],
"return_with_leftover_noise": "enable",
"sampler_name": "euler",
"scheduler": "normal",
"start_at_step": 0,
"steps": 25
},
"_meta": {
"title": "KSampler (Advanced) - BASE"
}
},
"11": {
"class_type": "KSamplerAdvanced",
"inputs": {
"add_noise": "disable",
"cfg": 8,
"end_at_step": 10000,
"latent_image": [
"10",
0
],
"model": [
"12",
0
],
"negative": [
"16",
0
],
"noise_seed": 0,
"positive": [
"15",
0
],
"return_with_leftover_noise": "disable",
"sampler_name": "euler",
"scheduler": "normal",
"start_at_step": 20,
"steps": 25
},
"_meta": {
"title": "KSampler (Advanced) - REFINER"
}
},
"12": {
"class_type": "CheckpointLoaderSimple",
"inputs": {
"ckpt_name": "sd_xl_refiner_1.0.safetensors"
},
"_meta": {
"title": "Load Checkpoint - REFINER"
}
},
"15": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"12",
1
],
"text": "An atmospheric retro-fantasy illustration captured from an elevated bird's-eye perspective with a panoramic 24mm wide-angle lens. At the center, a colossal floating dodecahedron carved from rough, porous volcanic basalt and veined raw malachite hovers majestically. Intricate fractal cracks glow with deep interior smoldering embers, casting soft rim lighting across its weathered, matte stone facets. Flanking canyon ridges and staggered sandstone buttes stretch endlessly toward distant horizon lines, shrouded in low-lying ochre dust and golden atmospheric haze. Gentle late-afternoon sunbeams rake across the arid valley floor, creating long sweeping umber shadows and warm terracotta highlights. The rich, earthy palette balances burnt sienna, dusty sage green, and muted copper with the fiery molten core of the monolith. Deep cinematic shadows and diffused twilight haze emphasize the vast, quiet expanse around the solitary geometric relic."
},
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"16": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"12",
1
],
"text": "text, watermark"
},
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"17": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"11",
0
],
"vae": [
"12",
2
]
},
"_meta": {
"title": "VAE Decode"
}
},
"19": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI",
"images": [
"17",
0
]
},
"_meta": {
"title": "Save Image"
}
}
})
# 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("19"):
output.to_file(output.name)예시 사용해 보기
이 워크플로 정보
이 ComfyUI 워크플로는 리파이너 모델을 사용해 Stable Diffusion XL(SDXL) 모델이 생성한 이미지를 향상하도록 설계되었습니다. 일련의 노드를 활용해 고품질이면서 시각적으로 보기 좋은 정제된 이미지 출력을 만듭니다. 워크플로는 CheckpointLoaderSimple 노드로 기본 SDXL 모델을 로딩하는 것으로 시작하며, 이 노드는 선택한 SD 모델 버전에 맞춰 최적 설정이 자동 적용되도록 구성됩니다. 이후 EmptyLatentImage 노드로 초기 잠재 데이터 이미지를 생성하는데, 이는 추가 정제를 위한 캔버스 역할을 합니다.
핵심은 CLIPTextEncode 노드가 텍스트 프롬프트를 해석해 이미지 생성 과정을 가이드하는 부분입니다. KSamplerAdvanced 노드는 이미지에 제어된 노이즈를 도입해 모델이 반복적으로 시각 출력을 정제하고 향상하도록 합니다. 정제가 끝나면 VAEDecode 노드가 잠재 데이터 이미지를 가시적인 형식으로 변환해 최종 조정이 가능하게 합니다. 마지막으로 SaveImage 노드로 PNG 형식으로 향상된 이미지를 저장할 수 있습니다. SDXL 모델의 성능과 고급 정제 기법을 결합하므로, 프로젝트에 고품질의 정제 이미지를 요구하는 아티스트와 디자이너에게 특히 유용합니다.
질문과 답변
KSamplerAdvanced 노드는 이미지에 제어된 노이즈를 추가하여 모델이 반복적으로 시각 출력을 정제하고 향상하도록 합니다.
네. 이 워크플로는 SD1.5 및 SD2.x 모델과도 호환되도록 설계되어 있지만, SDXL에 최적화되어 있습니다.
SDXL 권장 해상도는 1024x1024, 1152x896, 896x1152, 1216x832, 832x1216, 1344x768, 768x1344, 1536x640, 640x1536 입니다.
워크플로를 로딩할 때 CheckpointLoaderSimple 노드에서 로컬 모델을 수동으로 선택해 호환성을 보장하세요.