Nodes/ComfyUI-MiniMax-H3-Studio/H3 Studio • Single Image Output
ComfyUI Node

H3 Studio • Single Image Output

Picking the one good still out of H3's frame pile

By thaakeno·Created 17 days ago·Updated 5 days ago· 79
H3 Studio • Single Image Output
  • frames
  • source_image
  • selected_image
  • candidate_batch_debug
  • selected_index
  • selected_score
  • score_report
strategydecode_recommended
manual_index0
skip_first_frames0
candidate_start0.00
candidate_end1.00
similarity_weight0.60
top_k4
emit_candidate_batchfalse
recommended_index

Here's the thing nobody warns you about with MiniMax H3 for images: you don't get one image out of a sampler. You get a batch of frames - 5, 9, 13 or 20 of them, depending on your frame profile - because H3 denoises a temporal packet and each frame is a candidate still. H3StudioFrameSelector is the node that turns that pile of frames into the one image you actually wanted.

It takes the decoded frames batch (from H3 Studio · Native H3 VAE Decode) and selects a single still. The default strategy is decode_recommended, which is the lazy-correct choice: it uses the recommended_index output from the decode node. Connect the decode node's recommended_index into this node's recommended_index input and it just takes the decoder's recommendation - the mode-aware pick that usually corresponds to the most settled frame.

When you want more control

The other nine strategies exist for when the default isn't doing it for you:

  • first / middle / last / manual_index - fixed positions in the batch. manual_index is zero-based and only used with the manual_index strategy.
  • best_quality / stable_quality / sharpest - metric-based scoring across the batch.
  • most_similar_to_source - needs a source_image connected; picks the frame closest to your source, useful for image-to-image where you want the result to stay anchored.
  • balanced_edit - a blend of source similarity and quality; similarity_weight (default 0.6) sets the balance, and it only matters when source_image is connected.
  • decode_recommended - the default, described above.

The scoring strategies respect a range you can narrow: candidate_start and candidate_end are fractional bounds (0.0 → 1.0) over the decoded batch, and skip_first_frames excludes that many initial frames from scoring. If you know the first few frames of a profile are always unstable, skip them rather than fighting the scores. top_k (default 4) controls how many top frames the debug output carries.

What comes out

The main output is selected_image - your still. The rest are debugging aids:

  • selected_index and selected_score - which frame won and why.
  • score_report - a string breakdown of the scoring.
  • candidate_batch_debug - here's the gotcha: this is empty by default unless you enable emit_candidate_batch. Flip it on when you're tuning a strategy and want to see every candidate frame; leave it off for real runs to avoid carrying a full image batch through the graph for nothing.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/thaakeno/ComfyUI-MiniMax-H3-Studio.git
cd ComfyUI-MiniMax-H3-Studio
python -m pip install -r requirements.txt

Restart and hard-refresh the frontend. No extra dependencies beyond the pack. My honest advice: run it on decode_recommended first, and only reach for the metric strategies when the recommended frame is consistently the wrong one - the scores are fast, but the default is usually the one the H3 decoder itself thinks is settled.

CategoryH3 Studio/Runtime

Inputs (11)

NameTypeDefaultDescription
framesIMAGEDecoded H3 IMAGE batch. With the supplied Exact Frame Decode node this contains the complete selected 5-, 9-, 13-, or 20-frame profile.
strategyCOMBOdecode_recommendeddecode_recommended uses Exact Frame Decode's mode-aware recommendation (connect its index). first selects frame 0. stable_quality favors sharp, clean and temporally stable frames. balanced_edit combines source similarity with stable quality. best_quality uses sharpness, contrast and exposure. most_similar_to_source requires source_image. sharpest uses edge detail only. middle, last and manual_index select a fixed frame without scoring.
manual_indexINT00–4096Zero-based frame index used only when strategy is manual_index.
skip_first_framesINT00–128Excludes this many initial frames from metric-based scoring. Leave at 0 unless a specific generation shows an unstable opening frame. Ignored by fixed-index strategies.
candidate_startFLOAT0.000–1Fractional start of the automatic scoring range. 0.0 begins at the first frame and 0.5 begins halfway through. skip_first_frames can move the effective start later.
candidate_endFLOAT1.000–1Fractional end of the automatic scoring range. 1.0 includes the end of the decoded batch.
similarity_weightFLOAT0.600–1Used only by balanced_edit when source_image is connected. Higher values favor source similarity; lower values favor sharpness, exposure, contrast and temporal stability.
top_kINT41–16Maximum number of highest-scoring frames returned by candidate_batch_debug for automatic strategies. It does not limit selected_image when emit_candidate_batch is enabled: that main output contains every decoded frame. Fixed strategies return their chosen frame on candidate_batch_debug because they do not calculate a ranking.
source_imageoptIMAGEOptional comparison image for most_similar_to_source and balanced_edit. Only the first image in the connected batch is used as the reference.
emit_candidate_batchoptBOOLEANfalseOFF: selected_image contains only the picked still. ON: selected_image contains the entire decoded 5-, 9-, 13-, or 20-frame batch, so an already-connected Preview Image or Save Image node shows or saves every generated image. candidate_batch_debug remains the ranked top-k subset. Enabling this intentionally retains more RAM/VRAM.
recommended_indexoptINTConnect recommended_index from Exact Frame Decode. Used by decode_recommended; if left unconnected, frame 0 is selected.

Outputs (5)

NameTypeDescription
selected_imageIMAGESingle selected still when emit_candidate_batch is off; complete decoded batch when it is on.
candidate_batch_debugIMAGERanked top-k candidates for automatic strategies, or the fixed chosen frame for fixed strategies.
selected_indexINTZero-based index of the preferred still inside the original decoded batch.
selected_scoreFLOATScore assigned to the preferred still; fixed strategies return 1.0.
score_reportSTRINGHuman-readable scoring and emitted-batch report.