Expose per-beat H3 clip outputs
This commit is contained in:
+15
-12
@@ -5448,7 +5448,7 @@ def _evict_all_but(keep_model):
|
||||
|
||||
class H3LongVideos:
|
||||
CATEGORY = "Dumas/MiniMax"
|
||||
FUNCTION = "run"
|
||||
FUNCTION = "run"
|
||||
# fps is emitted as BOTH types on purpose: ComfyUI does not coerce between them,
|
||||
# and the nodes that want a frame rate are split -- CreateVideo / SaveWEBM /
|
||||
# VHS Video Combine take a FLOAT, while plenty of utility nodes take an INT.
|
||||
@@ -5458,11 +5458,13 @@ class H3LongVideos:
|
||||
# output. Inserting mid-list would silently re-target them.
|
||||
# APPEND to these, never insert. A workflow stores an output link by SLOT INDEX,
|
||||
# so a new type in the middle silently re-points every link after it.
|
||||
RETURN_TYPES = ("IMAGE", "AUDIO", "STRING", "STRING", "INT", "INT", "INT", "FLOAT", "FLOAT", "INT",
|
||||
"LATENT", "STRING")
|
||||
RETURN_NAMES = ("images", "audio", "info", "script", "frames_per_shot", "total_frames",
|
||||
"shots", "video_seconds", "fps", "fps_int",
|
||||
"latent", "soundscape")
|
||||
RETURN_TYPES = ("IMAGE", "AUDIO", "STRING", "STRING", "INT", "INT", "INT", "FLOAT", "FLOAT", "INT",
|
||||
"LATENT", "STRING", "IMAGE", "AUDIO")
|
||||
RETURN_NAMES = ("images", "audio", "info", "script", "frames_per_shot", "total_frames",
|
||||
"shots", "video_seconds", "fps", "fps_int",
|
||||
"latent", "soundscape", "beat_images", "beat_audio")
|
||||
OUTPUT_IS_LIST = (False, False, False, False, False, False, False, False, False, False,
|
||||
False, False, True, True)
|
||||
|
||||
@classmethod
|
||||
def IS_CHANGED(cls, plan_only=False, **kwargs):
|
||||
@@ -6413,9 +6415,9 @@ class H3LongVideos:
|
||||
# correctly-SHAPED empty one rather than None: a downstream LATENT input
|
||||
# would choke on None, and this keeps the preview wireable exactly like
|
||||
# a real run.
|
||||
return (ph_img, ph_audio, plan, "\n---\n".join(gens), max(plan_lens),
|
||||
sum(plan_lens), shots, total, float(fps), int(fps),
|
||||
_empty_av_latent(w, h, 5, fps)[0], global_soundscape)
|
||||
return (ph_img, ph_audio, plan, "\n---\n".join(gens), max(plan_lens),
|
||||
sum(plan_lens), shots, total, float(fps), int(fps),
|
||||
_empty_av_latent(w, h, 5, fps)[0], global_soundscape, [], [])
|
||||
|
||||
spk = speech_flags(beats) # which shots have real (quoted) dialogue
|
||||
vram_trace = [] # free VRAM after each shot
|
||||
@@ -6841,9 +6843,10 @@ class H3LongVideos:
|
||||
# reassigns it, so this is the derived bed when auto_soundscape fired and
|
||||
# your own text when it did not. Emitting it means you can read what was
|
||||
# generated, and feed it straight back into the widget-input to pin it.
|
||||
return (all_frames, {"waveform": all_audio, "sample_rate": sr}, info, script,
|
||||
max(shot_lens), all_frames.shape[0], len(gens), round(actual, 2),
|
||||
float(fps), int(fps), latent_out, global_soundscape)
|
||||
return (all_frames, {"waveform": all_audio, "sample_rate": sr}, info, script,
|
||||
max(shot_lens), all_frames.shape[0], len(gens), round(actual, 2),
|
||||
float(fps), int(fps), latent_out, global_soundscape,
|
||||
video_chunks, [{"waveform": chunk, "sample_rate": sr} for chunk in audio_chunks])
|
||||
|
||||
|
||||
# The old FL2VA / REF2VA aliases were only alternate menu entries for the same class.
|
||||
|
||||
Reference in New Issue
Block a user