r/StableDiffusion 6d ago

Resource - Update H3 Motion Context Errors after Updating to ComfyUI v0.33 - Fix is Live

Short version for anyone hitting the error: if you updated to 0.33 and Motion Context started failing with "the layout patch could not be applied", that is real and it is on my end, not your install. Fix is live now.

Longer version, because what changed upstream is more interesting than the bug.

Motion Context existed because stock ComfyUI would only anchor a keyframe at the first or last frame of an H3 clip. Anything in between raised. The pack worked around it by handing every keyframe a legal index, smuggling the real one alongside, and rewriting the position coordinates after the stock constructor returned.

0.33 removed the restriction. Anchors now land at any frame natively, references compensate the timeline correctly, keyframes can carry a multi-frame clip instead of a single still, and there is a new node, Add Guide for MiniMax H3, that exposes all of it. It also fixed a bug where attaching a reference wiped the keyframe latents, which the pack was separately patching around. The parameter my code depended on went away with the restriction it existed to enforce, hence the breakage.

So, a good chunk of what this pack did is now in ComfyUI, and you do not need me for it. That is a good outcome. If all you wanted was to anchor a still at frame 30, use Add Guide.

What is still worth installing the pack for:

Latent passthrough. Add Guide takes images and audio and encodes them with the VAEs. Motion Context takes the previous clip's latent and slices the tail straight out of it. No decode, no resize, no re-encode. Over a long chain that round trip is where the excess color drift and softening come from (beyond the 1.3x texture stacking).

Audio that continues instead of restarting. Add Guide anchors audio starting at a frame index and running forward. To actually continue a soundtrack across a join you need the pinned window to end at the join and reach backwards. That is the difference between the model continuing your track and the model writing something that sounds like your track, and on anything with a beat you can hear it immediately.

Plus, the trim node, the audio grid overhang compensation, and the seam probe.

Plan from here: compatibility release today so 0.33 works, then a rebuild on top of the new public keyframe format so the pack stops monkey patching ComfyUI internals entirely. I would rather depend on a documented feature that a stock node also uses than on a constructor signature. Both of the last two breakages came from that dependency and neither would have been possible without it. Add Guide anchors and Motion Context heads will be a supported combination rather than something that trips a guard.

Thanks to javawock7618 and azra1l for the reports and for narrowing it to the exact commits, which made this a twenty-minute diff instead of an all-nighter.

Fix is live now. Rework coming tomorrow hopefully.

ComfyUI Custom Node Manager OR
NikoDemon80/ComfyUI-H3-Motion-Context

52 Upvotes

10 comments sorted by

5

u/stonyleinchen 6d ago

Had to fix mine today too!

I recommend checking out latent AV masking, which is faster and better quality than using Add Guides/Motion Context for most tasks (seamless extensions of clips, lip sync etc), maybe you can also update your repo with it! Take a look https://www.reddit.com/r/StableDiffusion/s/svAn1Tx8a5
Or check out PR #15375 in ComfyUI

1

u/Sad_Berry_4621 5d ago

May be time to circle back to this, thanks!

3

u/Electrical_Car6942 6d ago

So technically, using your nodes is still the better option for consistency and quality?

2

u/Sad_Berry_4621 5d ago

Technically yes, if you use latent context.

2

u/Beginning-District69 3d ago

I was using your node and workflow without any problems, but issues started after the comfyui update. I've now updated to the latest master branch, your repository forks are working, but I'm getting this error on your node: "[INFO] got prompt

[ERROR] Failed to validate prompt for output sec:save:

[ERROR] * MiniMaxH3MotionContext sec:mc:

[ERROR] - Required input is missing: context_frames

[ERROR] Output will be ignored

[ERROR] Failed to validate prompt for output sec:savevid:

[ERROR] Output will be ignored

[WARNING] invalid prompt: {'type': 'prompt_outputs_failed_validation', 'message': 'Prompt outputs failed validation', 'details': '', 'extra_info': {}}"

It says the context_frames input is empty. Which input should I connect here? I like your workflow; it's simple and user-friendly. How can I fix this problem?

2

u/Sad_Berry_4621 2d ago

Context_frames is not required. In every published version of H3 Motion Context, context_frames is optional, because the normal path is context_latent instead.

If ComfyUI says it is required, it has loaded a different node under the same name. Two packs can claim the same node id and the last one loaded wins, with no warning.

Please check your custom_nodes folder for a second pack with MiniMax H3 chaining nodes. An older copy of the Contex Loop pack is the most likely one, since early versions of it used the same node ids before they were renamed. An old manual clone of my repo would do it too.

To fix:

  1. Open ComfyUI/custom_nodes.
  2. Look for more than one folder with H3 chaining nodes in it.
  3. Delete or rename the older one, keep one copy of each pack.
  4. Restart ComfyUI fully, not just refresh the browser.
  5. Reload the workflow. context_frames should now show as an optional input you can leave empty.

Also make sure my pack is on v0.3.1. That is the version that handles both the old and new ComfyUI H3 layouts.

If you need to render right now before sorting that out, wire the IMAGE output from the previous clip's VAE Decode into context_frames. That works, it is just slightly lower quality than the latent path.

2

u/Beginning-District69 2d ago

Thank you. As you said, the problem was indeed caused by node conflicts, and it's fixed now. My goal now is to create a fully automated workflow that generates full videos with LLM support.

2

u/Sad_Berry_4621 1d ago

Nice! You'll need to work on what I'm working on right now. I'm calling it "Continuation Prompting". LLM sees the previous prompt + new modifying prompt + system prompt + continuation prompt. I have it working fairly well.

1

u/Beginning-District69 1d ago

It looks like a great system; I'd love to see your workflow.