FLUX.2 Klein KV: Image Edit
Upload reference images and a text prompt. Generate multiple edited images using cached image data for faster processing.
تنزيل سير العملجرّبه في Cloud وثائق API
حول
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
- لا
- المخرج
- صورة
- المؤلف
- المؤلف غير متاح
يتطلب عُقدًا مخصصة
- جارٍ قراءة سير العمل
استخدم سير العمل هذا من خلال التعليمات البرمجية
يتم إنشاؤه من مخطط سير العمل والمدخلات عندما يكون ذلك ممكنًا؛ وإلا فتُعرض الأمثلة المخزنة. راجع بيانات الاعتماد ونقاط النهاية قبل تشغيل التعليمات البرمجية، إذ قد تترتب عليها رسوم.
1 الحصول على مفتاح API ↗
What you need
- Runs on
- Comfy Cloud
- المفتاح
- COMFY_API_KEY
يتطلب خطة Cloud مدفوعة ورصيدًا.
تنزيل API JSONوثائق API ↗
# 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: تكسية نموذج ثلاثي الأبعاد
- 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