Nodes/VRGameDevGirl Video Enhancement Nodes/VRGDG Image Switch (Multi Dynamic)
ComfyUI Node

VRGDG Image Switch (Multi Dynamic)

Up to 50 images on one switch, with a Refresh Inputs button

By vrgamegirl19·Created about a year ago·Updated a day ago· 742
VRGDG Image Switch (Multi Dynamic)
  • image1
  • image2
  • image3
  • image4
  • image5
  • image6
  • image7
  • image8
  • image9
  • image10
  • image11
  • image12
  • image13
  • image14
  • image15
  • image16
  • image17
  • image18
  • image19
  • image20
  • image21
  • image22
  • image23
  • image24
  • image25
  • image26
  • image27
  • image28
  • image29
  • image30
  • image31
  • image32
  • image33
  • image34
  • image35
  • image36
  • image37
  • image38
  • image39
  • image40
  • image41
  • image42
  • image43
  • image44
  • image45
  • image46
  • image47
  • image48
  • image49
  • image50
  • image
◄index1►
◄image_count4►

When your reference-image pool grows past four, the fixed-slot switches stop cutting it. VRGDG Image Switch (Multi Dynamic) is the pack's big selector: set image_count anywhere from 1 to 50, click Refresh Inputs, and the node grows the exact number of image ports you asked for. Then one index string - 1,2,5, or the word all - picks which of them come out.

How it works. The node ships with image_count (default 4) and an index string. Bump image_count and refresh, and the optional image inputs materialize to match - no more staring at 46 dead ports when you only need six. Selection follows the pack's string-index convention: a single number for one image, a comma list (1,2,5) for a batch, all for everything connected. The dynamic port count is what makes this the go-to when your workflow's reference set changes between projects - one node flexes from "I need three refs" to "I need forty storyboard frames."

The inputs. index and image_count are required; the 50 optional image ports appear as needed. Note the node doesn't know how many images you plan to connect - image_count is the ceiling you're declaring, so set it to what you need, refresh, then wire up.

The output. image - a single image or a batch, depending on your selection string.

The mechanism behind the curtain. That Refresh Inputs button is powered by a small JS extension shipped with the pack (VRGDG_ImageSwitchMulti_dynamic.js) - it's what actually adds and removes the input ports in the UI. If you've installed the pack and the button doesn't work, that's a frontend-loading problem, not a node-logic problem.

Installing. It's in the vrgamedev pack:

cd ComfyUI/custom_nodes
git clone https://github.com/vrgamegirl19/comfyui-vrgamedevgirl

or install via ComfyUI Manager and restart.

Troubleshooting. Two classic issues. First, the stale-node problem: if you changed image_count and the ports didn't change, you forgot to click Refresh Inputs - that's the intended flow. Second, if the refresh button does nothing at all, it's usually a cached JS file: hard-refresh the ComfyUI page (Ctrl+Shift+R) or clear the browser cache, and if that fails, reinstall the pack so the web folder is present. And as with all the pack's switches, 0 in an index string is a sentinel, not a real image - if selecting 0 returns nothing, that's by design.

CategoryVRGDG/Switch

Inputs (52)

NameTypeDefaultDescription
indexSTRING1—
image_countINT41–50—
image1optIMAGE—
image2optIMAGE—
image3optIMAGE—
image4optIMAGE—
image5optIMAGE—
image6optIMAGE—
image7optIMAGE—
image8optIMAGE—
image9optIMAGE—
image10optIMAGE—
image11optIMAGE—
image12optIMAGE—
image13optIMAGE—
image14optIMAGE—
image15optIMAGE—
image16optIMAGE—
image17optIMAGE—
image18optIMAGE—
image19optIMAGE—
image20optIMAGE—
image21optIMAGE—
image22optIMAGE—
image23optIMAGE—
image24optIMAGE—
image25optIMAGE—
image26optIMAGE—
image27optIMAGE—
image28optIMAGE—
image29optIMAGE—
image30optIMAGE—
image31optIMAGE—
image32optIMAGE—
image33optIMAGE—
image34optIMAGE—
image35optIMAGE—
image36optIMAGE—
image37optIMAGE—
image38optIMAGE—
image39optIMAGE—
image40optIMAGE—
image41optIMAGE—
image42optIMAGE—
image43optIMAGE—
image44optIMAGE—
image45optIMAGE—
image46optIMAGE—
image47optIMAGE—
image48optIMAGE—
image49optIMAGE—
image50optIMAGE—

Outputs (1)

NameTypeDescription
imageIMAGE—