fix: H3 file probe now shows Shadow negative and Video detail
The pre-load probe left out adaln_modalities, so picking an H3 file hid every setting that needs it. Run time still checks the loaded model. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011av2BXzE4UT5HfXpnhTNJQ
This commit is contained in:
@@ -108,16 +108,17 @@ def probe_traits(keys) -> list:
|
||||
every H3 file. Lets the UI hide LTX-only settings the moment a file is
|
||||
picked in the pipeline window, not only once something is generated.
|
||||
|
||||
Deliberately narrower than `traits()`: `adaln_modalities` depends on
|
||||
which blocks an actual loaded module tree contains (full-form vs.
|
||||
curve-form checkpoints), which the header alone cannot answer, so it is
|
||||
left for the real load.
|
||||
`adaln_modalities` is claimed here although the header cannot prove it
|
||||
(full-form vs. curve-form checkpoints differ in which blocks exist). Left
|
||||
out, the UI hid Shadow negative and Video detail for every picked H3 file.
|
||||
A claim that turns out wrong is caught at run time: the loaded model's own
|
||||
`traits()` is checked, and the feature is skipped with a note in the Log.
|
||||
"""
|
||||
if not detect(keys):
|
||||
return []
|
||||
from comfy.latent_formats import MiniMaxH3AV
|
||||
|
||||
found = ["audio_stream", "dit_block_hooks"]
|
||||
found = ["audio_stream", "dit_block_hooks", "adaln_modalities"]
|
||||
rank = _traits.LATENT_RANK.get(MiniMaxH3AV.latent_dimensions)
|
||||
if rank:
|
||||
found.append(rank)
|
||||
|
||||
@@ -55,10 +55,8 @@ def test_traits_match_the_real_latent_format_class():
|
||||
assert "temporal_compression" in found
|
||||
|
||||
|
||||
def test_does_not_claim_adaln_modalities_without_a_real_load():
|
||||
"""The one trait probe_traits deliberately does not answer -- full-form
|
||||
vs. curve-form checkpoints only differ in which blocks are actually
|
||||
present, which the header's key NAMES alone (as read here) do not
|
||||
distinguish reliably enough to assert either way."""
|
||||
def test_claims_adaln_modalities_so_h3_settings_are_not_hidden():
|
||||
"""Shadow negative and Video detail need it. The header cannot prove it, so the
|
||||
probe is optimistic and the real load (traits()) has the last word at run time."""
|
||||
m = _module()
|
||||
assert "adaln_modalities" not in m.probe_traits(_h3_keys())
|
||||
assert "adaln_modalities" in m.probe_traits(_h3_keys())
|
||||
|
||||
Reference in New Issue
Block a user