Krea-2:文本生成图像

This workflow turns text prompts into images using Krea-2 Turbo, a distilled text-to-image model designed for speed and expressive, stylized results. It includes a ResolutionSelector so you can switch aspect ratios without touching width/height by hand, optional style LoRAs for creative control, and a SaveImage node that writes finished renders to your ComfyUI/output folder. A MarkdownNote in the graph links to the official Krea-2 model and LoRA resources so you can install the exact files the graph expects.

Technically, your prompt flows into the Krea‑2 Turbo inference node (b0e5ca93-2731-42b9-8e0a-d28ea851ff81), which loads a diffusion checkpoint such as krea2_turbo_fp8_scaled.safetensors. If you select one or more LoRAs from ComfyUI/models/loras, those adapters are applied during sampling to steer style. The ResolutionSelector subgraph outputs a matched width/height pair to the Krea‑2 node so you can generate at common sizes reliably. The image tensor then routes to SaveImage, which saves numbered files and embeds metadata for reproducibility. The graph is grouped into a compact subgraph so you can work from a single control surface instead of hunting through nodes.

It’s especially useful for concept art and visual brainstorming: start with a general idea, toggle a style LoRA to explore different looks, iterate seeds, and lock a resolution preset for downstream design work. For best control, include any LoRA trigger words in your prompt and start with a moderate LoRA weight (around 0.6), then fine‑tune from there. See the linked Krea‑2 and LoRA docs for model variants and style lists.

API

通过代码使用此工作流

每个 Comfy 工作流都是一个 JSON 图。下面的内容就是此工作流的完整数据,ComfyUI 运行时也是如此——你可以从该 URL 获取、放入版本控制,或在 ComfyUI 中加载并逐节点运行。

11657ed32877.json
正在获取工作流 JSON…

使用 Comfy SDK 从 TypeScript 或 Python 运行。相同代码可用于 Comfy Cloud 或你自托管的 ComfyUI——只需更改基础 URL。

// Install (beta)
npm i @comfyorg/sdk

// Run this workflow (TypeScript)
import { Comfy } from "@comfyorg/sdk";

const client = new Comfy({ apiKey: "comfyui-..." });
const wf = await client.workflows.fromFile("workflow_api.json");
const job = await client.run(wf);
await job.getOutputs("<output-node-id>")[0].toFile("output.png");

SDK 需要 API 格式的工作流:在 ComfyUI 中打开此工作流,使用 文件 → 导出工作流(API)。

Comfy Cloud API 访问需要包含 API 密钥的套餐。

常见问题

常见问题

查看所有工作流
Showing 30 of 30 templates