Make per-clip H3 upscale a Second Pass replacement

This commit is contained in:
2026-10-20 11:02:23 +00:00
parent 497bd84e50
commit 0abde05cef
3 changed files with 36 additions and 15 deletions
+16 -5
View File
@@ -165,6 +165,7 @@ class DumasH3ContinuumTiledLatentUpscalePerClip:
"model": ("MODEL",),
"clip": ("CLIP",),
"video_latents": ("LATENT",),
"audio_latents": ("LATENT",),
"assembly_plan": ("H3_CONTINUUM_ASSEMBLY_PLAN",),
"refine_context": ("H3_CONTINUUM_REFINE_CONTEXT",),
"latent_upscale_param": ("H3_UPSCALE_PARAM",),
@@ -206,9 +207,9 @@ class DumasH3ContinuumTiledLatentUpscalePerClip:
}
INPUT_IS_LIST = True
RETURN_TYPES = ("LATENT", "STRING")
RETURN_NAMES = ("upscaled_video_latents", "report")
OUTPUT_IS_LIST = (True, False)
RETURN_TYPES = ("LATENT", "LATENT", "H3_CONTINUUM_ASSEMBLY_PLAN", "STRING")
RETURN_NAMES = ("refined_video_latents", "audio_latents", "updated_assembly_plan", "status")
OUTPUT_IS_LIST = (True, True, False, False)
FUNCTION = "upscale"
CATEGORY = "Dumas/MiniMax H3/Upscale"
@@ -217,6 +218,7 @@ class DumasH3ContinuumTiledLatentUpscalePerClip:
model,
clip,
video_latents,
audio_latents,
assembly_plan,
refine_context,
latent_upscale_param,
@@ -354,12 +356,21 @@ class DumasH3ContinuumTiledLatentUpscalePerClip:
f"clip {index}: {tuple(samples.shape)} -> {tuple(output_samples.shape)}"
)
audio_outputs = _clips(audio_latents)
if len(audio_outputs) != len(outputs):
raise ValueError(
"audio_latents must contain one first-pass audio latent per physical clip"
)
update_geometry = _continuum_helper("update_second_pass_geometry")
updated_plan = update_geometry(_one(assembly_plan, "assembly_plan"), outputs)
return (
outputs,
"H3 Continuum per-clip tiled upscale; "
audio_outputs,
updated_plan,
"H3 Continuum per-clip tiled upscale replacement; "
f"clips={len(outputs)}, sampler={sampler_name}, scheduler={scheduler_name}, "
f"steps={steps}, denoise={denoise:g}, cfg={cfg:g}, seed_base={seed}; "
+ "; ".join(reports),
"audio=first-pass passthrough; " + "; ".join(reports),
)