This ComfyUI workflow is designed to facilitate style transfer in text-to-image generation using the Recraft model. By uploading 1-5 style reference images, users can create a unique style ID, which is then used to generate images that maintain a consistent aesthetic. The workflow leverages several key nodes, including LoadImage for importing style references, RecraftCreateStyleNode for generating the style ID, and RecraftTextToImageNode for the final image generation. This setup is particularly useful for creators looking to produce on-brand visual content efficiently. The ability to reuse a style ID across multiple projects ensures that the visual output remains consistent, making it ideal for branding and marketing purposes.
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.
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 "Style Transfer - Recraft Text-to-Image" (TypeScript)
import { Comfy } from "@comfyorg/sdk";
const client = new Comfy({ apiKey: "comfyui-..." });
// This workflow, exported in API format (see note below)
const wf = await client.workflows.fromFile("template-recraft_create_style_api.json");
const asset = client.assets.fromFile("input.png");
wf.setInput("23", "image", asset); // LoadImage
const job = await client.run(wf);
await job.getOutputs("37")[0].toFile("output.png"); // SaveImageThe 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














