Image Picker(ImagePickerStage)
Image Picker (class ImagePickerStage) is a Compose-stage node in the ComfyTV package.
Image Picker Stage
Description
Image Picker (class ImagePickerStage) is a Compose-stage node in the ComfyTV package. It maintains a persistent pool of images collected from upstream batches and outputs the single image chosen from that pool. The pool is accumulated across runs, so images from earlier generations remain available even after the graph is regenerated or the upstream connection is briefly lost.
The node is designed to be driven by the ComfyTV UI rather than typed by hand: you browse the accumulated pool as thumbnails, click the one you want, and the node outputs that image. In a typical workflow, an upstream image-producing branch feeds the pool while this node's output carries forward the specific image the user selected for the next stage of composition.
Inputs
selected_index
- Type:
INT, required - Default:
1 - Range:
1to999, step1
The 1-indexed position of the item to extract from the pool. A value of 1 selects the first image in the pool, 2 the second, and so on. This widget is hidden in the normal interface and is set automatically when you click a thumbnail in the UI. Manual edits are possible but unnecessary in regular use.
pool
- Type:
STRING, required - Default:
""(empty)
The accumulated image pool, serialized as JSON in the form {"images":[...]}. This value is managed by the node's UI: new upstream batches are appended to the pool, deduplicated by image_url, and the accumulated contents survive regeneration and disconnection. The Clear button empties the pool.
Because the UI owns this field, you ordinarily do not edit it by hand; changing it manually risks producing a JSON payload the picker cannot parse.
append_results
- Type:
BOOLEAN, required - Default:
true
Controls how new upstream results interact with the existing pool:
- On (
true, default): new upstream results are appended to the pool, keeping all existing items. This is the accumulating behavior that lets you collect candidates across multiple runs before choosing one. - Off (
false): each new run replaces the pool with just the latest batch. Use this when you only ever want to pick from the most recent results and do not want stale images lingering in the thumbnail strip.
Outputs
COMFYTV_IMAGE
A single image: the pool item at the position given by selected_index. The output is of the ComfyTV image type, so it plugs into other ComfyTV compose stages (and any nodes that accept that type) for further processing.
Usage Notes
- Run the graph at least once to populate the pool before expecting a meaningful selection. Until images have been collected, there is nothing to index into.
- Selection is 1-indexed, so the first thumbnail corresponds to
selected_index1, not0. - With
append_resultsenabled, the pool grows over successive runs. Click a thumbnail to change which accumulated image is emitted without regenerating the upstream branch. - If you notice the picker showing images from an earlier experiment, either press Clear to empty the pool or turn
append_resultsoff so each run replaces the pool with the latest batch. - Deduplication is performed by
image_url, so re-sending the same image does not create duplicate entries in the pool.
Comments
Sign in with GitHub to join the discussion.