Diffusion Single File
comfyui

Memory Error

#29
by rsutech - opened

Hi! Have 4090 + 64RAM, loading default ref2va workflow using last ComfyUI on Windows, but every time got Memory Error. Can the problem be like using minimax_h3_ref2va_pruned_fp8_scaled.safetensors insted of int8_convrot ?

ComfyUI Error Report

Error Details

  • Node ID: 620
  • Node Type: UNETLoader
  • Exception Type: MemoryError
  • Exception Message: MemoryError:

Stack Trace

  File "E:\ComfyUI_windows_portable\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 "E:\ComfyUI_windows_portable\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 "E:\ComfyUI_windows_portable\ComfyUI\execution.py", line 318, in _async_map_node_over_list
    await process_inputs(input_dict, i)

  File "E:\ComfyUI_windows_portable\ComfyUI\execution.py", line 306, in process_inputs
    result = f(**inputs)
             ^^^^^^^^^^^

  File "E:\ComfyUI_windows_portable\ComfyUI\nodes.py", line 988, in load_unet
    model = comfy.sd.load_diffusion_model(unet_path, model_options=model_options)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "E:\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 2210, in load_diffusion_model
    sd, metadata = comfy.utils.load_torch_file(unet_path, return_metadata=True)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "E:\ComfyUI_windows_portable\ComfyUI\comfy\utils.py", line 149, in load_torch_file
    raise e

  File "E:\ComfyUI_windows_portable\ComfyUI\comfy\utils.py", line 129, in load_torch_file
    sd, metadata = load_safetensors(ckpt)
                   ^^^^^^^^^^^^^^^^^^^^^^

  File "E:\ComfyUI_windows_portable\ComfyUI\comfy\utils.py", line 95, in load_safetensors
    header = json.loads(mv[8:8 + header_size].tobytes().decode("utf-8"))
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

System Information

  • ComfyUI Version: 0.30.2
  • Arguments: ComfyUI\main.py --windows-standalone-build --disable-pinned-memory --disable-async-offload --reserve-vram 1
  • OS: win32
  • Python Version: 3.12.10 (tags/v3.12.10:0cc8128, Apr 8 2025, 12:21:36) [MSC v.1943 64 bit (AMD64)]
  • Embedded Python: true
  • PyTorch Version: 2.11.0+cu130

Devices

  • Name: cuda:0 NVIDIA GeForce RTX 4090 : cudaMallocAsync
    • Type: cuda
    • VRAM Total: 25756696576
    • VRAM Free: 24159191040
    • Torch VRAM Total: 0
    • Torch VRAM Free: 0
Comfy Org org

I think that's just corrupt model file from failed download or something.

I think that's just corrupt model file from failed download or something.

Thank you for the response, I’ll download it again. I downloaded the fp8_scaled version, deciding that it’s better suited for the 4090. Is that right, or should I use int8_convrot instead?
PS. minimax_h3_fl2va_pruned_int8_convrot works OK

And taking this opportunity I’d also like to personally thank you for your contribution to the development of Comfy — I use your nodes all the time.

Kijay sir, Can we expect a minimax ref2va int4 convrot from official comfy ui (w4a8 version that you are working on!) that would be awesome for low vram and ram users

I think that's just corrupt model file from failed download or something.

So it was really failed download, same size, but different hash.

rsutech changed discussion status to closed

Sign up or log in to comment