
This ComfyUI workflow generates anime characters and anime-style scenes from text prompts using a classic Stable Diffusion pipeline. In Step 1 (Load Models), UNETLoader, CLIPLoader, and VAELoader load your chosen anime-tuned checkpoint, text encoder, and VAE. Step 2 (Image Size (1MP)) uses ResolutionSelector to set an efficient, 1‑megapixel canvas, which then feeds EmptyLatentImage to create a latent noise tensor at the selected dimensions. Step 3 (Prompt) processes your positive and negative prompts through CLIPTextEncode, and KSampler iteratively denoises the latent with the UNet, guided by your prompts and sampler settings. Finally, VAEDecode turns the denoised latent into a full-resolution image and SaveImage writes the output to disk.
Technically, the core of the generation happens in KSampler, which accepts the UNet weights (UNETLoader), text embeddings (CLIPTextEncode), and an initial noise latent (EmptyLatentImage). The ResolutionSelector ensures the latent size stays near 1 MP for speed and quality balance—ideal for anime linework and clean shading. The VAE you load matters: it defines how colors and fine details are encoded/decoded. CLIPTextEncode supports positive and negative prompts, so you can include quality tags and style hints (e.g., "masterpiece, anime, dramatic lighting") while excluding defects (e.g., "worst quality, blurry, jpeg artifacts"). This combination delivers crisp, stylized anime art with consistent control over composition, detail, and style.
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 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













