ComfyUI > Nodes > ComfyUI-JNodes > Image Format Selector

ComfyUI Node: Image Format Selector

Class Name

JNodes_ImageFormatSelector

Category
None
Author
JaredTherriault (Account age: 3626days)
Extension
ComfyUI-JNodes
Latest Updated
2024-08-11
Github Stars
0.03K

How to Install ComfyUI-JNodes

Install this extension via the ComfyUI Manager by searching for ComfyUI-JNodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-JNodes 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
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Image Format Selector Description

Efficiently select output image formats with flexibility and user-friendly automation using JNodes_ImageFormatSelector.

Image Format Selector:

The JNodes_ImageFormatSelector node is designed to help you select the desired image format for your output files in a streamlined and efficient manner. This node is particularly useful when working with various image formats, allowing you to choose the appropriate format based on your specific needs. Whether you are looking to save images in a specific format or need to automate the selection process based on certain criteria, this node provides a flexible and user-friendly solution. By leveraging this node, you can ensure that your images are saved in the correct format, enhancing the overall workflow and output quality.

Image Format Selector Input Parameters:

format

This parameter allows you to specify the image format you want to use. The available options are defined by JNODES_IMAGE_FORMAT_TYPES, which typically include formats like "image/gif", "image/webp", and "image/apng". Selecting the correct format is crucial as it determines the file type and the associated properties of the saved image.

mode

The mode parameter determines how the format is selected. It offers three options: "select", "seed", and "index". "Select" allows you to manually choose the format, "seed" uses a seed value to randomly select a format, and "index" selects a format based on a specific index. This flexibility enables you to automate the format selection process based on your workflow requirements.

seed

This parameter is used when the mode is set to "seed". It is an integer value that serves as the seed for the random selection process. The default value is 0, and it can go up to 0xffffffffffffffff. The seed ensures that the random selection is reproducible, allowing for consistent results across different runs.

Image Format Selector Output Parameters:

format

This output parameter returns the selected image format. It reflects the format chosen based on the input parameters, ensuring that the subsequent nodes in your workflow receive the correct format for processing.

STRING

This output parameter provides a string representation of the selected format. It is useful for logging, debugging, or any other purpose where a textual representation of the format is required.

Image Format Selector Usage Tips:

  • When you need a specific image format, use the "select" mode to manually choose the format.
  • Utilize the "seed" mode with a specific seed value to ensure consistent random selection of formats across different runs.
  • Use the "index" mode to select a format based on its position in the list of available formats, which can be useful for batch processing.

Image Format Selector Common Errors and Solutions:

Invalid format selected

  • Explanation: The selected format is not part of the JNODES_IMAGE_FORMAT_TYPES.
  • Solution: Ensure that the format parameter is set to one of the valid options defined in JNODES_IMAGE_FORMAT_TYPES.

Seed value out of range

  • Explanation: The seed value provided is outside the acceptable range.
  • Solution: Ensure that the seed value is an integer between 0 and 0xffffffffffffffff.

Mode not recognized

  • Explanation: The mode parameter is set to an unrecognized value.
  • Solution: Set the mode parameter to one of the valid options: "select", "seed", or "index".

Image Format Selector Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-JNodes
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.