Sweet Tea Preview Video From Images:
SweetTeaPreviewVideoFromImages turns a batch of images into a single animated preview for Sweet Tea Studio. It encodes the frames once, stores the result in ComfyUI’s temporary directory, and publishes it as a preview without creating a duplicate file in the regular ComfyUI output directory. It supports several video containers and codecs, as well as GIF, so you can choose a preview format that suits your workflow. This is an output node: its purpose is to display the finished animation, not to pass a video into another node.
Sweet Tea Preview Video From Images Input Parameters:
images
The required IMAGE batch supplies the frames in playback order. The node encodes those images into one animation, so the batch determines what appears in the preview and how many frames it contains. No default, minimum, or maximum frame count is specified in the node interface; GIF encoding explicitly requires at least one frame.
frame_rate
Sets how many frames play per second. Image batches do not contain timing information, so this value determines the animation’s playback speed and, together with the frame count, its approximate duration. The default is 24.0 frames per second; the interface minimum is 1.0, the maximum is 120.0, and the step is 1.0. The node also rejects values that are not positive finite numbers.
format
Selects the output container—the type of file used for the temporary preview. Options are auto, mp4, mkv, webm, and gif; the default is mp4. Choose a format appropriate for where you intend to view the preview. Selecting gif uses GIF encoding, which does not support audio; the chosen format and codec must also be compatible.
codec
Selects how the animation is encoded within its container. Options are auto, h264, h265, nvenc_h264, av1, vp9, and gif; the default is auto. This choice affects which encoding path the node uses and whether it can produce the requested combination of settings. Selecting gif produces GIF output even if another format is selected; GIF cannot include audio. The custom WebM encoder accepts only av1 or vp9.
crf
Controls the encoder’s constant-quality setting when supported. The default is -1.0, the interface minimum is -1.0, the maximum is 100.0, and the step is 1.0. A value of -1.0 leaves CRF unset; nonnegative values are passed to the selected encoder. Because codecs can interpret quality settings differently, compare short previews before choosing a value for a longer animation.
bitrate_mbps
Requests a video bitrate in megabits per second on the custom encoding path. The default is 0.0, the interface minimum is 0.0, the maximum is 10000.0, and the step is 0.1. A value of 0.0 leaves bitrate unset. Setting a positive value switches applicable video output from native encoding to custom encoding, where the requested bitrate is applied; custom encoding currently accepts only sRGB color space.
pixel_format
Selects how encoded video pixels are represented. Options are auto, yuv420p, yuv420p10le, yuv444p, and yuv444p10le; the default is auto. Leaving it on auto allows the native path when the other settings qualify. Selecting an explicit pixel format switches applicable video output to custom encoding, where auto would otherwise use yuv420p for 8-bit output or yuv420p10le for 10-bit output. Explicit formats require sRGB on the custom path, and the requested format must be supported by the encoder.
bit_depth
Sets the video encoding depth. Options are auto, 8, and 10; the default is auto. With auto, the node chooses 8-bit for sRGB and 10-bit for HDR or HDR PQ. Choosing 8 or 10 overrides that automatic choice. Bit depth influences the encoded video’s color precision, but the chosen codec, pixel format, and encoding path must support the requested combination.
color_space
Specifies the color space passed to native video creation. Options are sRGB, HDR, and HDR PQ; the default is sRGB. This setting also affects automatic bit-depth selection: HDR and HDR PQ select 10-bit when bit_depth is auto. Non-sRGB color spaces require the native encoding path; custom encoding rejects them.
audio
An optional AUDIO input to accompany the animation. When connected, the node passes it to native video creation or includes it during custom video encoding. Audio is not supported for GIF output, so leave this input disconnected if you select gif as either the format or codec. No default audio clip is specified; leaving the input unconnected produces a preview without supplied audio.
Sweet Tea Preview Video From Images Output Parameters:
This node has no output sockets. Instead, it saves the encoded animation in ComfyUI’s temporary directory and returns preview information to the interface so Sweet Tea Studio can display it as an animated preview. There is no video value to connect to another node.
Sweet Tea Preview Video From Images Usage Tips:
- Start with
formatset tomp4,codecset toauto,pixel_formatset toauto,bitrate_mbpsset to0.0, andcolor_spaceset tosRGBif you do not need specific encoding controls. These settings qualify for the native encoding path. - Set
frame_rateto the speed at which you want the images displayed. For example, 48 frames at 24 frames per second make an animation of approximately two seconds. - Use
HDRorHDR PQonly with settings that keep the native path:codecmust beauto,h264, orav1;pixel_formatmust beauto; andbitrate_mbpsmust be0.0. - If you need an explicit pixel format, a positive bitrate, or a custom-path codec such as
h265orvp9, setcolor_spacetosRGB. For custom WebM output, chooseav1orvp9. - For a GIF preview, select
gifas the format or codec and disconnectaudio. GIF encoding does not include sound.
Sweet Tea Preview Video From Images Common Errors and Solutions:
Sweet Tea Preview Video From Images requires a ComfyUI build with native VIDEO support
- Explanation: The node could not import the native video components it needs before encoding begins.
- Solution: Use a ComfyUI build that includes native VIDEO support, then restart ComfyUI and try again.
frame_rate must be a positive finite number
- Explanation: The playback rate is zero, negative, or not a usable number.
- Solution: Enter a valid positive frame rate within the interface range of
1.0to120.0.
GIF output does not support audio
- Explanation: You selected
gifas the format or codec while an audio input is connected. - Solution: Disconnect
audioto make a GIF, or select a supported video format and codec if you need sound.
GIF output requires at least one image frame
- Explanation: The
imagesbatch is empty, so there is nothing to put in the GIF. - Solution: Connect an image batch containing at least one frame.
Custom H.265/NVENC/VP9 output currently supports sRGB only
- Explanation: The selected settings require custom encoding, but
color_spaceisHDRorHDR PQ. This restriction also applies when an explicit pixel format or positive bitrate selects the custom path. - Solution: Set
color_spacetosRGB, or usecodecset toauto,h264, orav1withpixel_formatset toautoandbitrate_mbpsset to0.0for the native path.
Custom WebM encoding requires AV1 or VP9
- Explanation: Custom encoding was selected for
webmwith an incompatible codec. - Solution: Select
av1orvp9for custom WebM output, or choose a different compatible format and codec combination.
Unsupported custom video codec: ...
- Explanation: The custom encoder does not recognize the codec it was asked to use. For example, settings that force the custom path may leave
codecset toauto. - Solution: Select a specific codec supported by the custom encoder, or return
pixel_formattoautoandbitrate_mbpsto0.0soautocan use the native path.
Sweet Tea video encoding requires ComfyUI's PyAV and NumPy runtime
- Explanation: Custom video encoding cannot start because PyAV or NumPy is unavailable.
- Solution: Restore the required packages in your ComfyUI environment, or use settings that qualify for native encoding.
GIF output requires Pillow, which is included with ComfyUI
- Explanation: GIF encoding cannot start because Pillow is unavailable.
- Solution: Restore Pillow in your ComfyUI environment, or select a video format instead of GIF.
Sweet Tea video output requires a native ComfyUI VIDEO input
- Explanation: Native encoding did not receive a video object that supports saving to a file.
- Solution: Check that your ComfyUI installation has working native VIDEO support, update or repair that installation if needed, and retry.
