Archive fork in favor of upstream and DUMAS nodes
tests / test (push) Canceled after 0s
tests / windows-storage (push) Canceled after 0s

This commit is contained in:
2026-10-20 10:46:16 +00:00
parent 881dcbcfba
commit 3716b02a57
76 changed files with 12140 additions and 4410 deletions
+1 -119
View File
@@ -9,7 +9,6 @@ from .refine_scope import MODE_ALL, MODE_LOGICAL_CHUNK, MODE_PHYSICAL_GROUP
from .refine_window import MODE_TIME_WINDOW
from .second_pass import run_second_pass_groups
from .targeted_second_pass import run_targeted_second_pass_groups
from .tiled_latent_upscale_nodes import _native_node, _unwrap_single_output
REFINE_TARGET_VIDEO_ONLY = "Video Only"
@@ -50,30 +49,6 @@ def _single_list_input(name: str, value: Any) -> Any:
return value[0]
def _optional_single_list_input(name: str, value: Any) -> Any:
"""Unwrap an optional INPUT_IS_LIST value without losing an absent socket."""
if value is None:
return None
return _single_list_input(name, value)
def _sampler_options():
try:
import comfy.samplers
return list(comfy.samplers.KSampler.SAMPLERS)
except Exception:
return ["euler", "euler_ancestral", "res_multistep", "sa_solver"]
def _scheduler_options():
try:
import comfy.samplers
return list(comfy.samplers.KSampler.SCHEDULERS)
except Exception:
return ["simple", "beta", "sgm_uniform", "karras", "exponential"]
class H3ContinuumSecondPassV35:
"""Low-sigma refinement over complete physical decode groups."""
@@ -84,10 +59,7 @@ class H3ContinuumSecondPassV35:
"Connect the optional Continuum refine context to preserve the physical group's "
"First/Last/Reference conditioning. "
"SIGMAS controls the low-denoise refine schedule; audio output is preserved "
"bit-exact from the first pass. In tiled-upscale mode, connected "
"upscale-specific sockets take priority; the main SIGMAS socket is the "
"fallback external schedule. The other optional tiled sockets fall back "
"to their node widgets when they are not connected."
"bit-exact from the first pass."
)
@classmethod
@@ -111,28 +83,10 @@ class H3ContinuumSecondPassV35:
"tooltip": "Base seed independently derived once per physical group.",
},
),
"tiled_upscale": (
"BOOLEAN",
{
"default": False,
"tooltip": "Use native tiled H3 latent upscale instead of the low-sigma refine pass.",
},
),
},
"optional": {
"refine_context": ("H3_CONTINUUM_REFINE_CONTEXT",),
"video_vae": ("VAE",),
"latent_upscale_param": ("H3_UPSCALE_PARAM",),
"spatial_split_param": ("H3_SPATIAL_PARAM",),
"temporal_split_param": ("H3_TEMPORAL_PARAM",),
"upscale_sampler": (_sampler_options(), {"default": "euler_ancestral"}),
"upscale_scheduler": (_scheduler_options(), {"default": "simple"}),
"upscale_steps": ("INT", {"default": 3, "min": 1, "max": 50}),
"upscale_denoise": ("FLOAT", {"default": 0.2, "min": 0.0, "max": 1.0, "step": 0.01}),
"upscale_cfg": ("FLOAT", {"default": 1.0, "min": 0.0, "max": 20.0, "step": 0.1}),
"upscale_noise_seed": ("INT", {"default": 0, "min": 0, "max": 0xFFFFFFFFFFFFFFFF, "control_after_generate": True}),
"upscale_negative": ("CONDITIONING",),
"upscale_sigmas": ("SIGMAS",),
},
}
@@ -161,78 +115,7 @@ class H3ContinuumSecondPassV35:
refine_context=None,
video_vae=None,
refine_schedule=None,
tiled_upscale=False,
latent_upscale_param=None,
spatial_split_param=None,
temporal_split_param=None,
upscale_sampler="euler_ancestral",
upscale_scheduler="simple",
upscale_steps=3,
upscale_denoise=0.2,
upscale_cfg=1.0,
upscale_noise_seed=0,
upscale_negative=None,
upscale_sigmas=None,
):
tiled_config = None
if bool(_single_list_input("tiled_upscale", tiled_upscale)):
required_native = {
name: _native_node(name)
for name in (
"MMH3UltimateUpscale",
"RandomNoise",
"KSamplerSelect",
"BasicScheduler",
)
}
missing = [name for name, value in required_native.items() if value is None]
if missing:
raise RuntimeError("Missing native tiled-upscale nodes: " + ", ".join(missing))
if latent_upscale_param is None or spatial_split_param is None:
raise ValueError(
"Tiled upscale mode requires latent_upscale_param and spatial_split_param"
)
tiled_config = {
"native": required_native["MMH3UltimateUpscale"],
"random_noise": required_native["RandomNoise"],
"sampler": _unwrap_single_output(
required_native["KSamplerSelect"]().get_sampler(
str(_single_list_input("upscale_sampler", upscale_sampler))
),
"KSamplerSelect",
),
"scheduler": required_native["BasicScheduler"],
"scheduler_name": str(_single_list_input("upscale_scheduler", upscale_scheduler)),
"steps": int(_single_list_input("upscale_steps", upscale_steps)),
"denoise": float(_single_list_input("upscale_denoise", upscale_denoise)),
"cfg": float(_single_list_input("upscale_cfg", upscale_cfg)),
"seed_base": int(_single_list_input("upscale_noise_seed", upscale_noise_seed)),
"latent_upscale_param": _single_list_input("latent_upscale_param", latent_upscale_param),
"spatial_split_param": _single_list_input("spatial_split_param", spatial_split_param),
"temporal_split_param": (
None if temporal_split_param is None
else _single_list_input("temporal_split_param", temporal_split_param)
),
"negative": (
None if upscale_negative is None
else _single_list_input("upscale_negative", upscale_negative)
),
# A dedicated tiled schedule wins. The main SIGMAS socket is
# the backwards-compatible external fallback used by existing
# DUMAS workflows.
"sigmas": _optional_single_list_input(
"upscale_sigmas", upscale_sigmas
)
if upscale_sigmas is not None
else _optional_single_list_input("sigmas", sigmas),
"sigma_source": (
"upscale_sigmas_socket"
if upscale_sigmas is not None
else "sigmas_socket"
if sigmas is not None
else "node_steps_fallback"
),
}
return run_second_pass_groups(
model=_single_list_input("model", model),
clip=_single_list_input("clip", clip),
@@ -253,7 +136,6 @@ class H3ContinuumSecondPassV35:
else _single_list_input("video_vae", video_vae)
),
refine_schedule=refine_schedule,
tiled_upscale_config=tiled_config,
)