SaveAnimatedWEBP:
The SaveAnimatedWEBP node is designed to save a sequence of images as an animated WEBP file. This node is particularly useful for AI artists who want to create smooth, high-quality animations from a series of generated images. The WEBP format is known for its efficient compression and high quality, making it an excellent choice for animations that need to be both visually appealing and optimized for web use. By using this node, you can easily convert a batch of images into a single animated file, complete with customizable settings for frame rate, quality, and more. This node simplifies the process of creating animations, allowing you to focus on the creative aspects of your work.
SaveAnimatedWEBP Input Parameters:
filename
The filename parameter specifies the base name for the output animated WEBP file. This name will be used as the prefix for the saved file, and the node will automatically append a counter and the .webp extension to it. This helps in organizing and identifying the output files easily. There is no strict format for the filename, but it should be a valid string that can be used in file paths.
full_output_folder
The full_output_folder parameter defines the directory where the animated WEBP file will be saved. This should be a valid path on your system where you have write permissions. Ensuring the correct output folder is crucial for easy access and organization of your generated animations.
pil_images
The pil_images parameter is a list of images in the PIL (Python Imaging Library) format that will be used to create the animation. Each image in the list represents a frame in the final animated WEBP file. The order of images in the list determines the sequence of frames in the animation.
fps
The fps (frames per second) parameter controls the frame rate of the animation. It determines how many frames will be displayed per second in the final animated WEBP file. A higher fps value results in a smoother animation but may increase the file size. The value should be an integer, typically ranging from 1 to 60.
metadata
The metadata parameter allows you to include additional information in the animated WEBP file, such as EXIF data. This can be useful for embedding details about the animation, like the creation date, author, or any other relevant information. The metadata should be provided in a dictionary format.
lossless
The lossless parameter is a boolean flag that determines whether the animation should be saved in a lossless format. When set to True, the animation will be saved without any loss of quality, which may result in a larger file size. When set to False, the animation will be compressed, potentially reducing the file size at the cost of some quality loss.
quality
The quality parameter controls the compression quality of the animated WEBP file. It is an integer value typically ranging from 0 (lowest quality, highest compression) to 100 (highest quality, lowest compression). Adjusting this parameter allows you to balance between file size and visual quality.
method
The method parameter specifies the compression method to be used for the animated WEBP file. Different methods may offer various trade-offs between compression speed and efficiency. The exact options for this parameter can vary, but common values include integers representing different compression algorithms or strategies.
SaveAnimatedWEBP Output Parameters:
ui
The ui parameter is a dictionary containing information about the saved animated WEBP file. It includes details such as the filename, subfolder, and type of the saved file. This information is useful for further processing or referencing the output file in subsequent steps of your workflow.
animated
The animated parameter is a boolean flag indicating whether the output file is an animated WEBP. This is particularly useful for distinguishing between static and animated outputs, ensuring that the correct type of file is being handled in your workflow.
SaveAnimatedWEBP Usage Tips:
- Ensure that the
pil_imageslist is correctly ordered to achieve the desired animation sequence. - Adjust the
fpsparameter to control the smoothness of your animation; higher values result in smoother animations. - Use the
qualityparameter to find a balance between file size and visual quality, especially if the animation will be used on the web. - Set the
losslessparameter toTrueif maintaining the highest possible quality is crucial, but be aware of the larger file size.
SaveAnimatedWEBP Common Errors and Solutions:
"Permission denied: '/path/to/output/folder'"
- Explanation: This error occurs when the specified output folder does not have write permissions.
- Solution: Ensure that you have the necessary write permissions for the output folder or choose a different folder where you have write access.
"Invalid image format in pil_images"
- Explanation: This error occurs when one or more images in the
pil_imageslist are not in the correct PIL format. - Solution: Verify that all images in the
pil_imageslist are valid PIL images and are correctly loaded before passing them to the node.
"Invalid fps value"
- Explanation: This error occurs when the
fpsparameter is set to a non-integer or an out-of-range value. - Solution: Ensure that the
fpsparameter is an integer within a reasonable range, typically between 1 and 60.
"Quality parameter out of range"
- Explanation: This error occurs when the
qualityparameter is set to a value outside the acceptable range of 0 to 100. - Solution: Adjust the
qualityparameter to be within the range of 0 to 100.
