ComfyUI > Nodes > Plush-for-ComfyUI > Image & Text Switch

ComfyUI Node: Image & Text Switch

Class Name

ImgTextSwitch

Category
Plush/Utils
Author
glibsonoran (Account age: 2498days)
Extension
Plush-for-ComfyUI
Latest Updated
2024-06-19
Github Stars
0.11K

How to Install Plush-for-ComfyUI

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

Dynamic selection of text or image output based on input parameter for AI artists, streamlining content management.

Image & Text Switch:

The ImgTextSwitch node is designed to dynamically select and output either text or image data based on a specified input parameter. This node is particularly useful for AI artists who need to switch between multiple text and image inputs within their workflows. By providing a flexible mechanism to choose between different inputs, the ImgTextSwitch node helps streamline the creative process, allowing for more efficient and organized management of content. The primary function of this node is to return the selected text or image based on the active input parameter, ensuring that the desired content is easily accessible and ready for further processing or display.

Image & Text Switch Input Parameters:

active_input

This parameter determines which set of text and image inputs will be selected and output by the node. It accepts an integer value with a minimum of 1 and a maximum of 3, with a default value of 1. The active_input parameter is crucial as it dictates the node's behavior, allowing you to switch between different content sets based on your needs.

Text_1

This optional parameter allows you to input the first set of multiline text. It supports multiline text input and requires forced input, meaning you must provide a value if this parameter is used. This text will be selected if active_input is set to 1.

Image_1

This optional parameter allows you to input the first image. It accepts image data and has a default value of None. This image will be selected if active_input is set to 1.

Text_2

This optional parameter allows you to input the second set of multiline text. It supports multiline text input and requires forced input, meaning you must provide a value if this parameter is used. This text will be selected if active_input is set to 2.

Image_2

This optional parameter allows you to input the second image. It accepts image data and has a default value of None. This image will be selected if active_input is set to 2.

Text_3

This optional parameter allows you to input the third set of multiline text. It supports multiline text input and requires forced input, meaning you must provide a value if this parameter is used. This text will be selected if active_input is set to 3.

Image_3

This optional parameter allows you to input the third image. It accepts image data and has a default value of None. This image will be selected if active_input is set to 3.

Image & Text Switch Output Parameters:

Multiline Text

This output parameter returns the selected multiline text based on the active_input parameter. It provides the text content that corresponds to the chosen input set, allowing you to use this text in subsequent nodes or processes.

Image

This output parameter returns the selected image based on the active_input parameter. It provides the image content that corresponds to the chosen input set, allowing you to use this image in subsequent nodes or processes.

Image & Text Switch Usage Tips:

  • Ensure that the active_input parameter is set correctly to select the desired text or image input.
  • Provide values for the optional text and image parameters only if you intend to use them; otherwise, they can be left as None.
  • Use this node to manage and switch between different content sets efficiently, especially when working on complex projects with multiple text and image inputs.

Image & Text Switch Common Errors and Solutions:

Missing text and image input, check selection

  • Explanation: This error occurs when the selected input set (based on active_input) does not have any text or image data provided.
  • Solution: Ensure that the text and image parameters corresponding to the active_input value are not empty or None. Provide the necessary content for the selected input set.

Image & Text Switch Related Nodes

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