Skip to content

MiniMax H3 Cache broken after ComfyUI update — FinalLayer.forward() missing sigma, sample_sigmas, and shifts #25

Description

@ClayShoaf

After updating ComfyUI using Manager's Update All, MiniMax H3 generation fails when using the UtilsCollection MiniMax H3 patch/cache functionality.

The error is:

TypeError: FinalLayer.forward() missing 3 required positional arguments: 'sigma', 'sample_sigmas', and 'shifts'

What appears to be happening

ComfyUI's MiniMax H3 implementation has changed the signature of FinalLayer.forward() to require three additional arguments:

  • sigma
  • sample_sigmas
  • shifts

UtilsCollection's minimax_h3_block_patch_forward() appears to still call self.final_layer() using the previous argument list.

The relevant part of the traceback is:

File ".../ComfyUI/comfy/ldm/minimax/model.py", line 566, in forward
    out = comfy.patcher_extension.WrapperExecutor.new_class_executor(

File ".../ComfyUI/custom_nodes/ComfyUI-UtilsCollection/patcher_helpers.py", line 1275, in minimax_h3_block_patch_forward
    video_result, audio_result = self.final_layer(

File ".../torch/nn/modules/module.py", line 1789, in _call_impl
    return forward_call(*args, **kwargs)

TypeError: FinalLayer.forward() missing 3 required positional arguments:
'sigma', 'sample_sigmas', and 'shifts'

Expected behavior

MiniMax H3 generation using the UtilsCollection H3 patch/cache should continue to work with current ComfyUI.

Actual behavior

Sampling begins, but generation immediately fails when minimax_h3_block_patch_forward() reaches self.final_layer().

Likely compatibility issue

Current ComfyUI appears to call the final layer with additional H3 sampling information, while the UtilsCollection patched forward path still uses the older call signature.

The UtilsCollection call will presumably need to be updated to pass the equivalent values now used by ComfyUI core, including the current sigma, sample sigmas, and video/audio shifts.

Reproduction

  1. Update ComfyUI and custom nodes using ComfyUI Manager's Update All.
  2. Load a MiniMax H3 workflow using the UtilsCollection MiniMax H3 cache/patch functionality.
  3. Start generation.
  4. Sampling fails with:
FinalLayer.forward() missing 3 required positional arguments:
'sigma', 'sample_sigmas', and 'shifts'

Environment

  • Linux
  • Python 3.12
  • Current/recent ComfyUI
  • Current/recent ComfyUI-UtilsCollection
  • MiniMax H3 workflow
  • UtilsCollection H3 cache/patch enabled

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions