Kandinsky 5.0 圖像精簡版:文生圖
輕量級 2B 模型,從英語和俄語提示產生高品質視覺圖像。
關於
「Kandinsky 5.0 Image Lite:文字轉圖像」工作流程,設計用於從英文與俄文提示詞生成高品質圖像。此流程運用 Kandinsky 模型(輕量級 20 億參數),高效產生具視覺吸引力的結果。流程整合多個關鍵節點,包括 7aad998c-49e7-433f-bfb9-b1ac2680aa9e 處理文字輸入與圖像生成、MarkdownNote 註解流程,以及 SaveImage 儲存圖像。透過先進文字編碼器 qwen_2.5_vl_7b_fp8_scaled.safetensors 與 clip_l.safetensors,流程能精確捕捉提示語意並轉譯為視覺內容。
技術上,流程先以指定文字編碼器編碼輸入文字,這些編碼器針對兩種語言的複雜語法結構最佳化。編碼後的文字由 Kandinsky 模型處理,根據語意資訊合成圖像,實現細膩的文字到圖像轉換,捕捉細節與藝術風格。流程高效且支援多語提示,是創作者從多元文字輸入產生高品質圖像的多功能工具。
您提供的內容
- 正在讀取工作流程
在 ComfyUI 中執行。 此工作流程無法在此頁面上執行。請在已載入所有內容的 Comfy Cloud 中開啟,或下載到您自己的 ComfyUI。
在 Cloud 中試用工作流程內部
節點圖的唯讀預覽。請在 Comfy Cloud 中開啟,或下載後編輯節點。
Loading the graph
Open full-size workflow preview從程式碼使用此工作流程
可行時會根據工作流程圖和輸入內容產生;否則會顯示儲存的範例。執行可能產生費用的程式碼前,請檢查認證資訊和端點。
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({
"16": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "Kandinsky5",
"images": [
"12:9",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"12:1": {
"class_type": "DualCLIPLoader",
"inputs": {
"clip_name1": "qwen_2.5_vl_7b_fp8_scaled.safetensors",
"clip_name2": "clip_l.safetensors",
"device": "default",
"type": "kandinsky5_image"
},
"_meta": {
"title": "Load CLIP (Dual)"
}
},
"12:18": {
"class_type": "EmptyLatentImage",
"inputs": {
"batch_size": 1,
"height": 1024,
"width": 1024
},
"_meta": {
"title": "Empty Latent Image"
}
},
"12:2": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"12:1",
0
],
"text": ""
},
"_meta": {
"title": "CLIP Text Encode (Negative Prompt)"
}
},
"12:3": {
"class_type": "ModelSamplingSD3",
"inputs": {
"model": [
"12:4",
0
],
"shift": 3
},
"_meta": {
"title": "ModelSamplingSD3"
}
},
"12:4": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "kandinsky5lite_t2i.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"12:6": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "ae.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"12:7": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"12:1",
0
],
"text": "A three-quarter side profile shot captured from a slightly low, stationary camera angle, this image frames a joyful hiker against the jagged, dramatic peaks of the Dolomites, where the elevated perspective emphasizes both the grandeur of the alpine landscape and the upward, hopeful tilt of his gaze. He wears a snug, mustard-yellow knit beanie that matches his chunky, textured sweater, paired with round, wire-rimmed glasses that add a thoughtful, approachable charm, while a rugged, oversized hiking backpack in weathered taupe is secured across his shoulders with gray, adjustable straps, complemented by a utility waist belt with a small, functional pouch. The scene is enhanced by a warm, vintage-inspired filter that bathes the frame in rich golden-amber tones, boosting contrast between the hiker’s vibrant knitwear and the tawny mountain slopes, and a subtle film grain that lends a nostalgic, cinematic quality; soft, directional sunlight casts gentle shadows along his beard and sweater to add depth, with the crisp, saturated blue sky providing a striking counterpoint to the earthy foreground, creating an immersive portrait of adventure and warmth.\n"
},
"_meta": {
"title": "CLIP Text Encode (Positive Prompt)"
}
},
"12:8": {
"class_type": "KSampler",
"inputs": {
"cfg": 3.5,
"denoise": 1,
"latent_image": [
"12:18",
0
],
"model": [
"12:3",
0
],
"negative": [
"12:2",
0
],
"positive": [
"12:7",
0
],
"sampler_name": "euler",
"scheduler": "simple",
"seed": 297935044336751,
"steps": 50
},
"_meta": {
"title": "KSampler"
}
},
"12:9": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"12:8",
0
],
"vae": [
"12:6",
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)問答
目前流程針對英文與俄文提示詞最佳化,其他語言可能無法產生準確結果。
建議使用具備足夠 GPU 與記憶體的系統,以高效運行 Kandinsky 模型與文字編碼器。
請確保提示詞清楚且具描述性,並可嘗試不同表述以獲得更佳效果。