
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.
GET https://comfy.org/workflows/download/9f0b568bf8a1.jsonFetching workflow JSON…
Run it from Python or TypeScript with the Comfy SDK. The same code targets Comfy Cloud or a ComfyUI you host yourself — only the base URL changes.
# Install (beta)
pip install comfy-sdk # Python
npm i @comfyorg/sdk # TypeScript
# Run this workflow (Python)
from comfy_sdk import Comfy
client = Comfy(api_key="comfyui-...")
wf = client.workflows.from_file("workflow_api.json")
job = client.run(wf)
for output in job.get_outputs("<output-node-id>"):
output.to_file(output.name)The SDK takes a workflow in API format: open this workflow in ComfyUI and use File → Export Workflow (API). API access requires a Comfy Cloud plan with an API key. SDK docs · Get an API key
FAQ














