The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.
Fix issue with s2v node when extending past audio length. (#9608)
comfyanonymous1c184c29eb2a
diff --git a/comfy_extras/nodes_wan.py b/comfy_extras/nodes_wan.pyindex 0a55bd5d0..2cbc93ceb 100644--- a/comfy_extras/nodes_wan.py+++ b/comfy_extras/nodes_wan.py@@ -893,9 +893,10 @@ def wan_sound_to_video(positive, negative, vae, width, height, length, batch_sizaudio_embed_bucket = audio_embed_bucket.permute(0, 2, 3, 1)audio_embed_bucket = audio_embed_bucket[:, :, :, frame_offset:frame_offset + batch_frames]- positive = node_helpers.conditioning_set_values(positive, {"audio_embed": audio_embed_bucket})- negative = node_helpers.conditioning_set_values(negative, {"audio_embed": audio_embed_bucket * 0.0})- frame_offset += batch_frames+ if audio_embed_bucket.shape[3] > 0:+ positive = node_helpers.conditioning_set_values(positive, {"audio_embed": audio_embed_bucket})+ negative = node_helpers.conditioning_set_values(negative, {"audio_embed": audio_embed_bucket * 0.0})+ frame_offset += batch_framesif ref_image is not None:ref_image = comfy.utils.common_upscale(ref_image[:1].movedim(-1, 1), width, height, "bilinear", "center").movedim(1, -1)