FLUX 3 Image Klein Distilled: Text to Image
Distilled FLUX 3 Image Klein in 8 steps with no guidance: describe the scene and get one finished image, fast.
下載工作流程在 Cloud 中試用 API 文件
工作流程內部
來源範本的唯讀預覽。請在 Cloud 中開啟,以探索節點並進行變更。
Loading the graph
Open full-size workflow preview此工作流程中的檔案
- 輸出
- 圖片
- 作者
- 作者無法使用
從您的程式碼呼叫此模型
以下請求使用與 Playground 相同的已準備節點圖和設定。每次提交都可能啟動付費執行;若提交結果不明,請勿自動重試提交。
1 取得 API 金鑰 ↗
What you need
- Runs on
- Comfy Cloud
- 金鑰
- COMFY_API_KEY
需要付費 Cloud 方案與點數。
下載 API JSONAPI 文件 ↗
# 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({
"9": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "image_flux3_klein_distilled_t2i",
"images": [
"18:8",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"19": {
"class_type": "ResolutionSelector",
"inputs": {
"aspect_ratio": "16:9 (Widescreen)",
"megapixels": 1,
"multiple": 8
},
"_meta": {
"title": "Resolution Selector"
}
},
"23": {
"class_type": "CreateBoundingBoxes",
"inputs": {
"editor_state": {
"__value__": []
},
"height": 1024,
"last_incoming": {
"__value__": []
},
"width": 1024
},
"_meta": {
"title": "Create Bounding Boxes"
}
},
"24": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"25",
0
]
},
"_meta": {
"title": "Preview as Text"
}
},
"25": {
"class_type": "Flux3LayoutPrompt",
"inputs": {
"element": [
"23",
2
],
"prompt": ""
},
"_meta": {
"title": "FLUX 3 Image Layout Prompt"
}
},
"18:1": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "flux3-image-klein-int8-convrot.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"18:11": {
"class_type": "TextGenerate",
"inputs": {
"clip": [
"18:12",
0
],
"max_length": 3584,
"mtp": "off",
"prompt": [
"18:17",
0
],
"sampling_mode": "on",
"sampling_mode.min_p": 0,
"sampling_mode.presence_penalty": 1.5,
"sampling_mode.repetition_penalty": 1.05,
"sampling_mode.seed": 0,
"sampling_mode.temperature": 1,
"sampling_mode.top_k": 1,
"sampling_mode.top_p": 0.95,
"system_prompt": [
"18:14",
0
],
"thinking": False,
"use_default_template": True
},
"_meta": {
"title": "Generate Text"
}
},
"18:12": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "qwen3.5_9b_flux3_prompt_upsampler_w4a8.safetensors",
"device": "default",
"type": "flux3"
},
"_meta": {
"title": "Load CLIP"
}
},
"18:13": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"18:16",
0
]
},
"_meta": {
"title": "Preview as Text"
}
},
"18:14": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": "You are the prompt upsampler of a text-to-image model. Expand the user's short request into ONE detailed, self-contained caption: the exact text the image model receives. Output only the caption, with no greetings, explanations, refusals, questions, Markdown, headings, JSON, coordinates, ids or angle-bracket tokens, and no quotes around it. If the input is not clearly an image request, caption a visualization of its concept. The request may begin with a \"TARGET CANVAS: W:H\" line: compose for that canvas (wide spreads content sideways, tall stacks it) and never mention the ratio or the canvas.\n\nFidelity and planning: keep every explicit subject, attribute, count, spatial constraint, style cue and piece of wording; never contradict, substitute, drop or narrow the request, and keep an abstract concept abstract. Decide everything left open as ONE concrete, consistent plan; never offer alternatives or hedge. Never re-express a stated constraint through another mechanism; add camera optics (depth of field, bokeh, blur) only when asked for or implied. Without a stated style, plan an actual photograph and open with the medium convention (\"Full-color outdoor photograph, ...\", \"Full-color indoor photograph, ...\", \"Studio photograph, ...\", \"Close-up photograph, ...\"); keep \"Photorealistic\" for renders, and turn \"photorealistic\" or \"realistic\" requests for photos into the photograph convention. Give a photograph a few ordinary, non-ideal specifics drawn from the scene's own objects instead of the stock-photo ideal. Do not invent names, brands, logos or celebrities; keep user-named ones. A long request keeps its content but not its wording: drop appraisal and sales vocabulary, turn moods into observable physical facts, and add only new concrete content with positions. Time of day is lighting, not rendered text.\n\nCaption format: one continuous prose block in the generative voice, never \"this image shows\", \"we can see\" or \"is visible\". Lead with medium and style, then scene, lighting and camera, then the subjects with concrete colors, materials and state. Every person in focus gets an observable profile: ethnicity, gender, age range, skin tone (\"fair skin\", \"brown skin\"), hair and clothing. Make the layout reconstructable from words: frame-relative positions (frame-left, frame-right, upper, lower, foreground, midground, background), sentence-initial anchors (\"On the left, ...\", \"In the background, ...\"), relations (holds, faces, behind) and a consistent order; describe up to about ten instances one by one, beyond that give the exact count and arrangement. Out-of-focus or distant planes are shapes, colors and silhouettes, never identities or readable text, and the background takes about a sixth of the caption. Be definite: no hedging adverbs, no quality or emotion judgments, no closing sentence about mood; state negations as what is present. Rendered text: transcribe every wording verbatim inside double quotes in its original language and script, keep the line breaks of multi-line text, and give its typography, color and placement; author concrete, domain-correct wording when the request needs text it does not supply, and name canonical structures (calendar, keyboard, periodic table) exactly with their full layout. All prose is English; only quoted text keeps its language. Typical length is 100 to 350 words, more for complex scenes.\n\nOutput only the caption.\n"
},
"_meta": {
"title": "Text (System prompt)"
}
},
"18:16": {
"class_type": "ComfySwitchNode",
"inputs": {
"on_false": [
"18:17",
0
],
"on_true": [
"18:11",
0
],
"switch": True
},
"_meta": {
"title": "If/Else Switch"
}
},
"18:17": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": "A vast brutalist reading room of poured concrete, empty except for one reader seated at a long oak table on the far side. Late afternoon sun cuts through a high clerestory slot, throwing a hard shaft of light across the floor that stops just short of the table, and dust turns slowly inside it. Book stacks recede into shadow along both walls, their spines dim and colourless. The concrete carries formwork seams, tie holes and a faint chalky bloom. Cool grey palette with one warm band of light. Architectural photography on a wide lens, deep focus, quiet and severe, high tonal control."
},
"_meta": {
"title": "Text (Multiline)"
}
},
"18:2": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "qwen3vl_4b_int8_convrot.safetensors",
"device": "default",
"type": "flux3"
},
"_meta": {
"title": "Load CLIP"
}
},
"18:3": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "flux2-vae.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"18:4": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"18:2",
0
],
"text": [
"18:13",
0
]
},
"_meta": {
"title": "Positive Prompt"
}
},
"18:5": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"18:2",
0
],
"text": ""
},
"_meta": {
"title": "Negative Prompt (empty = reference default)"
}
},
"18:6": {
"class_type": "EmptyFlux2LatentImage",
"inputs": {
"batch_size": 1,
"height": [
"19",
1
],
"width": [
"19",
0
]
},
"_meta": {
"title": "Empty Flux 2 Latent"
}
},
"18:7": {
"class_type": "KSampler",
"inputs": {
"cfg": 1,
"denoise": 1,
"latent_image": [
"18:6",
0
],
"model": [
"18:1",
0
],
"negative": [
"18:5",
0
],
"positive": [
"18:4",
0
],
"sampler_name": "euler",
"scheduler": "simple",
"seed": 605452029419059,
"steps": 16
},
"_meta": {
"title": "KSampler"
}
},
"18:8": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"18:7",
0
],
"vae": [
"18:3",
0
]
},
"_meta": {
"title": "VAE Decode"
}
}
})
# 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("9"):
output.to_file(output.name)試試範例
關於此工作流程
Distilled FLUX 3 Image Klein text-to-image. The FLUX 3 Image Klein SD subgraph samples in 8 steps with no classifier-free guidance, ResolutionSelector picks the aspect ratio, SaveImage writes one PNG. The same optional Flux3LayoutPrompt / CreateBoundingBoxes pair as the base template handles bbox-guided placement. Use it for rapid concept art and everyday ideation where the base model's step count is wasted.
相關工作流程
- 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: 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 虛擬試穿
- Flux, Flux.1
Flux.1 [專業版]:文生圖
- Flux.1, Flux
Flux.1 Canny 模型