Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > ComfyUI_Swwan > Preview Animation (Swwan)

ComfyUI Node: Preview Animation (Swwan)

Class Name

SwwanPreviewAnimation

Category
Swwan/Advanced/IO
Author
aining2022 (Account age: 899days)
Extension
ComfyUI_Swwan
Latest Updated
2026-11-05
Github Stars
0.04K

How to Install ComfyUI_Swwan

Install this extension via the ComfyUI Manager by searching for ComfyUI_Swwan
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI_Swwan in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Preview Animation (Swwan) Description

Creates a temporary animated WebP preview of image or mask frames to check motion and timing.

Preview Animation (Swwan):

SwwanPreviewAnimation creates a temporary animated WebP preview from a sequence of frames, making it useful for checking motion and timing without setting up a separate export step. It can preview image frames, grayscale mask frames, or a combination of the two. The preview is saved as a lossy WebP at quality 50 and displayed through the node’s interface; it is intended for review rather than as a final-quality animation export.

Preview Animation (Swwan) Input Parameters:

fps

Controls playback speed in frames per second. A higher value makes the animation play faster, while a lower value gives each frame more time on screen. The default is 8.0, the minimum is 0.01, the maximum is 1000.0, and the interface step is 0.01. The node calculates each frame’s duration as int(1000.0 / fps) milliseconds, so extremely high values can round the duration down to zero; moderate values are more practical for inspecting motion.

images

An optional IMAGE batch to use as the animation frames, in batch order. If you connect images without masks, each image becomes a frame. If you connect both images and masks, the node uses the masks to create white overlays on image frames. There is no default image, minimum, or maximum specified for this input.

masks

An optional MASK batch. If you connect masks without images, each grayscale mask becomes a frame. When you connect both inputs, the node applies each mask as the transparency of a white layer composited over an image: brighter mask areas produce more visible white, while darker areas reveal more of the underlying image. The code does not establish reliable one-to-one pairing for every combination of image and mask batch lengths, so use matching batch sizes and inspect the resulting preview. There is no default mask, minimum, or maximum specified for this input.

Preview Animation (Swwan) Output Parameters:

This node has no output sockets. It is an output node: rather than passing a value to another node, it saves a temporary WebP preview and returns information for the interface to display it, including whether the preview has more than one frame and a text summary of the frame count and first frame’s dimensions.

Preview Animation (Swwan) Usage Tips:

  • Connect an IMAGE batch to review an image sequence, or a MASK batch to review masks as grayscale frames. Connect both when you want to see the node’s white mask overlay on images.
  • Start with the default 8 fps, then lower it to inspect changes between frames or raise it to check faster motion. Avoid extremely high values because frame duration is rounded down to a whole number of milliseconds.
  • Use frames with consistent dimensions. When combining images and masks, make sure their dimensions match so the mask can be applied to the image.
  • Treat the temporary WebP as a quick preview, not a final export: the node saves it with lossy compression at quality 50.

Preview Animation (Swwan) Common Errors and Solutions:

PreviewAnimation: No images or masks provided

  • Explanation: Neither optional frame input is connected, so the node has nothing to preview and returns an empty interface result.
  • Solution: Connect an IMAGE batch, a MASK batch, or both.

ValueError: range() arg 3 must not be zero

  • Explanation: A connected input contains no frames. The node uses the frame count as the step in a loop, which fails when that count is zero.
  • Solution: Check that the connected batch contains at least one image or mask before running the node.

ValueError: images do not match

  • Explanation: An image and mask have different dimensions, so the white mask layer cannot be composited onto that image.
  • Solution: Resize or generate the images and masks at matching widths and heights before connecting them.

WebP save or file-writing error

  • Explanation: The node could not save its temporary .webp preview. The exact message depends on the image library and file system; possible causes include frames with incompatible dimensions or an unavailable or unwritable temporary folder.
  • Solution: Check that every frame has the same dimensions, then verify that the application can write to its temporary folder.

Preview Animation (Swwan) Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI_Swwan
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

Preview Animation (Swwan)