FLUX.2 [Klein] 4B 증류판: 이미지 편집
Klein 패밀리에서 가장 빠른 버전입니다. 인터랙티브 애플리케이션, 실시간 미리보기, 저지연 환경에 최적화되어 있습니다.
워크플로 내부
소스 템플릿의 읽기 전용 미리보기입니다. Cloud에서 열어 노드를 살펴보고 변경할 수 있습니다.
Loading the graph
Open full-size workflow preview코드에서 이 모델 호출하기
아래 요청은 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({
"76": {
"class_type": "LoadImage",
"inputs": {
"image": "UPLOADED_image_FILENAME"
},
"_meta": {
"title": "Load Image"
}
},
"81": {
"class_type": "LoadImage",
"inputs": {
"image": "UPLOADED_reference_image_FILENAME"
},
"_meta": {
"title": "Load Image"
}
},
"94": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "Flux2-Klein",
"images": [
"92:65",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"92:61": {
"class_type": "KSamplerSelect",
"inputs": {
"sampler_name": "euler"
},
"_meta": {
"title": "KSamplerSelect"
}
},
"92:62": {
"class_type": "Flux2Scheduler",
"inputs": {
"height": [
"92:81",
1
],
"steps": 4,
"width": [
"92:81",
0
]
},
"_meta": {
"title": "Flux2Scheduler"
}
},
"92:63": {
"class_type": "CFGGuider",
"inputs": {
"cfg": 1,
"model": [
"92:70",
0
],
"negative": [
"92:84:76",
0
],
"positive": [
"92:84:77",
0
]
},
"_meta": {
"title": "CFG Guider"
}
},
"92:64": {
"class_type": "SamplerCustomAdvanced",
"inputs": {
"guider": [
"92:63",
0
],
"latent_image": [
"92:66",
0
],
"noise": [
"92:73",
0
],
"sampler": [
"92:61",
0
],
"sigmas": [
"92:62",
0
]
},
"_meta": {
"title": "SamplerCustomAdvanced"
}
},
"92:65": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"92:64",
0
],
"vae": [
"92:72",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"92:66": {
"class_type": "EmptyFlux2LatentImage",
"inputs": {
"batch_size": 1,
"height": [
"92:81",
1
],
"width": [
"92:81",
0
]
},
"_meta": {
"title": "Empty Flux 2 Latent"
}
},
"92:70": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "flux-2-klein-4b-fp8.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"92:71": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "qwen_3_4b.safetensors",
"device": "default",
"type": "flux2"
},
"_meta": {
"title": "Load CLIP"
}
},
"92:72": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "flux2-vae.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"92:73": {
"class_type": "RandomNoise",
"inputs": {
"noise_seed": 432262096973495
},
"_meta": {
"title": "RandomNoise"
}
},
"92:74": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"92:71",
0
],
"text": "Restyle the object in image 1 with the woven pattern and colours from the textile in image 2. Cover the whole enclosure and its lid with the stepped medallions and sunburst motifs, in the same vermilion red, cobalt blue, saffron yellow and black, as if the pattern were enamelled onto the surface. Let the motifs wrap naturally around the edges and follow the bevelled corners and the recessed seam, scaled so several full medallions fit across the top. Keep the object's exact shape, size, position and the round stone plinth beneath it unchanged. Keep the warm taupe studio backdrop, the soft overhead light and the gentle contact shadow from image 1. The finish is a smooth glossy glaze with soft reflections, crisp edges and no text."
},
"_meta": {
"title": "CLIP Text Encode (Positive Prompt)"
}
},
"92:79:76": {
"class_type": "ReferenceLatent",
"inputs": {
"conditioning": [
"92:86",
0
],
"latent": [
"92:79:78",
0
]
},
"_meta": {
"title": "Set Reference Latent"
}
},
"92:79:77": {
"class_type": "ReferenceLatent",
"inputs": {
"conditioning": [
"92:74",
0
],
"latent": [
"92:79:78",
0
]
},
"_meta": {
"title": "Set Reference Latent"
}
},
"92:79:78": {
"class_type": "VAEEncode",
"inputs": {
"pixels": [
"92:80",
0
],
"vae": [
"92:72",
0
]
},
"_meta": {
"title": "VAE Encode"
}
},
"92:80": {
"class_type": "ImageScaleToTotalPixels",
"inputs": {
"image": [
"76",
0
],
"megapixels": 1,
"resolution_steps": 1,
"upscale_method": "nearest-exact"
},
"_meta": {
"title": "Scale Image to Total Pixels"
}
},
"92:81": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"92:80",
0
]
},
"_meta": {
"title": "Get Image Size"
}
},
"92:84:76": {
"class_type": "ReferenceLatent",
"inputs": {
"conditioning": [
"92:79:76",
0
],
"latent": [
"92:84:78",
0
]
},
"_meta": {
"title": "Set Reference Latent"
}
},
"92:84:77": {
"class_type": "ReferenceLatent",
"inputs": {
"conditioning": [
"92:79:77",
0
],
"latent": [
"92:84:78",
0
]
},
"_meta": {
"title": "Set Reference Latent"
}
},
"92:84:78": {
"class_type": "VAEEncode",
"inputs": {
"pixels": [
"92:85",
0
],
"vae": [
"92:72",
0
]
},
"_meta": {
"title": "VAE Encode"
}
},
"92:85": {
"class_type": "ImageScaleToTotalPixels",
"inputs": {
"image": [
"81",
0
],
"megapixels": 1,
"resolution_steps": 1,
"upscale_method": "nearest-exact"
},
"_meta": {
"title": "Scale Image to Total Pixels"
}
},
"92:86": {
"class_type": "ConditioningZeroOut",
"inputs": {
"conditioning": [
"92:74",
0
]
},
"_meta": {
"title": "Conditioning Zero Out"
}
}
})
workflow.set_input("76", "image", client.assets.from_url("https://comfy.org/catalog-media/904478c3-f8cb-49d8-ae87-2d2a37c7c277/7da4b4ee-74cd-4e72-b27d-4f79fefa975c"))
workflow.set_input("81", "image", client.assets.from_url("https://comfy.org/catalog-media/8dca4d88-7b50-457a-9563-a094cc1750c2/634b4e77-cc50-4a50-81ac-87180de56035"))
# 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("94"):
output.to_file(output.name)예시 사용해 보기
이 워크플로 정보
ComfyUI 워크플로 'FLUX.2 [Klein] 4B Distilled: Image Edit'는 인터랙티브 애플리케이션과 실시간 미리보기에 초점을 둔 빠른 이미지 편집을 위해 설계되었습니다. FLUX.2 Klein 모델을 활용하며, 속도가 중요한 지연 시간 민감한 프로덕션 환경에 최적화되어 있습니다. 이 워크플로는 출력 저장을 위한 'SaveImage', 입력 처리를 위한 'LoadImage', 그리고 처리를 담당하는 '7b34ab90-36f9-45ba-a665-71d418f0df18' 식별 노드 등 여러 핵심 노드를 사용합니다. 또한 워크플로 내부 문서와 안내를 위한 'MarkdownNote' 노드가 포함되어 있습니다.
기술적으로 이 워크플로는 빠르게 고품질 이미지 편집을 처리하는 효율성으로 알려진 FLUX.2 Klein 모델의 성능을 활용합니다. 'Multiple input example' 워크플로 그룹이 포함되어 있어 다양한 입력 구성을 전환할 수 있으며, 유연성과 사용자 제어를 강화합니다. 이 구성은 촉박한 마감의 프로덕션 환경에서 빠른 조정과 반복이 필요한 그래픽 디자이너나 디지털 아티스트에게 특히 유용합니다.
질문과 답변
FLUX.2 Klein 모델은 속도와 효율성에 최적화되어 있어 라이브 미리보기 및 인터랙티브 편집처럼 지연 시간이 중요한 애플리케이션에 적합합니다.
워크플로는 실시간 단일 이미지 편집에 최적화되어 있지만, 'LoadImage' 노드로 여러 이미지를 반복 처리하도록 구성해 배치 처리에 맞게 응용할 수 있습니다.
'7b34ab90-36f9-45ba-a665-71d418f0df18' 노드에서 파라미터를 조정해 필요에 맞게 이미지 편집을 커스텀할 수 있습니다.
예. 서브그래프가 워크플로에서 어떻게 동작하는지에 대한 자세한 내용은 Subgraph docs를 참고하세요.
관련 워크플로
- Flux.2 Dev, Flux
Create a product mockup
- Flux, Flux.2
BFL FLUX.2 [max]: 오브젝트 교체
- CChroma, Flux
Chroma: 텍스트 기반 이미지 생성
- Flux
FLUX 3 Image Klein Distilled: Image Edit
- Flux
FLUX 3 Image Klein Distilled: Text to Image
- Flux
FLUX 3 Image Klein: Image Edit
- Flux
FLUX 3 Image Klein: Text to Image
- Flux
FLUX 3 비디오: 텍스트 투 비디오
- Flux
FLUX 3 비디오: 텍스트 투 비디오
- Flux.1 Kontext, Flux
Flux Kontext Dev 이미지 편집
- Flux
FLUX Virtual Try-On
- Flux, Flux.1
FLUX.1 [Pro]:텍스트 기반 이미지 생성