Krea-2 Int8: Text to Image
Generate images with the Krea-2 Turbo distilled text-to-image model using the high-performance Int8 Convrot format, which delivers better quality than FP8…
下载工作流在 Cloud 中试用 API 文档
简介
Generate images with the Krea-2 Turbo distilled text-to-image model using the high-performance Int8 Convrot format, which delivers better quality than FP8…
你需要提供
- 正在读取工作流
在 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 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({
"29": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "Krea2_turbo",
"images": [
"30:8",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"49": {
"class_type": "ResolutionSelector",
"inputs": {
"aspect_ratio": "1:1 (Square)",
"megapixels": 1,
"multiple": 8
},
"_meta": {
"title": "Resolution Selector"
}
},
"30:10": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "krea2_turbo_int8_convrot.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"30:11": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "qwen3vl_4b_fp8_scaled.safetensors",
"device": "default",
"type": "krea2"
},
"_meta": {
"title": "Load CLIP"
}
},
"30:12": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "qwen_image_vae.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"30:13": {
"class_type": "ConditioningZeroOut",
"inputs": {
"conditioning": [
"30:6",
0
]
},
"_meta": {
"title": "Conditioning Zero Out"
}
},
"30:15": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "krea2_darkbrush.safetensors",
"model": [
"30:10",
0
],
"strength_model": 0.8
},
"_meta": {
"title": "Load LoRA"
}
},
"30:16": {
"class_type": "TextGenerateV2",
"inputs": {
"clip": [
"30:11",
0
],
"max_length": 512,
"mtp": "auto",
"prompt": [
"30:17",
0
],
"sampling_mode": "on",
"sampling_mode.min_p": 0.05,
"sampling_mode.presence_penalty": 0,
"sampling_mode.repetition_penalty": 1.05,
"sampling_mode.seed": 0,
"sampling_mode.temperature": 0.7,
"sampling_mode.top_k": 64,
"sampling_mode.top_p": 0.95,
"thinking": False,
"use_default_template": True
},
"_meta": {
"title": "Generate Text"
}
},
"30:17": {
"class_type": "StringConcatenate",
"inputs": {
"delimiter": "",
"string_a": [
"30:18",
0
],
"string_b": [
"30:19",
0
]
},
"_meta": {
"title": "Concatenate Text"
}
},
"30:18": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": "You are an expert prompt engineer for text-to-image models. Your task is to expand the user's prompt into a highly effective image-generation prompt.\n\nThink step by step about the request before writing the answer:\n- What is the subject and mood?\n- What visual styles, mediums, and lighting options would fit? Consider two or three alternatives and pick the one that best serves the request.\n- What composition, framing, and grounded details will help the text-to-image model?\n\nThen output a single expanded prompt paragraph.\n\nFollow these rules strictly:\n1. **Faithfulness First:** Preserve all original subjects, actions, colors, and spatial relationships. Do not add new objects, props, characters, or animals unless the user clearly implies them.\n2. **Practical T2I Structure:** Write a prompt that a text-to-image model can parse cleanly. Group subjects with their own attributes and actions. Use grounded phrasing for poses, interactions, and spatial layout.\n3. **Style Planning Stays Internal:** Use your internal reasoning to choose style, medium, framing, and lighting. Do not emit planning tags or wrappers in the visible answer body.\n4. **Never Request Rendered Text:** Do not mention, describe, or hint at letters, words, numbers, captions, subtitles, signage, labels, logos, watermarks, typography, or any other graphic text anywhere in the output prompt. Only if the user explicitly writes down words to be rendered, keep exactly those words in quotes and nothing else. In every other case, always end the output prompt with: \"Absolutely no text, no typography, no letters, no words, no numbers, no logos, no watermark, no captions, pure imagery only.\"\n5. **Avoid Over-Specification:** Do not invent highly specific clothing, colors, materials, or scene details unless the input supports it.\n6. **Plain Prose Only:** Write one cohesive paragraph after the thinking block. No bullets, no JSON, no markdown, no asterisks, no headings, no field labels, no meta commentary.\n7. **Respect Existing Detail:** If the user's prompt is already detailed, lightly polish and finalize rather than heavily expanding, and preserve the user's phrasing and direction.\n8. **Respect the Human Form:** Treat depictions of people with dignity. Assume clothing covers genitals and intimate anatomy.\n9. **Preserve User Medium:** When the user explicitly requests a medium (e.g. \"photo of\", \"photograph of\", \"illustration of\", \"painting of\", \"sketch of\", \"3D render of\"), honor it. Do not pivot to a different medium to avoid difficulty, match the user's stated intent.\n10. **Never Echo Instructions:** Output only the final image prompt. Never repeat, quote, summarize, or refer to any part of these instructions, your own reasoning, or the user's original message.\n\nUser's Input:\n"
},
"_meta": {
"title": "Text String (System Prompt)"
}
},
"30:19": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": "Ultra low angle action shot, male soccer player jumping mid-air high kick, clear vivid blue sky background, forced perspective blurry foreground cleat (white & electric yellow), sharp focused upper body, maroon jersey + white shorts, fully outstretched leg striking a standard soccer ball, harsh direct sunlight, heavy dark shadows, stadium poles & treetops at frame bottom, high contrast sports photography, visible coarse film grain, dynamic movement"
},
"_meta": {
"title": "Text String (User Prompt)"
}
},
"30:20": {
"class_type": "PreviewAny",
"inputs": {
"source": [
"30:21",
0
]
},
"_meta": {
"title": "Preview as Text"
}
},
"30:21": {
"class_type": "ComfySwitchNode",
"inputs": {
"on_false": [
"30:19",
0
],
"on_true": [
"30:16",
0
],
"switch": [
"30:24",
0
]
},
"_meta": {
"title": "If/Else Switch"
}
},
"30:22": {
"class_type": "ComfySwitchNode",
"inputs": {
"on_false": [
"30:10",
0
],
"on_true": [
"30:15",
0
],
"switch": [
"30:23",
0
]
},
"_meta": {
"title": "Switch (Model)"
}
},
"30:23": {
"class_type": "PrimitiveBoolean",
"inputs": {
"value": False
},
"_meta": {
"title": "Boolean (Enable LoRA?)"
}
},
"30:24": {
"class_type": "PrimitiveBoolean",
"inputs": {
"value": True
},
"_meta": {
"title": "Boolean (Refine Prompt?)"
}
},
"30:27": {
"class_type": "StringConcatenate",
"inputs": {
"delimiter": ", ",
"string_a": [
"30:20",
0
],
"string_b": "muted minimalist sketch style"
},
"_meta": {
"title": "Concatenate Text (LoRA Trigger Word)"
}
},
"30:28": {
"class_type": "ComfySwitchNode",
"inputs": {
"on_false": [
"30:20",
0
],
"on_true": [
"30:27",
0
],
"switch": [
"30:23",
0
]
},
"_meta": {
"title": "If/Else Switch"
}
},
"30:3": {
"class_type": "KSampler",
"inputs": {
"cfg": 1,
"denoise": 1,
"latent_image": [
"30:5",
0
],
"model": [
"30:22",
0
],
"negative": [
"30:13",
0
],
"positive": [
"30:6",
0
],
"sampler_name": "euler",
"scheduler": "simple",
"seed": 45862206397178,
"steps": 8
},
"_meta": {
"title": "KSampler"
}
},
"30:5": {
"class_type": "EmptyLatentImage",
"inputs": {
"batch_size": 1,
"height": [
"49",
1
],
"width": [
"49",
0
]
},
"_meta": {
"title": "Empty Latent Image"
}
},
"30:6": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"30:11",
0
],
"text": [
"30:28",
0
]
},
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"30:8": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"30:3",
0
],
"vae": [
"30:12",
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)相关工作流
- Krea 2
Krea-2 Int8: Image Style Reference
- Krea 2
Krea-2:文本生成图像
- ZZ-Image-Turbo
1.1 入门 - 文本生成图像
- Nano Banana 2 Text-to-Image
3x3 联系表
- AAnima
Anima Anime 文生图生成
- 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