Comfy-Org / Comfy-Org/ComfyUI

AttributeError when trying to save Minimax H3 latent

Open Beginner friendly
#15,254 8 comments 1 reaction 0 assignees View on GitHub
Potential Bug
Dominant language
Python
Stars
133k
Forks
15.7k
Avg merge
1d 7h
Merged PRs (30d)
158

Description

### Custom Node Testing

- [ ] I have tried disabling custom nodes and the issue persists (see [how to disable custom nodes](https://docs.comfy.org/troubleshooting/custom-node-issues#step-1%3A-test-with-all-custom-nodes-disabled) if you need help)

### Expected Behavior

Should be possible to save initial latent

### Actual Behavior

Save Latent node fails with `AttributeError: 'NestedTensor' object has no attribute 'contiguous'`

### Steps to Reproduce

Create a workflow for generating condition and latent tensors and save them so that they could later be loaded for sampling:
- CLIP loader, model qwen3vl-32B and type minimax
- Load VAE, model minimax_h3_video_vae
- MiniMax H3 Image to Video
- (Save Condition custom node or preview as text or something else for the positive output)
- Save Latent

### Debug Logs

```powershell
python main.py --cpu
[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] Found comfy_kitchen backend hip: {'available': False, 'disabled': False, 'unavailable_reason': 'PyTorch ROCm/HIP runtime not available', 'capabilities': []}
[INFO] Found comfy_kitchen backend cuda: {'available': False, 'disabled': True, 'unavailable_reason': 'CUDA not available on this system', 'capabilities': []}
[INFO] Found comfy_kitchen backend triton: {'available': False, 'disabled': True, 'unavailable_reason': 'Neither CUDA nor XPU available on this system', 'capabilities': []}
[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', 'gemv_awq_w4a16', 'int8_linear', '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', '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_mxfp8', 'scaled_mm_nvfp4', 'scaled_mm_svdquant_w4a4', 'stochastic_rounding_fp8']}
[INFO] Checkpoint files will always be loaded safely.
[INFO] Total VRAM 7713 MB, total RAM 7713 MB
[INFO] pytorch version: 2.9.1+cpu
[INFO] Set vram state to: DISABLED
[INFO] Device: cpu
[INFO] Using sub quadratic optimization for attention, if you have memory or speed issues try using: --use-split-cross-attention
[INFO] Python version: 3.13.5 (main, Jul 15 2026, 20:25:40) [GCC 14.2.0]
[INFO] ComfyUI version: 0.30.0
[INFO] comfy-aimdo version: 0.4.11
[INFO] comfy-kitchen version: 0.2.26
[INFO] comfyui-frontend-package version: 1.47.12
[INFO] comfyui-workflow-templates version: 0.11.27
[INFO] comfyui-embedded-docs version: 0.5.9
[INFO] comfy-kitchen version: 0.2.26
[INFO] comfy-aimdo version: 0.4.11
[INFO] [Prompt Server] web root: /home/human/aienv/lib/python3.13/site-packages/comfyui_frontend_package/static
[INFO] Asset seeder disabled
[INFO] No OpenGL_accelerate module loaded: No module named 'OpenGL_accelerate'
[INFO] ComfyUI-GGUF: Allowing full torch compile
[INFO]
Import times for custom nodes:
[INFO] 0.0 seconds: /home/human/aienv/ComfyUI-0.30.0/custom_nodes/ComfyUI-Condition-Utils
[INFO] 0.0 seconds: /home/human/aienv/ComfyUI-0.30.0/custom_nodes/ComfyUI-GGUF
[INFO]
[INFO] Context impl SQLiteImpl.
[INFO] Will assume non-transactional DDL.
[INFO] Using RAM pressure cache.
[INFO] Starting server

[INFO] To see the GUI go to: http://127.0.0.1:8188
[INFO] got prompt
[INFO] VAE load device: cpu, offload device: cpu, dtype: torch.float32
[INFO] gguf qtypes: Q2_K (417), F32 (433), Q3_K (50), F16 (2)
[INFO] Requested to load MiniMaxH3TEModel_
[INFO] loaded completely; 9586.87 MB loaded, full load: True
[INFO] CLIP/text encoder model load device: cpu, offload device: cpu, current: cpu, dtype: torch.float16
[INFO] Requested to load MiniMaxH3TEModel_
Condition tensor saved to /home/human/aienv/ComfyUI-0.30.0/models/conditions/condition_tensor.ckpt
[ERROR] !!! Exception during processing !!! 'NestedTensor' object has no attribute 'contiguous'
[ERROR] Traceback (most recent call last):
File "/home/human/aienv/ComfyUI-0.30.0/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 "/home/human/aienv/ComfyUI-0.30.0/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 "/home/human/aienv/ComfyUI-0.30.0/execution.py", line 318, in _async_map_node_over_list
await process_inputs(input_dict, i)
File "/home/human/aienv/ComfyUI-0.30.0/execution.py", line 306, in process_inputs
result = f(**inputs)
File "/home/human/aienv/ComfyUI-0.30.0/nodes.py", line 546, in save
output["latent_tensor"] = samples["samples"].contiguous()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NestedTensor' object has no attribute 'contiguous'
```

### Other

Had to load text encoder as GGUF because it's too large for my system otherwise, but I wouldn't expect that to be a cause of problems with the image latent.

Contributor guide

Open the contributing guide

Research direction

Start at nodes.py line 546 in the Save Latent node and reproduce the MiniMax H3 workflow described in the issue with the provided CPU and GGUF setup. Inspect the type of samples["samples"] before saving; done means the latent saves without the NestedTensor AttributeError and can be used later for sampling.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
backend, machine-learning
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Clearly specified
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.