Nodes/comfyui-game-assets-maker/Aseprite Animation Preview
ComfyUI Node

Aseprite Animation Preview

Play the animation before you commit to it

By quinteroac·Created 4 months ago·Updated 4 months ago· 21
Aseprite Animation Preview
  • spritesheet
  • animation_frames
  • frame_names
  • frame_delay_ms
  • report
aseprite_json
animation_nameidle
image_index0
loop_count1
include_pingpong_endpointfalse
background_value0.00

You've got a spritesheet and an Aseprite JSON with frame tags. GameAssets_AsepriteAnimationPreview is where it finally moves: it extracts one named animation, resolves its playback order, and hands you the frames as an IMAGE batch plus the frame delay in milliseconds. Feed that into a preview or a GIF/WebP saver and you'll see the animation your tags describe.

It's from comfyui-game-assets-maker - the pack quinteroac shared on r/comfyui as a playground for sprite generation - and it's the natural downstream of Aseprite Animation Atlas or Aseprite Animation Tags. If you only install a couple of nodes from this pack, this and the atlas generator are the pair that make animation prototyping feel real.

How it works

Give it the spritesheet IMAGE, the atlas JSON, and an animation_name. It finds that tag in meta.frameTags, then resolves the frame order the way Aseprite's own export does: forward (from..to), reverse (to..from), or pingpong (there and back). If the tag isn't found it falls back to the first tag, so a typo degrades gracefully instead of erroring.

Two details worth knowing. loop_count repeats the resolved sequence that many times - useful if your animation is 4 frames but your preview loop is 8. And include_pingpong_endpoint controls whether a pingpong loop repeats the turnaround frame; Aseprite has a checkbox for exactly this, and the default (false) matches its typical output.

Each extracted frame gets the transparent areas filled with background_value (0–1, default 0 = black) so the batch is uniform. image_index selects which image in the batch is the sheet.

Inputs

The ones a beginner actually touches: spritesheet, aseprite_json, animation_name ("idle", "run", whatever the tag is called), and loop_count. The rest have sane defaults.

Outputs

  • animation_frames - the IMAGE batch, in playback order. Wire to Preview Image, or to an animated WebP/GIF/video saver.
  • frame_names - each frame's name.
  • frame_delay_ms - the average frame duration from the atlas (int, ms). Some savers want per-frame delays; this gives you a single value that works for a uniform-timing loop.
  • report - which tag was selected, the direction, resolved frame indexes, and the available tags (great for debugging a typo'd animation_name).

Installing

ComfyUI Manager (search "comfyui-game-assets-maker") or:

cd ComfyUI/custom_nodes
git clone https://github.com/quinteroac/ComfyUI-GameAssetsMaker.git
cd ComfyUI-GameAssetsMaker
pip install -r requirements.txt

Restart after. Only dependency is opencv-python; no model downloads.

Where people get burned

The animation only looks right if the spritesheet and the tag ranges agree - if your sheet has frames in a different order than the tags assume, you'll see the wrong cells animate. The report output is your friend there: check the resolved frame indexes against the actual layout. And remember frame_delay_ms is an average; if your atlas mixes durations, per-frame timing is on you.

CategoryGame Assets/Aseprite

Inputs (7)

NameTypeDefaultDescription
spritesheetIMAGE
aseprite_jsonSTRING
animation_nameSTRINGidle
image_indexINT00–4096
loop_countINT11–64
include_pingpong_endpointBOOLEANfalse
background_valueFLOAT0.000–1

Outputs (4)

NameTypeDescription
animation_framesIMAGE
frame_namesSTRING
frame_delay_msINT
reportSTRING