ComfyUI > Nodes > ComfyUI Fictiverse Nodes > If Image Valid

ComfyUI Node: If Image Valid

Class Name

If Image Valid

Category
Fictiverse
Author
Fictiverse (Account age: 1343days)
Extension
ComfyUI Fictiverse Nodes
Latest Updated
2026-04-26
Github Stars
0.02K

How to Install ComfyUI Fictiverse Nodes

Install this extension via the ComfyUI Manager by searching for ComfyUI Fictiverse Nodes
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI Fictiverse Nodes 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

If Image Valid Description

Selects valid image input or defaults to black, ensuring smooth workflow in image processing.

If Image Valid:

The "If Image Valid" node is designed to intelligently select between two image inputs based on their validity, ensuring that your workflow continues smoothly even when one of the images is missing or invalid. This node is particularly useful in scenarios where you have conditional image processing tasks and need to ensure that a valid image is always passed forward in the pipeline. By automatically choosing the first valid image it encounters, or defaulting to a black image if neither input is valid, it helps maintain the integrity of your image processing tasks without manual intervention. This functionality is crucial for AI artists who need to automate workflows and ensure consistent outputs without having to manually check each image's validity.

If Image Valid Input Parameters:

if_Valid

The if_Valid parameter is an optional input that accepts an image. This parameter is checked first to determine if it is a valid image. If it is valid, this image will be selected and passed as the output. There are no specific minimum or maximum values for this parameter, as it simply requires a valid image input. The default behavior is to check this image first before considering the else_Image.

else_Image

The else_Image parameter is another optional input that accepts an image. This parameter is used as a fallback option if the if_Valid image is not provided or is invalid. If the if_Valid image is not available, the node will check this parameter and use it if it is valid. Like if_Valid, there are no specific constraints on the values for this parameter, as it also requires a valid image input. If neither image is valid, the node defaults to generating a black image.

If Image Valid Output Parameters:

IMAGE

The output parameter, IMAGE, represents the selected image based on the validity of the input parameters. If the if_Valid image is provided and valid, it is returned as the output. If the if_Valid image is not valid or not provided, and the else_Image is valid, then the else_Image is returned. If neither input is valid, the node outputs a default black image. This ensures that the node always provides a valid image output, maintaining the continuity of your image processing workflow.

If Image Valid Usage Tips:

  • Use the if_Valid parameter to input the primary image you want to process, ensuring it is checked first for validity.
  • Utilize the else_Image parameter as a backup to provide an alternative image in case the primary image is not valid, ensuring your workflow does not break.

If Image Valid Common Errors and Solutions:

Invalid image file

  • Explanation: This error occurs when the provided image file is not valid or cannot be found.
  • Solution: Ensure that the image file paths are correct and that the files are accessible and in a supported format.

No valid image provided

  • Explanation: This error happens when neither if_Valid nor else_Image parameters are provided with a valid image.
  • Solution: Provide at least one valid image in either the if_Valid or else_Image parameter to ensure the node can output a valid image.

If Image Valid Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI Fictiverse Nodes
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.

If Image Valid