Use Continuum refine context for per-clip upscale
This commit is contained in:
@@ -88,8 +88,10 @@ class H3ContinuumTiledLatentUpscalePerClip:
|
||||
return {
|
||||
"required": {
|
||||
"model": ("MODEL",),
|
||||
"conditioning": ("CONDITIONING",),
|
||||
"clip": ("CLIP",),
|
||||
"video_latents": ("LATENT",),
|
||||
"assembly_plan": ("H3_CONTINUUM_ASSEMBLY_PLAN",),
|
||||
"refine_context": ("H3_CONTINUUM_REFINE_CONTEXT",),
|
||||
"latent_upscale_param": ("H3_UPSCALE_PARAM",),
|
||||
"spatial_split_param": ("H3_SPATIAL_PARAM",),
|
||||
"upscale_sampler": (
|
||||
@@ -120,6 +122,8 @@ class H3ContinuumTiledLatentUpscalePerClip:
|
||||
),
|
||||
},
|
||||
"optional": {
|
||||
"conditioning": ("CONDITIONING",),
|
||||
"video_vae": ("VAE",),
|
||||
"negative": ("CONDITIONING",),
|
||||
"temporal_split_param": ("H3_TEMPORAL_PARAM",),
|
||||
"upscale_sigmas": ("SIGMAS",),
|
||||
@@ -136,8 +140,10 @@ class H3ContinuumTiledLatentUpscalePerClip:
|
||||
def upscale(
|
||||
self,
|
||||
model,
|
||||
conditioning,
|
||||
clip,
|
||||
video_latents,
|
||||
assembly_plan,
|
||||
refine_context,
|
||||
latent_upscale_param,
|
||||
spatial_split_param,
|
||||
upscale_sampler,
|
||||
@@ -146,6 +152,8 @@ class H3ContinuumTiledLatentUpscalePerClip:
|
||||
upscale_denoise,
|
||||
upscale_cfg,
|
||||
upscale_noise_seed,
|
||||
conditioning=None,
|
||||
video_vae=None,
|
||||
negative=None,
|
||||
temporal_split_param=None,
|
||||
upscale_sigmas=None,
|
||||
@@ -170,8 +178,33 @@ class H3ContinuumTiledLatentUpscalePerClip:
|
||||
latents = _clips(video_latents)
|
||||
if not latents:
|
||||
raise ValueError("video_latents must contain at least one clip")
|
||||
models = _per_clip(model, len(latents), "model")
|
||||
conditionings = _per_clip(conditioning, len(latents), "conditioning")
|
||||
if conditioning is None:
|
||||
# The Continuum sampler's refine context is a runtime contract, not
|
||||
# a Core CONDITIONING value. Reuse Continuum's own bridge so each
|
||||
# physical clip receives its captured prompt/reference conditioning
|
||||
# and its context-aware model clone at the target geometry.
|
||||
from .second_pass import prepare_physical_refine_groups
|
||||
|
||||
prepared = prepare_physical_refine_groups(
|
||||
model=_one(model, "model"),
|
||||
clip=_one(clip, "clip"),
|
||||
video_latents=latents,
|
||||
assembly_plan=_one(assembly_plan, "assembly_plan"),
|
||||
refine_context=_one(refine_context, "refine_context"),
|
||||
video_vae=(
|
||||
None if video_vae is None else _one(video_vae, "video_vae")
|
||||
),
|
||||
)
|
||||
models = prepared["group_models"]
|
||||
conditionings = prepared["conditioning"]
|
||||
if len(models) != len(latents) or len(conditionings) != len(latents):
|
||||
raise ValueError(
|
||||
"refine context bridge did not produce one model and conditioning "
|
||||
"value per physical clip"
|
||||
)
|
||||
else:
|
||||
models = _per_clip(model, len(latents), "model")
|
||||
conditionings = _per_clip(conditioning, len(latents), "conditioning")
|
||||
negatives = (
|
||||
[None] * len(latents)
|
||||
if negative is None
|
||||
|
||||
Reference in New Issue
Block a user