<aside>
ğŸ›
Put One Image Back Into a List — Replace by Index
The mirror of List Extract: instead of pulling one image out of a list, List Inject replaces the image at a specific position with a new one and passes the modified list downstream. Automatically resizes the replacement to fit the frame with three fit modes (cover, contain, stretch). Perfect for "extract → process → inject" pipelines where you pull one item out, enhance it, and slot it back into the original sequence.
</aside>
What it does
List Inject takes an image list and a replacement image, and returns a new list where the image at the specified 0-based index has been swapped out for the replacement. All other images in the list pass through unchanged. If the replacement image is a different resolution than the list's frame size, the tool automatically resizes it using the fit mode you choose. Result: the same list, minus one item, plus the new one — ready to feed into any downstream node that consumes a list (video reassembly, batch processors, list-based viewers).
Problem it solves
- Extract → enhance → re-inject pipelines – Pull one item from a list, run it through image models (upscale, enhance, edit), then put the improved version back where it belongs
- Frame-level video editing – Replace a specific frame in a decoded video sequence (bad frame, key frame you upscaled separately, edited hero frame)
- Swap one variant in a batch – Replace a bad or unwanted image in a batch of generated variants
- Correct a bad mask – Replace a specific mask in a segmentation stack with a hand-fixed or model-refined version
- Preserve list structure – Keep the rest of the list intact; only the specified index changes
- Handle size mismatches – Automatic resize with three fit modes means the replacement doesn't need to match the list's native resolution exactly
Input/Output
<aside>
- Input: Image list + replacement image
- Input 1 — Image list: The original list (from a batch node, video-frame decoder, segmentation model, generation output, etc.)
- Input 2 — Replacement image: The single image to inject into the list. Can be any resolution — the fit mode handles size differences
- Output: New image list with one item replaced
-
Format: Same list structure as the input
-
Content: All original items preserved except the one at the specified index, which is replaced by the (fit-mode-resized) replacement image

(Example: in the image list, replacing the office background layer at a given index with the baseball playground layer)
-
Configuration Option:
- 0-based index of the member to replace: Which item in the list to swap.
- Range: 0 to (list length – 1)
- 0 – Replace the first item
- N – Replace the (N+1)th item
- UI: A slider you drag to the position; the current index is shown to the right
- Behavior: Requesting an index past the end of the list may error or no-op depending on upstream behavior — stay within the list's range
- How to fit a differently-sized replacement image to the frame resolution: Controls what happens when the replacement image has different dimensions than the list's frame size. Same idea as CSS object-fit.
| Mode |
Behavior |
Best For |
| cover (default) |
Replacement is scaled to fully cover the frame, cropping any overflow. Aspect ratio preserved. |
Full-frame replacements where you want to fill every pixel, even if edges get trimmed |
| contain |
Replacement is scaled to fit entirely inside the frame, adding transparent letterboxing if needed. Aspect ratio preserved. |
Replacements you want to keep whole — no cropping |
| stretch |
Replacement is stretched to exactly match frame dimensions. Aspect ratio not preserved (image may distort). |
When the replacement was designed to fill any shape (backgrounds, textures) |
</aside>
How to Use
- Connect the source list → Wire the image list into the top input port
- Connect the replacement image → Wire the single image you want to inject into the second input port
- Set the target index → Drag the slider (or type a value) to pick which item to replace. 0 = first item.
- Pick a fit mode → Choose cover (default), contain, or stretch based on how you want the replacement resized