fix(h3-continuity): Segment Decode names swapped video/audio VAE slots
A video VAE (e.g. the new Sol-H3-VAE) wired into audio_vae failed deep in Core's decode with 'tuple index out of range'. Classify both slots by Core's MiniMaxH3VideoVAE/MiniMaxH3AudioVAE classes before decoding, in both output modes, so the error names the wiring and new H3 VAE variants keep passing.
This commit is contained in:
@@ -139,3 +139,15 @@ def test_full_mode_decode_matches_core_decoders(monkeypatch):
|
||||
assert torch.equal(images,comfy_nodes.VAEDecode().decode(vae,take)[0])
|
||||
core_audio = vae_decode_audio(avae,take)
|
||||
assert torch.equal(audio['waveform'],core_audio['waveform']) and audio['sample_rate'] == core_audio['sample_rate']
|
||||
|
||||
@pytest.mark.parametrize('output_mode',['full','segment'])
|
||||
def test_segment_decode_names_swapped_vae_slots(output_mode):
|
||||
from comfy.ldm.minimax.audio_vae import MiniMaxH3AudioVAE
|
||||
mod = importlib.import_module('h3_segment_test.nodes.h3_continuity.segment_nodes')
|
||||
video = SimpleNamespace(first_stage_model=video_decoder())
|
||||
audio = SimpleNamespace(first_stage_model=MiniMaxH3AudioVAE.__new__(MiniMaxH3AudioVAE))
|
||||
ctx = {'output_mode':output_mode,'render_kind':'segment'} if output_mode == 'segment' else {'output_mode':'full'}
|
||||
with pytest.raises(ValueError,match="video VAE is connected to 'audio_vae'"):
|
||||
mod.DaSiWaH3ContinuitySegmentDecode().decode(None,video,video,ctx)
|
||||
with pytest.raises(ValueError,match="audio VAE is connected to 'vae'"):
|
||||
mod.DaSiWaH3ContinuitySegmentDecode().decode(None,audio,audio,ctx)
|
||||
|
||||
Reference in New Issue
Block a user