Aseprite Animation Preview
Play the animation before you commit to it
- spritesheet
- animation_frames
- frame_names
- frame_delay_ms
- report
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'danimation_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.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| spritesheet | IMAGE | — | |
| aseprite_json | STRING | — | |
| animation_name | STRING | idle | — |
| image_index | INT | 00–4096 | — |
| loop_count | INT | 11–64 | — |
| include_pingpong_endpoint | BOOLEAN | false | — |
| background_value | FLOAT | 0.000–1 | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| animation_frames | IMAGE | — |
| frame_names | STRING | — |
| frame_delay_ms | INT | — |
| report | STRING | — |