Select Original Image
Grab the exact image out of a multi-select — and the prompt that made it comes along
- paths
- image
- width
- height
- positive_prompt
- negative_prompt
The Local Media Manager hub hands you a batch of everything you Ctrl+Clicked, normalized to one size. That's great for feeding a whole folder through the same pipeline, but it's useless when you want one specific image - say the third reference shot - at a size that fits your latent. Select Original Image is the unwrap node: you tell it which index in the multi-select you mean, and it returns that image resized to your liking. Bonus: it digs the generation prompt out of the file's embedded metadata, so a reference image can arrive with its own positive and negative prompts attached.
How it works
You wire the gallery's paths output into this node, set index to the sequence number (the one shown on the card when you multi-select - counting starts at 0), and the node parses the selection JSON, finds the image item at that position, and loads it. Resizing is snapped to 8px multiples (VAE-friendly) using the aspect_ratio_preservation mode, then the whole thing gets fed through common_upscale.
The prompt extraction is the clever part. ComfyUI images carry their generation history inside the file as PNG text chunks - the workflow and prompt JSON, or an A1111-style parameters string (the "workflow lives in the file" convention that the whole ecosystem runs on; see the image-io-metadata knowledge doc). This node reads that metadata and, when it's a ComfyUI workflow, actually walks the node graph: it finds CLIPTextEncode nodes that feed a sampler, follows the wires to the text's source, and splits positive from negative by checking whether the node's title contains "negative". It even understands the old A1111 Negative prompt: / Steps: layout. That's real work, and it usually just works - but it can only extract prompts that exist. No metadata, no prompt: you get empty strings, not an error.
The inputs that matter
paths- connect this to the gallery node'spathsoutput. Non-negotiable.index- which selected image to use, 0-based. This is the one you'll tweak most.generation_width/generation_height- target size (64–8096, stepped by 8). Ifaspect_ratio_preservationisoriginal, these are ignored.aspect_ratio_preservation- the four-way resize mode:original(no processing),keep_input(preserve the file's aspect ratio),stretch_to_new(squash to fit),crop_to_new(center-crop to fit). For img2img you usually wantkeep_inputorcrop_to_new.frame_load_cap- the author's tooltip says it best: "copy a single image into a specified number of image sequences." Set it above 1 and the one image is repeated into N frames, which is exactly what you want to seed a video pipeline from a still.
What comes out and where it goes
image(IMAGE) - the single resized image tensor (or N-frame sequence if you raisedframe_load_cap). Wire it into aVAEEncodefor img2img, an upscaler's input, or an inpainting setup.width/height(INT) - the actual output dimensions, handy if a downstream node needs them.positive_prompt/negative_prompt(STRING) - the extracted prompts. Feed them intoCLIPTextEncode, a text primitive, or a save-metadata node.
Gotchas
- Index counts only what's in your selection, and only image items at that. If you selected two videos then an image, index 2 is that image; index 0 is the video and returns an empty placeholder (a 1×1 black image).
- Out-of-range index → same empty placeholder, silently. Nothing crashes, but your pipeline runs on a blank frame, so check the number if output looks off.
- Prompt quality tracks the source workflow. It's tuned for standard
CLIPTextEncode→ sampler graphs; exotic nodes or mangled metadata yield blanks. For the modern frontend's Nodes 2.0 graph format the parsing is best-effort.
Install it via ComfyUI Manager (search "Local Media Manager") or git clone https://github.com/Firetheft/ComfyUI_Local_Media_Manager into custom_nodes/, then pip install -r requirements.txt and restart.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| paths | LMM_ALL_PATHS | — | |
| index | INT | 0 | — |
| frame_load_cap | INT | 11–4096 | Copy a single image into a specified number of image sequences |
| generation_width | INT | 102464–8096 | The desired image width |
| generation_height | INT | 102464–8096 | The desired image height |
| aspect_ratio_preservation | COMBO | Zoom Mode: - keep_input: Maintain the aspect ratio of the original image - stretch_to_new: Stretch to fit the new size - crop_to_new: Cropped to fit new sizes - original: No processing is performed, use the original image size |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |
| width | INT | — |
| height | INT | — |
| positive_prompt | STRING | — |
| negative_prompt | STRING | — |