The Sprite Sheet Generator workflow in ComfyUI is designed to transform a single sprite image into a comprehensive set of animation frames, including idle, attack, walk, and jump sequences. This workflow leverages advanced nodes such as LoadImage, GeminiImage2Node, and BatchImagesNode to efficiently process and segment the sprite into individual frames. By utilizing models like Google and Nano Banana Pro, the workflow ensures high-quality output that is suitable for various animation needs. Custom nodes like comfyui-kjnodes and comfyui_layerstyle further enhance the workflow by providing specialized processing capabilities.

Technically, the workflow begins by loading the sprite image using the LoadImage node. It then processes the image through a series of nodes that include PrimitiveInt and PrimitiveNode for parameter adjustments, ensuring the sprite is correctly segmented into frames. Nodes such as e6bcb358-3fee-47eb-8c25-30eeee20d90e and 79dc3651-3ca7-4d1d-9246-9a951b834ab9 play critical roles in defining the animation sequences, while SaveImage and SaveVideo nodes handle the output of individual frames and compiled animations. This workflow is particularly useful for game developers and animators who need to quickly generate sprite animations without manually editing each frame.

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.

templates-sprite_sheet.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 "Sprite Sheet Generator" (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("templates-sprite_sheet_api.json");

const asset = client.assets.fromFile("input.png");
wf.setInput("76", "image", asset); // LoadImage

const job = await client.run(wf);
await job.getOutputs("37")[0].toFile("output.png"); // SaveImage

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