[GH-ISSUE #110] ck-attention STILL crashes on AMD after #104 fix #36

Open
opened 2026-10-26 22:19:28 +00:00 by bsakaguchi · 14 comments
Owner

Originally created by @YAY-3M-TA3 on GitHub (Aug 12, 2026).
Original GitHub issue: https://github.com/Comfy-Org/comfy-kitchen/issues/110

ck-attention STILL crashes on AMD after #104 fix.

My system:
win 11, gfx 1151 (AMD Radeon 8060s), python 3.12, using AMD pytorch from https://repo.radeon.com/rocm/windows/rocm-rel-7.2.1/

pip install `
    -f https://repo.radeon.com/rocm/windows/rocm-rel-7.2.1/ `
    "torch==2.9.1+rocm7.2.1" `
    "torchvision==0.24.1+rocm7.2.1" `
    "torchaudio==2.9.1+rocm7.2.1" `
    numpy pillow

PYPI package hadn't updated yet, so I grabbed the windows 3.12 amd whl from the build artifact: https://github.com/Comfy-Org/comfy-kitchen/actions/runs/31491146906/artifacts/9101500506

Steps to reproduce:
I did a force reinstall of the new whl
python -m pip install --no-cache-dir --force-reinstall comfy_kitchen-0.2.30-cp312-abi3-win_amd64.whl

then ran comfyui
python main.py --listen 127.0.0.1 --port 8188 --use-ck-attention

Then just loaded the comfy WF templates for minimax h3 Image-to-video and text-to-video - no modifications, I just ran each.
Note: I did notice in the start up log

[INFO] Using pytorch attention
[INFO] Using Comfy Kitchen attention

I thought it should only show one attention not both?

anyways, after models load up and sampler starts processing, here is the error:
**(NOTE - I ran this test for these test combinations and got the same error

  1. Image-to-video with global flag --use-ck-attention and no mods
  2. Text-to-video with global flag --use-ck-attention and no mods
  3. Image-to-video restart comfy without global flag --use-ck-attention and added backend node
  4. Text-to-video restart comfy without global flag --use-ck-attention and added backend node
    )**

error:

[INFO] got prompt
[INFO] VAE load device: cuda:0, offload device: cpu, dtype: torch.float32
[INFO] VAE load device: cuda:0, offload device: cpu, dtype: torch.float16
[INFO] Found quantization metadata version 1
[INFO] Using MixedPrecisionOps for text encoder
[INFO] Requested to load MiniMaxH3TEModel_
[INFO] loaded completely;  14960.20 MB loaded, full load: True
[INFO] CLIP/text encoder model load device: cuda:0, offload device: cpu, current: cuda:0, dtype: torch.float16
C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\ops.py:95: UserWarning: Using AOTriton backend for Efficient Attention forward... (Triggered internally at C:/b/pytorch/aten/src/ATen/native/transformers/hip/attention.hip:1452.)
  return torch.nn.functional.scaled_dot_product_attention(q, k, v, *args, **kwargs)
[INFO] Found quantization metadata version 1
[INFO] Detected mixed precision quantization
[INFO] Using mixed precision operations
[INFO] Native ops: int8_tensorwise, asym_w4a8_int8, convrot_w4a4 , emulated ops: float8_e4m3fn, mxfp8, nvfp4, float8_e5m2
[INFO] model weight dtype torch.bfloat16, manual cast: torch.bfloat16
[INFO] model_type FLOW_AV
[INFO] Requested to load MiniMaxH3
[INFO] loaded completely; 70683.17 MB usable, 19996.14 MB loaded, full load: True
  0%|                                                                                           | 0/20 [00:00<?, ?it/s]
[ERROR] !!! Exception during processing !!! sage int8 attention: Q/K base pointers and B/H/N strides must preserve 4-element alignment
[ERROR] Traceback (most recent call last):
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\execution.py", line 545, in execute
    output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)
                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\execution.py", line 344, in get_output_data
    return_values = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\execution.py", line 318, in _async_map_node_over_list
    await process_inputs(input_dict, i)
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\execution.py", line 306, in process_inputs
    result = f(**inputs)
             ^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy_api\internal\__init__.py", line 149, in wrapped_func
    return method(locked_class, **inputs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy_api\latest\_io.py", line 1990, in EXECUTE_NORMALIZED
    to_return = cls.execute(*args, **kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy_extras\nodes_custom_sampler.py", line 1055, in execute
    samples = guider.sample(noise.generate_noise(latent), latent_image, sampler, sigmas, denoise_mask=noise_mask, callback=callback, disable_pbar=disable_pbar, seed=noise.seed)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\samplers.py", line 1335, in sample
    output = executor.execute(noise, latent_image, sampler, sigmas, denoise_mask, callback, disable_pbar, seed, latent_shapes=latent_shapes)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\patcher_extension.py", line 113, in execute
    return self.original(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\samplers.py", line 1262, in outer_sample
    output = self.inner_sample(noise, latent_image, device, sampler, sigmas, denoise_mask, callback, disable_pbar, seed, latent_shapes=latent_shapes)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\samplers.py", line 1237, in inner_sample
    samples = executor.execute(self, sigmas, extra_args, callback, noise, latent_image, denoise_mask, disable_pbar)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\patcher_extension.py", line 113, in execute
    return self.original(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\samplers.py", line 1005, in sample
    samples = self.sampler_function(model_k, noise, sigmas, extra_args=extra_args, callback=k_callback, disable=disable_pbar, **self.extra_options)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\torch\utils\_contextlib.py", line 120, in decorate_context
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\k_diffusion\sampling.py", line 1460, in sample_res_multistep
    return res_multistep(model, x, sigmas, extra_args=extra_args, callback=callback, disable=disable, s_noise=s_noise, noise_sampler=noise_sampler, eta=0., cfg_pp=False)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\torch\utils\_contextlib.py", line 120, in decorate_context
    return func(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\k_diffusion\sampling.py", line 1418, in res_multistep
    denoised = model(x, sigmas[i] * s_in, **extra_args)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\samplers.py", line 640, in __call__
    out = self.inner_model(x, sigma, model_options=model_options, seed=seed)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\samplers.py", line 1208, in __call__
    return self.outer_predict_noise(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\samplers.py", line 1215, in outer_predict_noise
    ).execute(x, timestep, model_options, seed)
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\patcher_extension.py", line 113, in execute
    return self.original(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\samplers.py", line 1218, in predict_noise
    return sampling_function(self.inner_model, x, timestep, self.conds.get("negative", None), self.conds.get("positive", None), self.cfg, model_options=model_options, seed=seed)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\samplers.py", line 620, in sampling_function
    out = calc_cond_batch(model, conds, x, timestep, model_options)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\samplers.py", line 211, in calc_cond_batch
    return _calc_cond_batch_outer(model, conds, x_in, timestep, model_options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\samplers.py", line 219, in _calc_cond_batch_outer
    return executor.execute(model, conds, x_in, timestep, model_options)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\patcher_extension.py", line 113, in execute
    return self.original(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\samplers.py", line 335, in _calc_cond_batch
    output = model.apply_model(input_x, timestep_, **c).chunk(batch_chunks)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\model_base.py", line 203, in apply_model
    return comfy.patcher_extension.WrapperExecutor.new_class_executor(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\patcher_extension.py", line 113, in execute
    return self.original(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\model_base.py", line 247, in _apply_model
    model_output = self.diffusion_model(xc, t, context=context, control=control, transformer_options=transformer_options, **extra_conds)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\torch\nn\modules\module.py", line 1775, in_wrapped_call_impl
    return self._call_impl(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\torch\nn\modules\module.py", line 1786, in_call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\ldm\minimax\model.py", line 502, in forward
    out = comfy.patcher_extension.WrapperExecutor.new_class_executor(
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\patcher_extension.py", line 113, in execute
    return self.original(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\ldm\minimax\model.py", line 638, in _forward
    h = block(h, t_emb, mod_segments, rope_freqs, transformer_options=transformer_options)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\torch\nn\modules\module.py", line 1775, in_wrapped_call_impl
    return self._call_impl(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\torch\nn\modules\module.py", line 1786, in_call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\ldm\minimax\model.py", line 261, in forward
    x = _mod_gate(x, gate_msa, self.attn(h, rope_freqs=rope_freqs, transformer_options=transformer_options), mod_segments)
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\torch\nn\modules\module.py", line 1775, in_wrapped_call_impl
    return self._call_impl(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\torch\nn\modules\module.py", line 1786, in_call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\ldm\minimax\model.py", line 172, in forward
    out = optimized_attention(q, k, v, self.heads, mask=None, skip_reshape=True, transformer_options=transformer_options)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\ldm\modules\attention.py", line 191, in wrapper
    return optimized_attention_override.container_function(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\ldm\modules\attention.py", line 628, in _attention_comfy_kitchen_int8_containers
    quantized = comfy_kitchen.prequantize_int8_attention(
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\comfy_kitchen\sage_attention.py", line 309, in prequantize_int8_attention
    packed = _hip_backend.sage_int8_quantize(q, k, v, cta_k=hip_cta_k)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\comfy_kitchen\backends\hip\__init__.py", line 2135, in sage_int8_quantize
    _C.sage_sdpa_quantize(
RuntimeError: sage int8 attention: Q/K base pointers and B/H/N strides must preserve 4-element alignment

[INFO] Prompt executed in 70.60 seconds

@0xDELUXA

Originally created by @YAY-3M-TA3 on GitHub (Aug 12, 2026). Original GitHub issue: https://github.com/Comfy-Org/comfy-kitchen/issues/110 ck-attention STILL crashes on AMD after #104 fix. My system: win 11, gfx 1151 (AMD Radeon 8060s), python 3.12, using AMD pytorch from https://repo.radeon.com/rocm/windows/rocm-rel-7.2.1/ ``` pip install ` -f https://repo.radeon.com/rocm/windows/rocm-rel-7.2.1/ ` "torch==2.9.1+rocm7.2.1" ` "torchvision==0.24.1+rocm7.2.1" ` "torchaudio==2.9.1+rocm7.2.1" ` numpy pillow ``` PYPI package hadn't updated yet, so I grabbed the windows 3.12 amd whl from the build artifact: https://github.com/Comfy-Org/comfy-kitchen/actions/runs/31491146906/artifacts/9101500506 Steps to reproduce: I did a force reinstall of the new whl `python -m pip install --no-cache-dir --force-reinstall comfy_kitchen-0.2.30-cp312-abi3-win_amd64.whl` then ran comfyui `python main.py --listen 127.0.0.1 --port 8188 --use-ck-attention` Then just loaded the comfy WF templates for minimax h3 Image-to-video and text-to-video - no modifications, I just ran each. **Note: I did notice in the start up log** ``` [INFO] Using pytorch attention [INFO] Using Comfy Kitchen attention ``` _I thought it should only show one attention not both?_ anyways, after models load up and sampler starts processing, here is the error: **(NOTE - I ran this test for these test combinations and got the same error 1. Image-to-video with global flag --use-ck-attention and no mods 2. Text-to-video with global flag --use-ck-attention and no mods 3. Image-to-video restart comfy without global flag --use-ck-attention and added backend node 4. Text-to-video restart comfy without global flag --use-ck-attention and added backend node )** error: ``` [INFO] got prompt [INFO] VAE load device: cuda:0, offload device: cpu, dtype: torch.float32 [INFO] VAE load device: cuda:0, offload device: cpu, dtype: torch.float16 [INFO] Found quantization metadata version 1 [INFO] Using MixedPrecisionOps for text encoder [INFO] Requested to load MiniMaxH3TEModel_ [INFO] loaded completely; 14960.20 MB loaded, full load: True [INFO] CLIP/text encoder model load device: cuda:0, offload device: cpu, current: cuda:0, dtype: torch.float16 C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\ops.py:95: UserWarning: Using AOTriton backend for Efficient Attention forward... (Triggered internally at C:/b/pytorch/aten/src/ATen/native/transformers/hip/attention.hip:1452.) return torch.nn.functional.scaled_dot_product_attention(q, k, v, *args, **kwargs) [INFO] Found quantization metadata version 1 [INFO] Detected mixed precision quantization [INFO] Using mixed precision operations [INFO] Native ops: int8_tensorwise, asym_w4a8_int8, convrot_w4a4 , emulated ops: float8_e4m3fn, mxfp8, nvfp4, float8_e5m2 [INFO] model weight dtype torch.bfloat16, manual cast: torch.bfloat16 [INFO] model_type FLOW_AV [INFO] Requested to load MiniMaxH3 [INFO] loaded completely; 70683.17 MB usable, 19996.14 MB loaded, full load: True 0%| | 0/20 [00:00<?, ?it/s] [ERROR] !!! Exception during processing !!! sage int8 attention: Q/K base pointers and B/H/N strides must preserve 4-element alignment [ERROR] Traceback (most recent call last): File "C:\AI\Comfyui-amd-20260805\ComfyUI\execution.py", line 545, in execute output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\execution.py", line 344, in get_output_data return_values = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\execution.py", line 318, in _async_map_node_over_list await process_inputs(input_dict, i) File "C:\AI\Comfyui-amd-20260805\ComfyUI\execution.py", line 306, in process_inputs result = f(**inputs) ^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy_api\internal\__init__.py", line 149, in wrapped_func return method(locked_class, **inputs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy_api\latest\_io.py", line 1990, in EXECUTE_NORMALIZED to_return = cls.execute(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy_extras\nodes_custom_sampler.py", line 1055, in execute samples = guider.sample(noise.generate_noise(latent), latent_image, sampler, sigmas, denoise_mask=noise_mask, callback=callback, disable_pbar=disable_pbar, seed=noise.seed) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\samplers.py", line 1335, in sample output = executor.execute(noise, latent_image, sampler, sigmas, denoise_mask, callback, disable_pbar, seed, latent_shapes=latent_shapes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\patcher_extension.py", line 113, in execute return self.original(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\samplers.py", line 1262, in outer_sample output = self.inner_sample(noise, latent_image, device, sampler, sigmas, denoise_mask, callback, disable_pbar, seed, latent_shapes=latent_shapes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\samplers.py", line 1237, in inner_sample samples = executor.execute(self, sigmas, extra_args, callback, noise, latent_image, denoise_mask, disable_pbar) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\patcher_extension.py", line 113, in execute return self.original(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\samplers.py", line 1005, in sample samples = self.sampler_function(model_k, noise, sigmas, extra_args=extra_args, callback=k_callback, disable=disable_pbar, **self.extra_options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\torch\utils\_contextlib.py", line 120, in decorate_context return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\k_diffusion\sampling.py", line 1460, in sample_res_multistep return res_multistep(model, x, sigmas, extra_args=extra_args, callback=callback, disable=disable, s_noise=s_noise, noise_sampler=noise_sampler, eta=0., cfg_pp=False) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\torch\utils\_contextlib.py", line 120, in decorate_context return func(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\k_diffusion\sampling.py", line 1418, in res_multistep denoised = model(x, sigmas[i] * s_in, **extra_args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\samplers.py", line 640, in __call__ out = self.inner_model(x, sigma, model_options=model_options, seed=seed) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\samplers.py", line 1208, in __call__ return self.outer_predict_noise(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\samplers.py", line 1215, in outer_predict_noise ).execute(x, timestep, model_options, seed) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\patcher_extension.py", line 113, in execute return self.original(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\samplers.py", line 1218, in predict_noise return sampling_function(self.inner_model, x, timestep, self.conds.get("negative", None), self.conds.get("positive", None), self.cfg, model_options=model_options, seed=seed) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\samplers.py", line 620, in sampling_function out = calc_cond_batch(model, conds, x, timestep, model_options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\samplers.py", line 211, in calc_cond_batch return _calc_cond_batch_outer(model, conds, x_in, timestep, model_options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\samplers.py", line 219, in _calc_cond_batch_outer return executor.execute(model, conds, x_in, timestep, model_options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\patcher_extension.py", line 113, in execute return self.original(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\samplers.py", line 335, in _calc_cond_batch output = model.apply_model(input_x, timestep_, **c).chunk(batch_chunks) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\model_base.py", line 203, in apply_model return comfy.patcher_extension.WrapperExecutor.new_class_executor( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\patcher_extension.py", line 113, in execute return self.original(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\model_base.py", line 247, in _apply_model model_output = self.diffusion_model(xc, t, context=context, control=control, transformer_options=transformer_options, **extra_conds) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\torch\nn\modules\module.py", line 1775, in_wrapped_call_impl return self._call_impl(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\torch\nn\modules\module.py", line 1786, in_call_impl return forward_call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\ldm\minimax\model.py", line 502, in forward out = comfy.patcher_extension.WrapperExecutor.new_class_executor( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\patcher_extension.py", line 113, in execute return self.original(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\ldm\minimax\model.py", line 638, in _forward h = block(h, t_emb, mod_segments, rope_freqs, transformer_options=transformer_options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\torch\nn\modules\module.py", line 1775, in_wrapped_call_impl return self._call_impl(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\torch\nn\modules\module.py", line 1786, in_call_impl return forward_call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\ldm\minimax\model.py", line 261, in forward x = _mod_gate(x, gate_msa, self.attn(h, rope_freqs=rope_freqs, transformer_options=transformer_options), mod_segments) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\torch\nn\modules\module.py", line 1775, in_wrapped_call_impl return self._call_impl(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\torch\nn\modules\module.py", line 1786, in_call_impl return forward_call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\ldm\minimax\model.py", line 172, in forward out = optimized_attention(q, k, v, self.heads, mask=None, skip_reshape=True, transformer_options=transformer_options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\ldm\modules\attention.py", line 191, in wrapper return optimized_attention_override.container_function(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\ldm\modules\attention.py", line 628, in _attention_comfy_kitchen_int8_containers quantized = comfy_kitchen.prequantize_int8_attention( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\comfy_kitchen\sage_attention.py", line 309, in prequantize_int8_attention packed = _hip_backend.sage_int8_quantize(q, k, v, cta_k=hip_cta_k) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\comfy_kitchen\backends\hip\__init__.py", line 2135, in sage_int8_quantize _C.sage_sdpa_quantize( RuntimeError: sage int8 attention: Q/K base pointers and B/H/N strides must preserve 4-element alignment [INFO] Prompt executed in 70.60 seconds ``` @0xDELUXA
Author
Owner

@coderabbitai[bot] commented on GitHub (Aug 12, 2026):

🔗 Related PRs

Comfy-Org/comfy-kitchen#103 - Implement optimized int8 attention. [merged]
Comfy-Org/comfy-kitchen#104 - HIP port of #103: optimized int8 attention [merged]


🧪 Issue enrichment is currently in open beta.

You can configure auto-planning by selecting labels in the issue_enrichment configuration.

To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

issue_enrichment:
  auto_enrich:
    enabled: false

💬 Have feedback or questions? Drop into our discord!

<!-- gh-comment-id:5265842867 --> @coderabbitai[bot] commented on GitHub (Aug 12, 2026): <!-- This is an auto-generated issue plan by CodeRabbit --> <details> <summary>🔗 Related PRs</summary> Comfy-Org/comfy-kitchen#103 - Implement optimized int8 attention. [merged] Comfy-Org/comfy-kitchen#104 - HIP port of `#103`: optimized int8 attention [merged] </details> --- <details> <summary> 🧪 Issue enrichment is currently in open beta.</summary> You can configure auto-planning by selecting labels in the issue_enrichment configuration. To disable automatic issue enrichment, add the following to your `.coderabbit.yaml`: ```yaml issue_enrichment: auto_enrich: enabled: false ``` </details> 💬 Have feedback or questions? Drop into our [discord](https://discord.gg/coderabbit)!
Author
Owner

@0xDELUXA commented on GitHub (Aug 12, 2026):

#104 wasn't a "fix".

Issues won't be solved any faster if you write things like it "STILL" crashes.

<!-- gh-comment-id:5265974989 --> @0xDELUXA commented on GitHub (Aug 12, 2026): [#104](https://github.com/Comfy-Org/comfy-kitchen/pull/104) wasn't a "fix". Issues won't be solved any faster if you write things like it "STILL" crashes.
Author
Owner

@0xDELUXA commented on GitHub (Aug 12, 2026):

The message you hit is a precondition the quantizer needs, not an AMD-specific one. The quantizers load four elements at a time from every row, so the Q/K base pointer and the B/H/N strides all have to keep that group aligned. The CUDA backend enforces the identical predicate in quant_qk_int8.cu:725, reached from its own sage_sdpa_quantize, so the same tensors would raise the same error on an NVIDIA card.

I ran the MiniMax H3 template here on RDNA4 (gfx1200, ComfyUI 0.32.0, comfy-kitchen 0.2.30, --use-ck-attention, "Using Comfy Kitchen attention" in the log) and it completed. The layout comfy/ldm/minimax/model.py builds is heads=56, head_dim=128, which gives Q/K strides (7168, 128, 21504, 1) - every term a multiple of 128, so stock H3 cannot fail this check. I confirmed separately that the guard does fire on a row stride of 130 and on an odd base pointer, so something is handing attention differently strided Q/K on your setup.

To pin it down, add this to comfy/ldm/modules/attention.py in _attention_comfy_kitchen_int8_containers, right before the "quantized = comfy_kitchen.prequantize_int8_attention(" line:

def _bad(t):
    return (t.stride(0) % 4 or t.stride(1) % 4 or t.stride(2) % 4
            or t.data_ptr() % (4 * t.element_size()))

if _bad(q) or _bad(k):
    logging.error("CK unaligned: q shape=%s stride=%s ptr%%8=%d | k shape=%s stride=%s ptr%%8=%d | dtype=%s",
                  tuple(q.shape), q.stride(), q.data_ptr() % 8,
                  tuple(k.shape), k.stride(), k.data_ptr() % 8, q.dtype)

and post the line it prints, together with a run using --disable-all-custom-nodes and the name of the exact MiniMax H3 checkpoint file you loaded.

<!-- gh-comment-id:5266246601 --> @0xDELUXA commented on GitHub (Aug 12, 2026): The message you hit is a precondition the quantizer needs, not an AMD-specific one. The quantizers load four elements at a time from every row, so the Q/K base pointer and the B/H/N strides all have to keep that group aligned. The CUDA backend enforces the identical predicate in quant_qk_int8.cu:725, reached from its own sage_sdpa_quantize, so the same tensors would raise the same error on an NVIDIA card. I ran the MiniMax H3 template here on RDNA4 (gfx1200, ComfyUI 0.32.0, comfy-kitchen 0.2.30, `--use-ck-attention`, "Using Comfy Kitchen attention" in the log) and it completed. The layout comfy/ldm/minimax/model.py builds is heads=56, head_dim=128, which gives Q/K strides (7168, 128, 21504, 1) - every term a multiple of 128, so stock H3 cannot fail this check. I confirmed separately that the guard does fire on a row stride of 130 and on an odd base pointer, so something is handing attention differently strided Q/K on your setup. To pin it down, add this to comfy/ldm/modules/attention.py in _attention_comfy_kitchen_int8_containers, right before the "quantized = comfy_kitchen.prequantize_int8_attention(" line: ```python def _bad(t): return (t.stride(0) % 4 or t.stride(1) % 4 or t.stride(2) % 4 or t.data_ptr() % (4 * t.element_size())) if _bad(q) or _bad(k): logging.error("CK unaligned: q shape=%s stride=%s ptr%%8=%d | k shape=%s stride=%s ptr%%8=%d | dtype=%s", tuple(q.shape), q.stride(), q.data_ptr() % 8, tuple(k.shape), k.stride(), k.data_ptr() % 8, q.dtype) ``` and post the line it prints, together with a run using `--disable-all-custom-nodes` and the name of the exact MiniMax H3 checkpoint file you loaded.
Author
Owner

@YAY-3M-TA3 commented on GitHub (Aug 12, 2026):

Ok - I just did another test with --disable-all-custom-nodes - same error shows up.

In terms of my run -
I tried to do this test with the standard comfyui (Not using the patientx-rocm). Only difference I can think of is that I am using the whls from amd https://repo.radeon.com/rocm/windows/rocm-rel-7.2.1/
"torch==2.9.1+rocm7.2.1" "torchvision==0.24.1+rocm7.2.1"
"torchaudio==2.9.1+rocm7.2.1"

the specific install instructions are from the amd blog 7/25/2026 - link https://rocm.blogs.amd.com/artificial-intelligence/comfyui-windows/README.html

I'll make the mods to attention.py and post the results again with the --disable-all-custom-nodes flag. along with the exact minimax h3 checkpoint - (I'm using the just the standard ones for the comfy native WF)

<!-- gh-comment-id:5266407757 --> @YAY-3M-TA3 commented on GitHub (Aug 12, 2026): Ok - I just did another test with --disable-all-custom-nodes - same error shows up. In terms of my run - I tried to do this test with the standard comfyui (Not using the patientx-rocm). Only difference I can think of is that I am using the whls from amd https://repo.radeon.com/rocm/windows/rocm-rel-7.2.1/ "torch==2.9.1+rocm7.2.1" ` "torchvision==0.24.1+rocm7.2.1" ` "torchaudio==2.9.1+rocm7.2.1" the specific install instructions are from the amd blog 7/25/2026 - link https://rocm.blogs.amd.com/artificial-intelligence/comfyui-windows/README.html I'll make the mods to attention.py and post the results again with the --disable-all-custom-nodes flag. along with the exact minimax h3 checkpoint - (I'm using the just the standard ones for the comfy native WF)
Author
Owner

@0xDELUXA commented on GitHub (Aug 12, 2026):

If your strides do come back misaligned from stock core code, the fix belongs in the shared Python (comfy_kitchen/sage_attention.py): fall back to q.contiguous() / k.contiguous() when the precondition fails, which fixes the issue for both CUDA and HIP. This should be proposed upstream rather than widening the HIP guard alone, since that would make HIP accept inputs that CUDA rejects.

<!-- gh-comment-id:5266721975 --> @0xDELUXA commented on GitHub (Aug 12, 2026): If your strides do come back misaligned from stock core code, the fix belongs in the shared Python (`comfy_kitchen/sage_attention.py`): fall back to `q.contiguous()` / `k.contiguous()` when the precondition fails, which fixes the issue for both CUDA and HIP. This should be proposed upstream rather than widening the HIP guard alone, since that would make HIP accept inputs that CUDA rejects.
Author
Owner

@YAY-3M-TA3 commented on GitHub (Aug 12, 2026):

If your strides do come back misaligned from stock core code, the fix belongs in the shared Python (comfy_kitchen/sage_attention.py): fall back to q.contiguous() / k.contiguous() when the precondition fails, which fixes the issue for both CUDA and HIP. This should be proposed upstream rather than widening the HIP guard alone, since that would make HIP accept inputs that CUDA rejects.

The bad(q) and bad (k) values returned zero, so I printed out a breakdown in-case that is useful...

--------------------attention_comfy_kitchen_int8_containers----------------------------------------
q:
q.stride(0) = 7168, q.stride(0) % 4 = 0
q.stride(1) = 128, q.stride(1) % 4 = 0
q.stride(2) = 7168, q.stride(2) % 4 = 0
q.data_ptr() = 16451850240, q.element_size() = 2, q.data_ptr() % (4 * q.element_size()) = 0
bad(q) = 0
k:
k.stride(0) = 7168, k.stride(0) % 4 = 0
k.stride(1) = 128, k.stride(1) % 4 = 0
k.stride(2) = 7168, k.stride(2) % 4 = 0
k.data_ptr() = 16726884352, k.element_size() = 2, k.data_ptr() % (4 * k.element_size()) = 0
bad(k) = 0
--------------------------------------------------------------------------------------------------------------

The MiniMax H3 checkpoints used:

minimax_h3_fl2va_pruned_int8_convrot.safetensors
qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors
minimax_h3_video_vae_fp16.safetensors
minimax_h3_audio_vae_fp32.safetensors

Here is the full run using --disable-all-custom-nodes and using the image-to-video native WF template:

(comfyui-amd-20260805) C:\AI\Comfyui-amd-20260805\ComfyUI>python main.py --listen 127.0.0.1 --port 8188 --disable-all-custom-nodes --use-ck-attention
[INFO] setup plugin alembic.autogenerate.schemas
[INFO] setup plugin alembic.autogenerate.tables
[INFO] setup plugin alembic.autogenerate.types
[INFO] setup plugin alembic.autogenerate.constraints
[INFO] setup plugin alembic.autogenerate.defaults
[INFO] setup plugin alembic.autogenerate.comments
[INFO] setup plugin alembic.autogenerate.checkconstraint_byname
[INFO] Found comfy_kitchen backend eager: {'available': True, 'disabled': False, 'unavailable_reason': None, 'capabilities': ['adaln', 'apply_rope', 'apply_rope1', 'apply_rope1_', 'apply_rope_', 'apply_rope_split_half', 'apply_rope_split_half1', 'apply_rope_split_half1_', 'apply_rope_split_half_', 'convrot_w4a4_linear', 'dequantize_convrot_w4a4_weight', 'dequantize_int8_convrot_weight', 'dequantize_int8_convrot_weight_dtype', 'dequantize_int8_embedding', 'dequantize_int8_simple', 'dequantize_int8_simple_dtype', 'dequantize_mxfp8', 'dequantize_nvfp4', 'dequantize_per_tensor_fp8', 'dequantize_w4a8_int8_weight', 'gemv_awq_w4a16', 'int8_linear', 'na3d', 'prepare_int4_weight_for_int8_linear', 'quantize_and_rotate_rowwise', 'quantize_convrot_w4a4_weight', 'quantize_int8_convrot_weight', 'quantize_int8_rowwise', 'quantize_int8_tensorwise', 'quantize_mxfp8', 'quantize_nvfp4', 'quantize_per_tensor_fp8', 'quantize_svdquant_w4a4', 'quantize_w4a8_int8_weight', 'rms_adaln', 'rms_rope', 'rms_rope1', 'rms_rope1_', 'rms_rope_', 'rms_rope_split_half', 'rms_rope_split_half1', 'rms_rope_split_half1_', 'rms_rope_split_half_', 'rotate_int8_convrot_weight', 'scaled_mm_mxfp8', 'scaled_mm_nvfp4', 'scaled_mm_svdquant_w4a4', 'stochastic_rounding_fp8', 'w4a8_int8_linear']}
[INFO] Found comfy_kitchen backend cuda: {'available': True, 'disabled': True, 'unavailable_reason': None, 'capabilities': ['adaln', 'apply_rope', 'apply_rope1', 'apply_rope1_', 'apply_rope_', 'apply_rope_split_half', 'apply_rope_split_half1', 'apply_rope_split_half1_', 'apply_rope_split_half_', 'convrot_w4a4_linear', 'dequantize_convrot_w4a4_weight', 'dequantize_int8_convrot_weight', 'dequantize_int8_convrot_weight_dtype', 'dequantize_int8_simple', 'dequantize_int8_simple_dtype', 'dequantize_nvfp4', 'dequantize_per_tensor_fp8', 'dequantize_w4a8_int8_weight', 'gemv_awq_w4a16', 'na3d', 'prepare_int4_weight_for_int8_linear', 'quantize_and_rotate_rowwise', 'quantize_convrot_w4a4_weight', 'quantize_int8_convrot_weight', 'quantize_int8_rowwise', 'quantize_int8_tensorwise', 'quantize_mxfp8', 'quantize_nvfp4', 'quantize_per_tensor_fp8', 'quantize_svdquant_w4a4', 'quantize_w4a8_int8_weight', 'rms_adaln', 'rms_rope', 'rms_rope1', 'rms_rope1_', 'rms_rope_', 'rms_rope_split_half', 'rms_rope_split_half1', 'rms_rope_split_half1_', 'rms_rope_split_half_', 'rotate_int8_convrot_weight', 'scaled_mm_svdquant_w4a4', 'stochastic_rounding_fp8', 'w4a8_int8_linear']}
[INFO] Found comfy_kitchen backend hip: {'available': True, 'disabled': False, 'unavailable_reason': None, 'capabilities': ['adaln', 'apply_rope', 'apply_rope1', 'apply_rope1_', 'apply_rope_', 'apply_rope_split_half', 'apply_rope_split_half1', 'apply_rope_split_half1_', 'apply_rope_split_half_', 'convrot_w4a4_linear', 'dequantize_convrot_w4a4_weight', 'dequantize_int8_convrot_weight_dtype', 'dequantize_int8_simple_dtype', 'dequantize_per_tensor_fp8', 'dequantize_w4a8_int8_weight', 'gemv_awq_w4a16', 'int8_linear', 'na3d', 'quantize_and_rotate_rowwise', 'quantize_convrot_w4a4_weight', 'quantize_int8_convrot_weight', 'quantize_int8_rowwise', 'quantize_int8_tensorwise', 'quantize_per_tensor_fp8', 'quantize_svdquant_w4a4', 'quantize_w4a8_int8_weight', 'rms_adaln', 'rms_rope', 'rms_rope1', 'rms_rope1_', 'rms_rope_', 'rms_rope_split_half', 'rms_rope_split_half1', 'rms_rope_split_half1_', 'rms_rope_split_half_', 'scaled_mm_svdquant_w4a4', 'stochastic_rounding_fp8', 'w4a8_int8_linear']}
[INFO] Found comfy_kitchen backend triton: {'available': True, 'disabled': True, 'unavailable_reason': None, 'capabilities': ['adaln', 'apply_rope', 'apply_rope1', 'apply_rope1_', 'apply_rope_', 'apply_rope_split_half', 'apply_rope_split_half1', 'apply_rope_split_half1_', 'apply_rope_split_half_', 'dequantize_nvfp4', 'dequantize_per_tensor_fp8', 'int8_linear', 'na3d', 'quantize_and_rotate_rowwise', 'quantize_int8_rowwise', 'quantize_mxfp8', 'quantize_nvfp4', 'quantize_per_tensor_fp8', 'rms_adaln', 'rms_rope', 'rms_rope1', 'rms_rope1_', 'rms_rope_', 'rms_rope_split_half', 'rms_rope_split_half1', 'rms_rope_split_half1_', 'rms_rope_split_half_', 'w4a8_int8_linear']}
[INFO] Checkpoint files will always be loaded safely.
[INFO] Total VRAM 89977 MB, total RAM 65175 MB
[INFO] pytorch version: 2.9.1+rocm7.2.1
[INFO] Set: torch.backends.cudnn.enabled = False for better AMD performance.
[INFO] AMD arch: gfx1151
[INFO] ROCm version: (7, 2)
[INFO] Set vram state to: NORMAL_VRAM
[INFO] Device: cuda:0 Radeon 8060S Graphics : native
[INFO] Using async weight offloading with 2 streams
[INFO] Enabled pinned memory 26069.0
C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\flash_attn\flash_attn_interface.py:17: UserWarning: flash_attn_2_cuda (which has ROCm/HIP kernels) not found, falling back to Triton implementation
  warnings.warn("flash_attn_2_cuda (which has ROCm/HIP kernels) not found, falling back to Triton implementation")
[aiter] Windows: CK and HIP ops are not available. Triton ops only.
[INFO] Using pytorch attention
[INFO] Using Comfy Kitchen attention
[INFO] Python version: 3.12.13 | packaged by Anaconda, Inc. | (main, Jul  9 2026, 14:26:47) [MSC v.1942 64 bit (AMD64)]
[INFO] ComfyUI version: 0.32.0
[INFO] comfy-aimdo version: 0.4.13
[INFO] comfy-kitchen version: 0.2.30
[INFO] comfyui-frontend-package version: 1.48.7
[INFO] comfyui-embedded-docs version: 0.5.9
[INFO] comfy-kitchen version: 0.2.30
[INFO] comfy-aimdo version: 0.4.13
[WARNING] ________________________________________________________________________
WARNING WARNING WARNING WARNING WARNING

Installed comfyui-workflow-templates version 0.11.37 is lower than the recommended version 0.11.40.

Please install the updated requirements.txt file by running:
C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\python.exe -m pip install -r C:\AI\Comfyui-amd-20260805\ComfyUI\requirements.txt
If you are on the portable package you can run: update\update_comfyui.bat to solve this problem.
________________________________________________________________________
[INFO] [Prompt Server] web root: C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\comfyui_frontend_package\static
[INFO] Asset seeder disabled
[INFO] No OpenGL_accelerate module loaded: No module named 'OpenGL_accelerate'
[INFO] Skipping loading of custom nodes
[INFO] Context impl SQLiteImpl.
[INFO] Will assume non-transactional DDL.
[INFO] Using RAM pressure cache.
[WARNING] ________________________________________________________________________
WARNING WARNING WARNING WARNING WARNING

Installed comfyui-workflow-templates version 0.11.37 is lower than the recommended version 0.11.40.

Please install the updated requirements.txt file by running:
C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\python.exe -m pip install -r C:\AI\Comfyui-amd-20260805\ComfyUI\requirements.txt
If you are on the portable package you can run: update\update_comfyui.bat to solve this problem.
________________________________________________________________________
[INFO] Starting server

[INFO] To see the GUI go to: http://127.0.0.1:8188
[INFO] got prompt
[INFO] VAE load device: cuda:0, offload device: cpu, dtype: torch.float32
[INFO] VAE load device: cuda:0, offload device: cpu, dtype: torch.float16
[INFO] Found quantization metadata version 1
[INFO] Using MixedPrecisionOps for text encoder
[INFO] Requested to load MiniMaxH3TEModel_
[INFO] loaded completely;  14960.20 MB loaded, full load: True
[INFO] CLIP/text encoder model load device: cuda:0, offload device: cpu, current: cuda:0, dtype: torch.float16
C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\ops.py:95: UserWarning: Using AOTriton backend for Efficient Attention forward... (Triggered internally at C:/b/pytorch/aten/src/ATen/native/transformers/hip/attention.hip:1452.)
  return torch.nn.functional.scaled_dot_product_attention(q, k, v, *args, **kwargs)
[INFO] Requested to load MiniMaxH3VideoVAE
[INFO] loaded completely; 72906.74 MB usable, 4966.19 MB loaded, full load: True
[INFO] Found quantization metadata version 1
[INFO] Detected mixed precision quantization
[INFO] Using mixed precision operations
[INFO] Native ops: convrot_w4a4, asym_w4a8_int8, int8_tensorwise , emulated ops: nvfp4, float8_e4m3fn, mxfp8, float8_e5m2
[INFO] model weight dtype torch.bfloat16, manual cast: torch.bfloat16
[INFO] model_type FLOW_AV
[INFO] Requested to load MiniMaxH3
[INFO] loaded completely; 65463.16 MB usable, 19996.14 MB loaded, full load: True
--------------------attention_comfy_kitchen_int8_containers----------------------------------------
q:
q.stride(0) = 7168, q.stride(0) % 4 = 0
q.stride(1) = 128, q.stride(1) % 4 = 0
q.stride(2) = 7168, q.stride(2) % 4 = 0
q.data_ptr() = 16451850240, q.element_size() = 2, q.data_ptr() % (4 * q.element_size()) = 0
bad(q) = 0
k:
k.stride(0) = 7168, k.stride(0) % 4 = 0
k.stride(1) = 128, k.stride(1) % 4 = 0
k.stride(2) = 7168, k.stride(2) % 4 = 0
k.data_ptr() = 16726884352, k.element_size() = 2, k.data_ptr() % (4 * k.element_size()) = 0
bad(k) = 0
--------------------------------------------------------------------------------------------------------------
[ERROR] !!! Exception during processing !!! sage int8 attention: Q/K base pointers and B/H/N strides must preserve 4-element alignment
[ERROR] Traceback (most recent call last):
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\execution.py", line 545, in execute
    output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)
                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\execution.py", line 344, in get_output_data
    return_values = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\execution.py", line 318, in _async_map_node_over_list
    await process_inputs(input_dict, i)
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\execution.py", line 306, in process_inputs
    result = f(**inputs)
             ^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy_api\internal\__init__.py", line 149, in wrapped_func
    return method(locked_class, **inputs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy_api\latest\_io.py", line 1990, in EXECUTE_NORMALIZED
    to_return = cls.execute(*args, **kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy_extras\nodes_custom_sampler.py", line 1055, in execute
    samples = guider.sample(noise.generate_noise(latent), latent_image, sampler, sigmas, denoise_mask=noise_mask, callback=callback, disable_pbar=disable_pbar, seed=noise.seed)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\samplers.py", line 1335, in sample
    output = executor.execute(noise, latent_image, sampler, sigmas, denoise_mask, callback, disable_pbar, seed, latent_shapes=latent_shapes)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\patcher_extension.py", line 113, in execute
    return self.original(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\samplers.py", line 1262, in outer_sample
    output = self.inner_sample(noise, latent_image, device, sampler, sigmas, denoise_mask, callback, disable_pbar, seed, latent_shapes=latent_shapes)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\samplers.py", line 1226, in inner_sample
    self.conds = process_conds(self.inner_model, noise, self.conds, device, latent_image, denoise_mask, seed, latent_shapes=latent_shapes)
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\samplers.py", line 1048, in process_conds
    conds[k] = encode_model_conds(model.extra_conds, conds[k], noise, device, k, latent_image=latent_image, denoise_mask=denoise_mask, seed=seed, latent_shapes=latent_shapes)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\samplers.py", line 953, in encode_model_conds
    out = model_function(**params)
          ^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\model_base.py", line 2150, in extra_conds
    cross_attn = self.diffusion_model.preprocess_text_embeds(
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\ldm\minimax\model.py", line 450, in preprocess_text_embeds
    return self.token_refiner(self.condition_proj(text_states[0])).unsqueeze(0)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\torch\nn\modules\module.py", line 1775, in_wrapped_call_impl
    return self._call_impl(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\torch\nn\modules\module.py", line 1786, in_call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\ldm\minimax\model.py", line 242, in forward
    x = block(x, transformer_options=transformer_options)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\torch\nn\modules\module.py", line 1775, in_wrapped_call_impl
    return self._call_impl(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\torch\nn\modules\module.py", line 1786, in_call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\ldm\minimax\model.py", line 227, in forward
    x = self.attn(self.norm1(x), transformer_options=transformer_options).add_(x)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\torch\nn\modules\module.py", line 1775, in_wrapped_call_impl
    return self._call_impl(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\torch\nn\modules\module.py", line 1786, in_call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\ldm\minimax\model.py", line 172, in forward
    out = optimized_attention(q, k, v, self.heads, mask=None, skip_reshape=True, transformer_options=transformer_options)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\ldm\modules\attention.py", line 197, in wrapper
    return wrapper.container_function(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\ldm\modules\attention.py", line 651, in _attention_comfy_kitchen_int8_containers
    quantized = comfy_kitchen.prequantize_int8_attention(
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\comfy_kitchen\sage_attention.py", line 309, in prequantize_int8_attention
    packed = _hip_backend.sage_int8_quantize(q, k, v, cta_k=hip_cta_k)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\comfy_kitchen\backends\hip\__init__.py", line 2135, in sage_int8_quantize
    _C.sage_sdpa_quantize(
RuntimeError: sage int8 attention: Q/K base pointers and B/H/N strides must preserve 4-element alignment

[INFO] Prompt executed in 88.69 seconds
<!-- gh-comment-id:5267522801 --> @YAY-3M-TA3 commented on GitHub (Aug 12, 2026): > If your strides do come back misaligned from stock core code, the fix belongs in the shared Python (`comfy_kitchen/sage_attention.py`): fall back to `q.contiguous()` / `k.contiguous()` when the precondition fails, which fixes the issue for both CUDA and HIP. This should be proposed upstream rather than widening the HIP guard alone, since that would make HIP accept inputs that CUDA rejects. The bad(q) and bad (k) values returned zero, so I printed out a breakdown in-case that is useful... ``` --------------------attention_comfy_kitchen_int8_containers---------------------------------------- q: q.stride(0) = 7168, q.stride(0) % 4 = 0 q.stride(1) = 128, q.stride(1) % 4 = 0 q.stride(2) = 7168, q.stride(2) % 4 = 0 q.data_ptr() = 16451850240, q.element_size() = 2, q.data_ptr() % (4 * q.element_size()) = 0 bad(q) = 0 k: k.stride(0) = 7168, k.stride(0) % 4 = 0 k.stride(1) = 128, k.stride(1) % 4 = 0 k.stride(2) = 7168, k.stride(2) % 4 = 0 k.data_ptr() = 16726884352, k.element_size() = 2, k.data_ptr() % (4 * k.element_size()) = 0 bad(k) = 0 -------------------------------------------------------------------------------------------------------------- ``` The MiniMax H3 checkpoints used: ``` minimax_h3_fl2va_pruned_int8_convrot.safetensors qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors minimax_h3_video_vae_fp16.safetensors minimax_h3_audio_vae_fp32.safetensors ``` Here is the full run using --disable-all-custom-nodes and using the image-to-video native WF template: ``` (comfyui-amd-20260805) C:\AI\Comfyui-amd-20260805\ComfyUI>python main.py --listen 127.0.0.1 --port 8188 --disable-all-custom-nodes --use-ck-attention [INFO] setup plugin alembic.autogenerate.schemas [INFO] setup plugin alembic.autogenerate.tables [INFO] setup plugin alembic.autogenerate.types [INFO] setup plugin alembic.autogenerate.constraints [INFO] setup plugin alembic.autogenerate.defaults [INFO] setup plugin alembic.autogenerate.comments [INFO] setup plugin alembic.autogenerate.checkconstraint_byname [INFO] Found comfy_kitchen backend eager: {'available': True, 'disabled': False, 'unavailable_reason': None, 'capabilities': ['adaln', 'apply_rope', 'apply_rope1', 'apply_rope1_', 'apply_rope_', 'apply_rope_split_half', 'apply_rope_split_half1', 'apply_rope_split_half1_', 'apply_rope_split_half_', 'convrot_w4a4_linear', 'dequantize_convrot_w4a4_weight', 'dequantize_int8_convrot_weight', 'dequantize_int8_convrot_weight_dtype', 'dequantize_int8_embedding', 'dequantize_int8_simple', 'dequantize_int8_simple_dtype', 'dequantize_mxfp8', 'dequantize_nvfp4', 'dequantize_per_tensor_fp8', 'dequantize_w4a8_int8_weight', 'gemv_awq_w4a16', 'int8_linear', 'na3d', 'prepare_int4_weight_for_int8_linear', 'quantize_and_rotate_rowwise', 'quantize_convrot_w4a4_weight', 'quantize_int8_convrot_weight', 'quantize_int8_rowwise', 'quantize_int8_tensorwise', 'quantize_mxfp8', 'quantize_nvfp4', 'quantize_per_tensor_fp8', 'quantize_svdquant_w4a4', 'quantize_w4a8_int8_weight', 'rms_adaln', 'rms_rope', 'rms_rope1', 'rms_rope1_', 'rms_rope_', 'rms_rope_split_half', 'rms_rope_split_half1', 'rms_rope_split_half1_', 'rms_rope_split_half_', 'rotate_int8_convrot_weight', 'scaled_mm_mxfp8', 'scaled_mm_nvfp4', 'scaled_mm_svdquant_w4a4', 'stochastic_rounding_fp8', 'w4a8_int8_linear']} [INFO] Found comfy_kitchen backend cuda: {'available': True, 'disabled': True, 'unavailable_reason': None, 'capabilities': ['adaln', 'apply_rope', 'apply_rope1', 'apply_rope1_', 'apply_rope_', 'apply_rope_split_half', 'apply_rope_split_half1', 'apply_rope_split_half1_', 'apply_rope_split_half_', 'convrot_w4a4_linear', 'dequantize_convrot_w4a4_weight', 'dequantize_int8_convrot_weight', 'dequantize_int8_convrot_weight_dtype', 'dequantize_int8_simple', 'dequantize_int8_simple_dtype', 'dequantize_nvfp4', 'dequantize_per_tensor_fp8', 'dequantize_w4a8_int8_weight', 'gemv_awq_w4a16', 'na3d', 'prepare_int4_weight_for_int8_linear', 'quantize_and_rotate_rowwise', 'quantize_convrot_w4a4_weight', 'quantize_int8_convrot_weight', 'quantize_int8_rowwise', 'quantize_int8_tensorwise', 'quantize_mxfp8', 'quantize_nvfp4', 'quantize_per_tensor_fp8', 'quantize_svdquant_w4a4', 'quantize_w4a8_int8_weight', 'rms_adaln', 'rms_rope', 'rms_rope1', 'rms_rope1_', 'rms_rope_', 'rms_rope_split_half', 'rms_rope_split_half1', 'rms_rope_split_half1_', 'rms_rope_split_half_', 'rotate_int8_convrot_weight', 'scaled_mm_svdquant_w4a4', 'stochastic_rounding_fp8', 'w4a8_int8_linear']} [INFO] Found comfy_kitchen backend hip: {'available': True, 'disabled': False, 'unavailable_reason': None, 'capabilities': ['adaln', 'apply_rope', 'apply_rope1', 'apply_rope1_', 'apply_rope_', 'apply_rope_split_half', 'apply_rope_split_half1', 'apply_rope_split_half1_', 'apply_rope_split_half_', 'convrot_w4a4_linear', 'dequantize_convrot_w4a4_weight', 'dequantize_int8_convrot_weight_dtype', 'dequantize_int8_simple_dtype', 'dequantize_per_tensor_fp8', 'dequantize_w4a8_int8_weight', 'gemv_awq_w4a16', 'int8_linear', 'na3d', 'quantize_and_rotate_rowwise', 'quantize_convrot_w4a4_weight', 'quantize_int8_convrot_weight', 'quantize_int8_rowwise', 'quantize_int8_tensorwise', 'quantize_per_tensor_fp8', 'quantize_svdquant_w4a4', 'quantize_w4a8_int8_weight', 'rms_adaln', 'rms_rope', 'rms_rope1', 'rms_rope1_', 'rms_rope_', 'rms_rope_split_half', 'rms_rope_split_half1', 'rms_rope_split_half1_', 'rms_rope_split_half_', 'scaled_mm_svdquant_w4a4', 'stochastic_rounding_fp8', 'w4a8_int8_linear']} [INFO] Found comfy_kitchen backend triton: {'available': True, 'disabled': True, 'unavailable_reason': None, 'capabilities': ['adaln', 'apply_rope', 'apply_rope1', 'apply_rope1_', 'apply_rope_', 'apply_rope_split_half', 'apply_rope_split_half1', 'apply_rope_split_half1_', 'apply_rope_split_half_', 'dequantize_nvfp4', 'dequantize_per_tensor_fp8', 'int8_linear', 'na3d', 'quantize_and_rotate_rowwise', 'quantize_int8_rowwise', 'quantize_mxfp8', 'quantize_nvfp4', 'quantize_per_tensor_fp8', 'rms_adaln', 'rms_rope', 'rms_rope1', 'rms_rope1_', 'rms_rope_', 'rms_rope_split_half', 'rms_rope_split_half1', 'rms_rope_split_half1_', 'rms_rope_split_half_', 'w4a8_int8_linear']} [INFO] Checkpoint files will always be loaded safely. [INFO] Total VRAM 89977 MB, total RAM 65175 MB [INFO] pytorch version: 2.9.1+rocm7.2.1 [INFO] Set: torch.backends.cudnn.enabled = False for better AMD performance. [INFO] AMD arch: gfx1151 [INFO] ROCm version: (7, 2) [INFO] Set vram state to: NORMAL_VRAM [INFO] Device: cuda:0 Radeon 8060S Graphics : native [INFO] Using async weight offloading with 2 streams [INFO] Enabled pinned memory 26069.0 C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\flash_attn\flash_attn_interface.py:17: UserWarning: flash_attn_2_cuda (which has ROCm/HIP kernels) not found, falling back to Triton implementation warnings.warn("flash_attn_2_cuda (which has ROCm/HIP kernels) not found, falling back to Triton implementation") [aiter] Windows: CK and HIP ops are not available. Triton ops only. [INFO] Using pytorch attention [INFO] Using Comfy Kitchen attention [INFO] Python version: 3.12.13 | packaged by Anaconda, Inc. | (main, Jul 9 2026, 14:26:47) [MSC v.1942 64 bit (AMD64)] [INFO] ComfyUI version: 0.32.0 [INFO] comfy-aimdo version: 0.4.13 [INFO] comfy-kitchen version: 0.2.30 [INFO] comfyui-frontend-package version: 1.48.7 [INFO] comfyui-embedded-docs version: 0.5.9 [INFO] comfy-kitchen version: 0.2.30 [INFO] comfy-aimdo version: 0.4.13 [WARNING] ________________________________________________________________________ WARNING WARNING WARNING WARNING WARNING Installed comfyui-workflow-templates version 0.11.37 is lower than the recommended version 0.11.40. Please install the updated requirements.txt file by running: C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\python.exe -m pip install -r C:\AI\Comfyui-amd-20260805\ComfyUI\requirements.txt If you are on the portable package you can run: update\update_comfyui.bat to solve this problem. ________________________________________________________________________ [INFO] [Prompt Server] web root: C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\comfyui_frontend_package\static [INFO] Asset seeder disabled [INFO] No OpenGL_accelerate module loaded: No module named 'OpenGL_accelerate' [INFO] Skipping loading of custom nodes [INFO] Context impl SQLiteImpl. [INFO] Will assume non-transactional DDL. [INFO] Using RAM pressure cache. [WARNING] ________________________________________________________________________ WARNING WARNING WARNING WARNING WARNING Installed comfyui-workflow-templates version 0.11.37 is lower than the recommended version 0.11.40. Please install the updated requirements.txt file by running: C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\python.exe -m pip install -r C:\AI\Comfyui-amd-20260805\ComfyUI\requirements.txt If you are on the portable package you can run: update\update_comfyui.bat to solve this problem. ________________________________________________________________________ [INFO] Starting server [INFO] To see the GUI go to: http://127.0.0.1:8188 [INFO] got prompt [INFO] VAE load device: cuda:0, offload device: cpu, dtype: torch.float32 [INFO] VAE load device: cuda:0, offload device: cpu, dtype: torch.float16 [INFO] Found quantization metadata version 1 [INFO] Using MixedPrecisionOps for text encoder [INFO] Requested to load MiniMaxH3TEModel_ [INFO] loaded completely; 14960.20 MB loaded, full load: True [INFO] CLIP/text encoder model load device: cuda:0, offload device: cpu, current: cuda:0, dtype: torch.float16 C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\ops.py:95: UserWarning: Using AOTriton backend for Efficient Attention forward... (Triggered internally at C:/b/pytorch/aten/src/ATen/native/transformers/hip/attention.hip:1452.) return torch.nn.functional.scaled_dot_product_attention(q, k, v, *args, **kwargs) [INFO] Requested to load MiniMaxH3VideoVAE [INFO] loaded completely; 72906.74 MB usable, 4966.19 MB loaded, full load: True [INFO] Found quantization metadata version 1 [INFO] Detected mixed precision quantization [INFO] Using mixed precision operations [INFO] Native ops: convrot_w4a4, asym_w4a8_int8, int8_tensorwise , emulated ops: nvfp4, float8_e4m3fn, mxfp8, float8_e5m2 [INFO] model weight dtype torch.bfloat16, manual cast: torch.bfloat16 [INFO] model_type FLOW_AV [INFO] Requested to load MiniMaxH3 [INFO] loaded completely; 65463.16 MB usable, 19996.14 MB loaded, full load: True --------------------attention_comfy_kitchen_int8_containers---------------------------------------- q: q.stride(0) = 7168, q.stride(0) % 4 = 0 q.stride(1) = 128, q.stride(1) % 4 = 0 q.stride(2) = 7168, q.stride(2) % 4 = 0 q.data_ptr() = 16451850240, q.element_size() = 2, q.data_ptr() % (4 * q.element_size()) = 0 bad(q) = 0 k: k.stride(0) = 7168, k.stride(0) % 4 = 0 k.stride(1) = 128, k.stride(1) % 4 = 0 k.stride(2) = 7168, k.stride(2) % 4 = 0 k.data_ptr() = 16726884352, k.element_size() = 2, k.data_ptr() % (4 * k.element_size()) = 0 bad(k) = 0 -------------------------------------------------------------------------------------------------------------- [ERROR] !!! Exception during processing !!! sage int8 attention: Q/K base pointers and B/H/N strides must preserve 4-element alignment [ERROR] Traceback (most recent call last): File "C:\AI\Comfyui-amd-20260805\ComfyUI\execution.py", line 545, in execute output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\execution.py", line 344, in get_output_data return_values = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, v3_data=v3_data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\execution.py", line 318, in _async_map_node_over_list await process_inputs(input_dict, i) File "C:\AI\Comfyui-amd-20260805\ComfyUI\execution.py", line 306, in process_inputs result = f(**inputs) ^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy_api\internal\__init__.py", line 149, in wrapped_func return method(locked_class, **inputs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy_api\latest\_io.py", line 1990, in EXECUTE_NORMALIZED to_return = cls.execute(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy_extras\nodes_custom_sampler.py", line 1055, in execute samples = guider.sample(noise.generate_noise(latent), latent_image, sampler, sigmas, denoise_mask=noise_mask, callback=callback, disable_pbar=disable_pbar, seed=noise.seed) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\samplers.py", line 1335, in sample output = executor.execute(noise, latent_image, sampler, sigmas, denoise_mask, callback, disable_pbar, seed, latent_shapes=latent_shapes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\patcher_extension.py", line 113, in execute return self.original(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\samplers.py", line 1262, in outer_sample output = self.inner_sample(noise, latent_image, device, sampler, sigmas, denoise_mask, callback, disable_pbar, seed, latent_shapes=latent_shapes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\samplers.py", line 1226, in inner_sample self.conds = process_conds(self.inner_model, noise, self.conds, device, latent_image, denoise_mask, seed, latent_shapes=latent_shapes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\samplers.py", line 1048, in process_conds conds[k] = encode_model_conds(model.extra_conds, conds[k], noise, device, k, latent_image=latent_image, denoise_mask=denoise_mask, seed=seed, latent_shapes=latent_shapes) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\samplers.py", line 953, in encode_model_conds out = model_function(**params) ^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\model_base.py", line 2150, in extra_conds cross_attn = self.diffusion_model.preprocess_text_embeds( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\ldm\minimax\model.py", line 450, in preprocess_text_embeds return self.token_refiner(self.condition_proj(text_states[0])).unsqueeze(0) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\torch\nn\modules\module.py", line 1775, in_wrapped_call_impl return self._call_impl(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\torch\nn\modules\module.py", line 1786, in_call_impl return forward_call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\ldm\minimax\model.py", line 242, in forward x = block(x, transformer_options=transformer_options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\torch\nn\modules\module.py", line 1775, in_wrapped_call_impl return self._call_impl(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\torch\nn\modules\module.py", line 1786, in_call_impl return forward_call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\ldm\minimax\model.py", line 227, in forward x = self.attn(self.norm1(x), transformer_options=transformer_options).add_(x) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\torch\nn\modules\module.py", line 1775, in_wrapped_call_impl return self._call_impl(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\torch\nn\modules\module.py", line 1786, in_call_impl return forward_call(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\ldm\minimax\model.py", line 172, in forward out = optimized_attention(q, k, v, self.heads, mask=None, skip_reshape=True, transformer_options=transformer_options) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\ldm\modules\attention.py", line 197, in wrapper return wrapper.container_function(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\AI\Comfyui-amd-20260805\ComfyUI\comfy\ldm\modules\attention.py", line 651, in _attention_comfy_kitchen_int8_containers quantized = comfy_kitchen.prequantize_int8_attention( ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\comfy_kitchen\sage_attention.py", line 309, in prequantize_int8_attention packed = _hip_backend.sage_int8_quantize(q, k, v, cta_k=hip_cta_k) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Test\miniconda3\envs\comfyui-amd-20260805\Lib\site-packages\comfy_kitchen\backends\hip\__init__.py", line 2135, in sage_int8_quantize _C.sage_sdpa_quantize( RuntimeError: sage int8 attention: Q/K base pointers and B/H/N strides must preserve 4-element alignment [INFO] Prompt executed in 88.69 seconds ```
Author
Owner

@0xDELUXA commented on GitHub (Aug 12, 2026):

Turns out Torch 2.9.1's DLPack export rewrites strides for size-1 dimensions. Could you update ROCm/Torch (with nightly wheels built by ROCm/TheRock) and then test again?

<!-- gh-comment-id:5267856934 --> @0xDELUXA commented on GitHub (Aug 12, 2026): Turns out Torch 2.9.1's DLPack export rewrites strides for size-1 dimensions. Could you update ROCm/Torch (with nightly wheels built by [ROCm/TheRock](https://github.com/rocm/therock)) and then test again?
Author
Owner

@archangelttn-lang commented on GitHub (Aug 12, 2026):

Environment

GPU: AMD RX 9070 XT (gfx1201, RDNA4), Windows 10
torch 2.12.0+rocm7.15.0a20260724 (HIP 7.15.26294)
comfy-kitchen 0.2.30 (PyPI release wheel)
ComfyUI 0.32.0
What I see

With --use-ck-attention, MiniMax H3 fails immediately at the start of SamplerCustomAdvanced:
sage_sdpa_quantize(): incompatible function arguments. The following argument types are supported:

  1. sage_sdpa_quantize(q: ndarray[device='cuda'], k: ndarray[device='cuda'], ...)
    Invoked with types: PyCapsule, PyCapsule, PyCapsule, PyCapsule, PyCapsule,
    PyCapsule, PyCapsule, PyCapsule, PyCapsule, int, int, int, int
    Wan 2.2 workflows run without this error using the same launcher. Memory usage is nowhere near the limit when it fails, so this is not OOM.

I understand now this is expected on a release wheel: #103 (merged) is NVIDIA-only and #104 (AMD) is still a draft. In the 0.2.30 PyPI wheel, sage_attention.py imports only from .backends import cuda as _cuda_backend, so int8_attention / prequantize_int8_attention never reach the hip-priority registry that init.py sets up. Posting this mainly so other AMD users searching for sage_sdpa_quantize + PyCapsule find the explanation.

Offer to test

If useful, I can test the #104 draft on a newer stack than the one in this thread: gfx1201 / ROCm 7.15 / torch 2.12.0, which should not exhibit the torch 2.9.1 DLPack size-1-stride rewriting you identified. I can run both MiniMax H3 (which takes the _attention_comfy_kitchen_int8_containers / prequantize_int8_attention path) and Wan 2.2 (plain int8_attention) and report back. Just point me at a wheel or artifact.

<!-- gh-comment-id:5271938501 --> @archangelttn-lang commented on GitHub (Aug 12, 2026): Environment GPU: AMD RX 9070 XT (gfx1201, RDNA4), Windows 10 torch 2.12.0+rocm7.15.0a20260724 (HIP 7.15.26294) comfy-kitchen 0.2.30 (PyPI release wheel) ComfyUI 0.32.0 What I see With --use-ck-attention, MiniMax H3 fails immediately at the start of SamplerCustomAdvanced: sage_sdpa_quantize(): incompatible function arguments. The following argument types are supported: 1. sage_sdpa_quantize(q: ndarray[device='cuda'], k: ndarray[device='cuda'], ...) Invoked with types: PyCapsule, PyCapsule, PyCapsule, PyCapsule, PyCapsule, PyCapsule, PyCapsule, PyCapsule, PyCapsule, int, int, int, int Wan 2.2 workflows run without this error using the same launcher. Memory usage is nowhere near the limit when it fails, so this is not OOM. I understand now this is expected on a release wheel: #103 (merged) is NVIDIA-only and #104 (AMD) is still a draft. In the 0.2.30 PyPI wheel, sage_attention.py imports only from .backends import cuda as _cuda_backend, so int8_attention / prequantize_int8_attention never reach the hip-priority registry that __init__.py sets up. Posting this mainly so other AMD users searching for sage_sdpa_quantize + PyCapsule find the explanation. Offer to test If useful, I can test the #104 draft on a newer stack than the one in this thread: gfx1201 / ROCm 7.15 / torch 2.12.0, which should not exhibit the torch 2.9.1 DLPack size-1-stride rewriting you identified. I can run both MiniMax H3 (which takes the _attention_comfy_kitchen_int8_containers / prequantize_int8_attention path) and Wan 2.2 (plain int8_attention) and report back. Just point me at a wheel or artifact.
Author
Owner

@YAY-3M-TA3 commented on GitHub (Aug 12, 2026):

Turns out Torch 2.9.1's DLPack export rewrites strides for size-1 dimensions. Could you update ROCm/Torch (with nightly wheels built by ROCm/TheRock) and then test again?

That did the trick! Updated to nightly
pip install --no-cache-dir --force-reinstall "torch[device-gfx1151]" "torchvision[device-gfx1151]" torchaudio rocm-sdk-devel --index-url https://rocm.nightlies.amd.com/whl-multi-arch/

near 2x speed improvement!

I also tested with Spectrum and 600 EMA 8-step Lora - went from 35 minutes (pytorch attention , no lora, no spectrum) to 4 minutes

Great work people!

<!-- gh-comment-id:5272453012 --> @YAY-3M-TA3 commented on GitHub (Aug 12, 2026): > Turns out Torch 2.9.1's DLPack export rewrites strides for size-1 dimensions. Could you update ROCm/Torch (with nightly wheels built by [ROCm/TheRock](https://github.com/rocm/therock)) and then test again? That did the trick! Updated to nightly `pip install --no-cache-dir --force-reinstall "torch[device-gfx1151]" "torchvision[device-gfx1151]" torchaudio rocm-sdk-devel --index-url https://rocm.nightlies.amd.com/whl-multi-arch/` near 2x speed improvement! I also tested with Spectrum and 600 EMA 8-step Lora - went from 35 minutes (pytorch attention , no lora, no spectrum) to 4 minutes Great work people!
Author
Owner

@0xDELUXA commented on GitHub (Aug 12, 2026):

The fix has been merged. Can you try the wheel from https://github.com/Comfy-Org/comfy-kitchen/actions/runs/31639877736 with PyTorch 2.9 again?

<!-- gh-comment-id:5273443620 --> @0xDELUXA commented on GitHub (Aug 12, 2026): The fix has been merged. Can you try the wheel from https://github.com/Comfy-Org/comfy-kitchen/actions/runs/31639877736 with PyTorch 2.9 again?
Author
Owner

@YAY-3M-TA3 commented on GitHub (Aug 13, 2026):

The fix has been merged. Can you try the wheel from https://github.com/Comfy-Org/comfy-kitchen/actions/runs/31639877736 with PyTorch 2.9 again?

Ok - it all works - no issue

Details...
I forced re-installed 2.9.1 / 7.2.1
pip install --no-cache-dir --force-reinstall -f https://repo.radeon.com/rocm/windows/rocm-rel-7.2.1/ "torch==2.9.1+rocm7.2.1" "torchvision==0.24.1+rocm7.2.1" "torchaudio==2.9.1+rocm7.2.1" numpy pillow

then verified the version

2.9.1+rocm7.2.1
True
Radeon 8060S Graphics
94.35 GB

Then I grabbed the whl from your link and forced -reinstalled
python -m pip install --no-cache-dir --force-reinstall comfy_kitchen-0.2.30-cp312-abi3-win_amd64.whl

Then ran comfy:
python main.py --listen 127.0.0.1 --port 8188

I ran the native WF for image to video with an added backend node set to comfy-kitchen attention

Generation time is as fast as with nightly py/rocm

<!-- gh-comment-id:5280234995 --> @YAY-3M-TA3 commented on GitHub (Aug 13, 2026): > The fix has been merged. Can you try the wheel from https://github.com/Comfy-Org/comfy-kitchen/actions/runs/31639877736 with PyTorch 2.9 again? **Ok - it all works - no issue** Details... I forced re-installed 2.9.1 / 7.2.1 `pip install --no-cache-dir --force-reinstall -f https://repo.radeon.com/rocm/windows/rocm-rel-7.2.1/ "torch==2.9.1+rocm7.2.1" "torchvision==0.24.1+rocm7.2.1" "torchaudio==2.9.1+rocm7.2.1" numpy pillow` then verified the version ``` 2.9.1+rocm7.2.1 True Radeon 8060S Graphics 94.35 GB ``` Then I grabbed the whl from your link and forced -reinstalled `python -m pip install --no-cache-dir --force-reinstall comfy_kitchen-0.2.30-cp312-abi3-win_amd64.whl` Then ran comfy: `python main.py --listen 127.0.0.1 --port 8188` I ran the native WF for image to video with an **added backend node** set to comfy-kitchen attention Generation time is as fast as with nightly py/rocm
Author
Owner

@0xDELUXA commented on GitHub (Aug 13, 2026):

Great! The fix is already in ComfyUI as of github.com/Comfy-Org/comfy-kitchen@7c6ca3a5b6, so this issue can be closed.

<!-- gh-comment-id:5281210798 --> @0xDELUXA commented on GitHub (Aug 13, 2026): Great! The fix is already in ComfyUI as of https://github.com/Comfy-Org/comfy-kitchen/commit/7c6ca3a5b63857d42c2d49777d6afb69de23f13f, so this issue can be closed.
Author
Owner

@YAY-3M-TA3 commented on GitHub (Aug 13, 2026):

Great! The fix is already in ComfyUI as of 7c6ca3a, so this issue can be closed.

good job! I am very impressed with the 2X speed up on gfx1151

<!-- gh-comment-id:5281533256 --> @YAY-3M-TA3 commented on GitHub (Aug 13, 2026): > Great! The fix is already in ComfyUI as of [7c6ca3a](https://github.com/Comfy-Org/comfy-kitchen/commit/7c6ca3a5b63857d42c2d49777d6afb69de23f13f), so this issue can be closed. good job! I am very impressed with the 2X speed up on gfx1151
Author
Owner

@0xDELUXA commented on GitHub (Aug 19, 2026):

@YAY-3M-TA3 Is there anything in this issue that should prevent it from being closed?

<!-- gh-comment-id:5342143323 --> @0xDELUXA commented on GitHub (Aug 19, 2026): @YAY-3M-TA3 Is there anything in this issue that should prevent it from being closed?
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/comfy-kitchen#36
No description provided.