[bug?] MMH3 BlockSparseAttention produces nondeterministic result when block 49 is sparse

Open
#17,991 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
22/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Active
Tech stack
python, pytorch

Research direction

Start by reproducing the run-to-run difference with the Model Sparse Attention node at default settings and block 49 sparse, then compare against block 49 dense, which the reporter says is bit-identical. The payload names no files, so locate the BlockSparseAttention code path from the node name. Done means two runs after a restart produce bit-identical output, and the cause is identified, whether it is a bug or expected MMH3 behaviour.

Written by the indexing model from the issue text.

Description

Potential Bug
Custom Node Testing
Expected Behavior

Using the model with sparse attention nodes, when the same workflow is run twice, the results should be bit-identical.

Actual Behavior

Two results are not bit identical. File size and bit rate are different. Used a script to compare same frames of the clips and they were different.

Steps to Reproduce
  • Standard MMH3 FL2VA with a first frame
  • Pika flex turbo lora at 6 step, lcm, its 6 manual sigmas (not sure if it matters but this was my test)
  • Connect Model Sparse attention node to model. Use default setting
  • Run a workflow > restart comfyUI > run same workflow again.
  • The outputs are always different each run unless I run block 49 full dense, which will make outputs bit-identical.
Debug Logs
no error in debug logs
Other

Idk if this is a bug or this is how MMH3 supposed to work?

ComfyUI v0.46.0-32-g4708f03f6
PyTorch 2.13.0+cu130
comfy-kitchen 0.2.42
Model: MiniMax H3 INT8 ConvRot

Dominant language
Python
Stars
150k
Forks
17.9k
Avg merge
1d 1h
Merged PRs (30d)
181

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Comfy-Org/ComfyUI

All issues in Comfy-Org/ComfyUI

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.