[Bug] MiniMax H3 image-to-video crashes (SIGSEGV) in Qwen3-VL vision encoder conv on ROCm/AMD
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 158
Description
# [Bug] MiniMax H3 image-to-video (I2V/R2V) crashes with SIGSEGV in Qwen3-VL vision encoder conv on ROCm (AMD)
## Environment
- **OS**: Ubuntu (kernel 7.0.0-28-generic)
- **GPU**: AMD Radeon RX 7900 XTX (24 GB VRAM)
- **ROCm**: 6.2.0 (system) + bundled ROCm in PyTorch wheels
- **PyTorch**: 2.13.0+rocm7.2 (Python 3.14)
- **ComfyUI**: v0.34.0 (commit `12d52794`)
- **Models**: `minimax_h3_fl2va_pruned_int8_convrot.safetensors`, `qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors` (also tried the int8 TE), `minimax_h3_video_vae_fp16.safetensors`, `minimax_h3_audio_vae_fp32.safetensors`, turbo 8-step LoRA
## Bug
MiniMax H3 **text-to-video works fine**, but **image-to-video (and reference mode) crashes ComfyUI with a hard SIGSEGV (sometimes SIGABRT)** during prompt/image conditioning. The crash happens inside the Qwen3-VL vision encoder's Conv2d when encoding the input image — before the diffusion model is even loaded for sampling.
Full Python crash stack:
```
Fatal Python error: Segmentation fault
File "comfy/text_encoders/qwen35.py", line 649, in forward
File "torch/nn/modules/module.py", line 1789, in _call_impl
File "torch/nn/modules/module.py", line 1778, in _wrapped_call_impl
File "comfy/text_encoders/qwen3vl.py", line 66, in preprocess_embed
File "comfy/text_encoders/minimax.py", line 93, in preprocess_embed
File "comfy/sd1_clip.py", line 228, in process_tokens
File "comfy/sd1_clip.py", line 266, in forward
File "comfy/sd1_clip.py", line 306, in encode
File "comfy/sd1_clip.py", line 45, in encode_token_weights
File "comfy/text_encoders/minimax.py", line 114, in encode_token_weights
File "comfy/sd1_clip.py", line 743, in encode_token_weights
File "comfy/sd.py", line 410, in encode_from_tokens
File "comfy/sd.py", line 341, in encode_from_tokens_scheduled
```
A second capture (with the image pre-scaled to a multiple of 32) shows the crash deeper in the Conv2d path:
```
File "torch/nn/modules/conv.py", line 730, in _conv_forward
File "comfy/ops.py", line 620, in _conv_forward
File "comfy/ops.py", line 624, in forward_comfy_cast_weights
File "comfy/ops.py", line 629, in forward
File "comfy/text_encoders/qwen35.py", line 450, in forward
```
Native crash symbols reference `libtorch_hip.so` (`at::native::copy_device_to_device` / `at::native::linspace_cuda_out`) and `libamdhip64.so`.
## Reproduction
1. Fresh ComfyUI v0.34.0 with the models above (official layout: `models/diffusion_models`, `models/text_encoders`, `models/vae`, `models/loras`).
2. Use either the **official workflow template** `video_minimax_h3_i2v.json` (replace input image) **or** a minimal core-node workflow:
```
LoadImage -> MiniMaxH3ImageToVideo(first_frame) -> [sigma shift -> lora -> BasicGuider]
+ CLIPLoader(type=minimax) + VAELoader(video_vae) + BasicScheduler + KSamplerSelect + SamplerCustomAdvanced
```
3. Queue the prompt with an image connected to `first_frame`.
4. ComfyUI segfaults ~4-8 s in, during `MiniMaxH3ImageToVideo`'s clip conditioning (before any sampling progress is shown).
Text-to-video with the exact same models (same workflow, no image input) completes successfully.
## What I tried (all crash identically)
- Easy custom node (`ComfyUI-MiniMaxH3-Easy`) vs. core nodes (`MiniMaxH3ImageToVideo`)
- nvfp4 TE vs. int8 TE
- fp16 video VAE vs. int8 video VAE
- Raw 460x726 image vs. pre-scaled image (ImageScaleToTotalPixels, multiples of 32)
- `comfy/ops.py` `CastBiasWeightContext(offloadable=False)` patch for Conv2d
- `qwen3vl.py` `preprocess_embed` input dtype `float32` -> `bfloat16`
None avoid the crash. It is 100% reproducible with any image input to the H3 CLIP.
## Expected behavior
I2V/R2V should encode the reference image and generate the video, like T2V does on the same stack.
---
If useful, I can attach the full core-dump symbol list or run additional diagnostics. Happy to test a fix branch on this AMD setup.
Contributor guide
Research direction
Start by reproducing the crash with video_minimax_h3_i2v.json or the minimal core-node workflow and an image connected to first_frame. Inspect the Qwen3-VL and MiniMax paths in comfy/text_encoders/qwen3vl.py, comfy/text_encoders/qwen35.py, comfy/text_encoders/minimax.py, and the convolution path in comfy/ops.py. Done means image-to-video conditioning completes without a SIGSEGV or SIGABRT on the reported AMD/ROCm setup.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100