Nodes/ComfyUI-RMBG/Image to List (RMBG)
ComfyUI Node Runs on cloud

Image to List (RMBG)

Gather up to six images into one list

By 1038lab·Created 2 years ago·Updated 8 days ago· 2,051
Image to List (RMBG)
  • image_1
  • image_2
  • image_3
  • image_4
  • image_5
  • image_6
  • IMAGE
  • WIDTH
  • HEIGHT
  • BATCH_SIZE
resize_modecrop

Collect up to six separate images into a single list so a downstream node can run over all of them, one at a time, instead of you building six copies of the same chain. It's the image-only sibling of the pack's Image and Mask to List node - same idea, minus the masks.

Lists are ComfyUI's way of saying "apply this to each of these." A node fed a list executes once per item. So if you've got six product shots and you want to background-remove all of them, you gather them here and feed the list into the remover, which then iterates. Without a list you'd be wiring six parallel branches by hand, which is exactly the tedium this node exists to kill.

How it works

You plug images into numbered slots - image_1 through image_6 - and it packs the connected ones into a list, optionally normalizing their sizes so the list is uniform. Empty slots are ignored, so you can wire in two or five, whatever you have.

The inputs and outputs that matter

  • image_1image_6 (all optional) - the images to gather. Connect as many as you need.
  • resize_mode - off, crop, or fit. How to reconcile mismatched input sizes: crop center-crops to a common size, fit scales to fit, off leaves them alone (only safe when they're already the same size). Set this to crop or fit if your sources vary, or downstream batching will complain.

Outputs: IMAGE (the list), plus WIDTH, HEIGHT, and BATCH_SIZE - the count is useful for driving loop logic or sanity-checking that all your inputs made it in.

How to install it

  • ComfyUI Manager: search Comfyui-RMBG, install, restart.
  • Manual: cd ComfyUI/custom_nodes && git clone https://github.com/1038lab/ComfyUI-RMBG, then pip install -r requirements.txt, and restart.

No model - pure plumbing, ready when the pack loads.

Common issues

The list-versus-batch distinction is the thing to understand. This outputs a list (separate items), which is what per-item nodes want. Some nodes instead want a batch (one stacked tensor, requires identical sizes). If a downstream node throws a shape error, it probably wanted a batch - either convert, or set resize_mode so every image matches and can be stacked. Also double-check BATCH_SIZE equals the number of images you connected; if it's lower, a slot you thought was wired isn't. And if your images need to travel with masks, use Image and Mask to List instead so the pairing survives.

Category🧪AILab/🖼️IMAGE

Inputs (7)

NameTypeDefaultDescription
resize_modeCOMBOcrop3 options: off, crop, fit
image_1optIMAGE
image_2optIMAGE
image_3optIMAGE
image_4optIMAGE
image_5optIMAGE
image_6optIMAGE

Outputs (4)

NameTypeDescription
IMAGEIMAGE
WIDTHINT
HEIGHTINT
BATCH_SIZEINT