Krea 2: Style Reference

This ComfyUI workflow demonstrates style-conditioned text-to-image generation using the Krea v2 API. You provide one or more style reference images and a text prompt; the graph extracts a style representation from your references with Krea2StyleReferenceNode and uses it to guide image synthesis in Krea2ImageNode. The output is a new image that fulfills your prompt while inheriting the aesthetic from your reference images. LoadImage supplies the style inputs, Krea2StyleReferenceNode encodes them into a style signal, Krea2ImageNode performs the generation request to Krea’s API, and SaveImage writes the result to disk. A MarkdownNote is included to annotate the graph with usage tips.

Technically, the data flows as follows: one or more images from LoadImage feed into Krea2StyleReferenceNode, which produces a style reference output (an embedding/handle) that conditions the generator. Krea2ImageNode combines this style reference with your text prompt and generation settings (e.g., size and other parameters exposed in the node) to create the final image on the Krea backend. You can chain multiple input images through the style node(s) to blend influences from different sources, enabling nuanced control over palette, texture, and overall look while keeping the content determined by your prompt.

API

Use this workflow from code

Every Comfy workflow is a JSON graph. The payload below is this workflow, exactly as ComfyUI runs it — fetch it from the URL, keep it in version control, or load it in ComfyUI and run it node by node.

fd76422c14ea.json
Fetching workflow JSON…

Run it from TypeScript or Python with the Comfy SDK. The same code targets Comfy Cloud or a ComfyUI you host yourself — only the base URL changes.

// 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");

The SDK takes a workflow in API format: open this workflow in ComfyUI and use File → Export Workflow (API).

Comfy Cloud API access requires a plan with an API key.

FAQ

Frequently Asked Questions

View all workflows
Showing 30 of 30 templates