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.

GET https://comfy.org/workflows/download/fe5600667e2c.json
Fetching 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 "Sprite Sheet Generator" (Python)
from comfy_sdk import Comfy

client = Comfy(api_key="comfyui-...")

# This workflow, exported in API format (see note below)
wf = client.workflows.from_file("templates-sprite_sheet_api.json")

asset = client.assets.from_file("input.png")
wf.set_input("76", "image", asset)  # LoadImage

job = client.run(wf)
for output in job.get_outputs("37"):  # SaveImage
    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

Frequently Asked Questions

View all workflows
Character
Cinematic
Image to Video
Lip Sync
Multiple Angles
Portrait
Style Reference
Style Transfer
Text to Video
Video Generation
Video
Showing 30 of 30 templates