FLUX.2 Klein KV: Image Edit
Upload reference images and a text prompt. Generate multiple edited images using cached image data for faster processing.
О проекте
Upload reference images and a text prompt. Generate multiple edited images using cached image data for faster processing.
Что вы предоставляете
- Чтение рабочего процесса
Работает в ComfyUI. Этот рабочий процесс можно запустить только в вашей собственной ComfyUI. Скачайте его и перетащите файл на холст.
Скачать рабочий процессДля этого рабочего процесса пока нет примеров результатов.
Внутри рабочего процесса
Предварительный просмотр графа узлов только для чтения. Откройте его в Comfy Cloud или скачайте, чтобы редактировать узлы.
Loading the graph
Open full-size workflow previewФайлы в этом рабочем процессе
- 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({
"76": {
"class_type": "LoadImage",
"inputs": {
"image": "man_in_street.png"
},
"_meta": {
"title": "Load Image"
}
},
"81": {
"class_type": "LoadImage",
"inputs": {
"image": "safari_outfit.png"
},
"_meta": {
"title": "Load Image"
}
},
"94": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "Flux2_Klein_9b_kv",
"images": [
"124",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"122": {
"class_type": "KSamplerSelect",
"inputs": {
"sampler_name": "euler"
},
"_meta": {
"title": "KSamplerSelect"
}
},
"123": {
"class_type": "SamplerCustomAdvanced",
"inputs": {
"guider": [
"138",
0
],
"latent_image": [
"129",
0
],
"noise": [
"125",
0
],
"sampler": [
"122",
0
],
"sigmas": [
"137",
0
]
},
"_meta": {
"title": "SamplerCustomAdvanced"
}
},
"124": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"123",
0
],
"vae": [
"127",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"125": {
"class_type": "RandomNoise",
"inputs": {
"noise_seed": 720512742793301
},
"_meta": {
"title": "RandomNoise"
}
},
"126": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "flux-2-klein-9b-kv-fp8.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"127": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "flux2-vae.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"128": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"130",
0
]
},
"_meta": {
"title": "Get Image Size"
}
},
"129": {
"class_type": "EmptyFlux2LatentImage",
"inputs": {
"batch_size": 1,
"height": [
"128",
1
],
"width": [
"128",
0
]
},
"_meta": {
"title": "Empty Flux 2 Latent"
}
},
"130": {
"class_type": "ImageScaleToTotalPixels",
"inputs": {
"image": [
"76",
0
],
"megapixels": 1,
"resolution_steps": 1,
"upscale_method": "lanczos"
},
"_meta": {
"title": "Scale Image to Total Pixels"
}
},
"131": {
"class_type": "ImageScaleToTotalPixels",
"inputs": {
"image": [
"81",
0
],
"megapixels": 1,
"resolution_steps": 1,
"upscale_method": "lanczos"
},
"_meta": {
"title": "Scale Image to Total Pixels"
}
},
"133": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "qwen_3_8b_fp8mixed.safetensors",
"device": "default",
"type": "flux2"
},
"_meta": {
"title": "Load CLIP"
}
},
"135": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"133",
0
],
"text": "Have the man in Figure 1 put on the clothes from Figure 2, wear a hat, and carry a bag. Then, change the background environment to an African savannah while keeping the man in the same posture to give a natural outdoor feel."
},
"_meta": {
"title": "CLIP Text Encode (Positive Prompt)"
}
},
"137": {
"class_type": "Flux2Scheduler",
"inputs": {
"height": [
"128",
1
],
"steps": 4,
"width": [
"128",
0
]
},
"_meta": {
"title": "Flux2Scheduler"
}
},
"138": {
"class_type": "CFGGuider",
"inputs": {
"cfg": 1,
"model": [
"139",
0
],
"negative": [
"132:119",
0
],
"positive": [
"132:121",
0
]
},
"_meta": {
"title": "CFG Guider"
}
},
"139": {
"class_type": "FluxKVCache",
"inputs": {
"model": [
"126",
0
]
},
"_meta": {
"title": "Flux KV Cache"
}
},
"685": {
"class_type": "ConditioningZeroOut",
"inputs": {
"conditioning": [
"135",
0
]
},
"_meta": {
"title": "Conditioning Zero Out"
}
},
"132:119": {
"class_type": "ReferenceLatent",
"inputs": {
"conditioning": [
"134:116",
0
],
"latent": [
"132:120",
0
]
},
"_meta": {
"title": "Set Reference Latent"
}
},
"132:120": {
"class_type": "VAEEncode",
"inputs": {
"pixels": [
"131",
0
],
"vae": [
"127",
0
]
},
"_meta": {
"title": "VAE Encode"
}
},
"132:121": {
"class_type": "ReferenceLatent",
"inputs": {
"conditioning": [
"134:118",
0
],
"latent": [
"132:120",
0
]
},
"_meta": {
"title": "Set Reference Latent"
}
},
"134:116": {
"class_type": "ReferenceLatent",
"inputs": {
"conditioning": [
"685",
0
],
"latent": [
"134:117",
0
]
},
"_meta": {
"title": "Set Reference Latent"
}
},
"134:117": {
"class_type": "VAEEncode",
"inputs": {
"pixels": [
"130",
0
],
"vae": [
"127",
0
]
},
"_meta": {
"title": "VAE Encode"
}
},
"134:118": {
"class_type": "ReferenceLatent",
"inputs": {
"conditioning": [
"135",
0
],
"latent": [
"134:117",
0
]
},
"_meta": {
"title": "Set Reference Latent"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)Похожие рабочие процессы
- UUltraTex, FLUX.2 Klein
UltraTex: Текстурирование 3D-модели
- ZZ-Image-Turbo
1.1 Старт — текст в изображение
- Nano Banana 2 Text-to-Image
3x3 Contact Sheet
- AAnima
Anima Base v1: текст в изображение
- AAnima
Anima Lllite: Any Control to Image
- AAnima
Anima Lllite: Depth Control to Image
- AAnima
Anima Lllite: Image Inpainting
- QQuiver
Arrow 2: Text to SVG
- BBoogu
Boogu Turbo: Text to Image
- BRIA
Bria: FIBO 2.0 Text to Image
- CChroma, Flux
Chroma: текст в изображение
- EERNIE-Image
Ernie Image Turbo: Text To Image