Skip to content

[Bug] ComfyUI Flux Error: string pointer is null #880

Description

@healthyfat

Checklist

Describe the Bug

After updating to Nunchaku v1.2.0 ComfyUI displays following error.

Previous working version was v1.0.2.

ComfyUI Error Report

Error Details

  • Node ID: 45
  • Node Type: NunchakuFluxDiTLoader
  • Exception Type: RuntimeError
  • Exception Message: string pointer is null

got prompt
Failed to validate prompt for output 118:

  • (prompt):
    • Required input is missing: source
  • Display Any (rgthree) 118:
    • Required input is missing: source
      Output will be ignored
      Failed to validate prompt for output 117:
  • (prompt):
    • Required input is missing: text
  • ShowText|pysssss 117:
    • Required input is missing: text
      Output will be ignored
      WARNING: PlaySound.IS_CHANGED() missing 1 required positional argument: 'self'
      Using pytorch attention in VAE
      Using pytorch attention in VAE
      VAE load device: cuda:0, offload device: cpu, dtype: torch.float32
      GPU 0 (NVIDIA GeForce RTX 2060) Memory: 6143.6875 MiB
      VRAM < 14GiB, enabling CPU offload
      [2026-01-12 15:18:33.914] [info] Initializing QuantizedFluxModel on device 0
      [2026-01-12 15:18:33.915] [info] Use FP16 model
      [2026-01-12 15:18:33.915] [info] Layer offloading enabled
      !!! Exception during processing !!! string pointer is null
      Traceback (most recent call last):
      File "D:\AI\UI\ComfyUI_windows_portable\ComfyUI\execution.py", line 518, 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 "D:\AI\UI\ComfyUI_windows_portable\ComfyUI\execution.py", line 329, 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 "D:\AI\UI\ComfyUI_windows_portable\ComfyUI\execution.py", line 303, in _async_map_node_over_list
      await process_inputs(input_dict, i)
      File "D:\AI\UI\ComfyUI_windows_portable\ComfyUI\execution.py", line 291, in process_inputs
      result = f(**inputs)
      ^^^^^^^^^^^
      File "D:\AI\UI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-nunchaku\nodes\models\flux.py", line 283, in load_model
      self.transformer, self.metadata = NunchakuFluxTransformer2dModel.from_pretrained(
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "D:\AI\UI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\huggingface_hub\utils_validators.py", line 114, in _inner_fn
      return fn(*args, **kwargs)
      ^^^^^^^^^^^^^^^^^^^
      File "D:\AI\UI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\nunchaku\models\transformers\transformer_flux.py", line 605, in from_pretrained
      m = load_quantized_module(
      ^^^^^^^^^^^^^^^^^^^^^^
      File "D:\AI\UI\ComfyUI_windows_portable\python_embeded\Lib\site-packages\nunchaku\models\transformers\transformer_flux.py", line 454, in load_quantized_module
      m.init(use_fp4, offload, bf16, 0 if device.index is None else device.index)
      RuntimeError: string pointer is null

Environment

Name: nunchaku
Version: 1.2.0+torch2.9

System Information

  • ComfyUI Version: 0.8.0
  • Arguments: ComfyUI\main.py --windows-standalone-build
  • OS: win32
  • Python Version: 3.12.7 (tags/v3.12.7:0b05ead, Oct 1 2024, 03:06:41) [MSC v.1941 64 bit (AMD64)]
  • Embedded Python: true
  • PyTorch Version: 2.9.0+cu128

Devices

  • Name: cuda:0 NVIDIA GeForce RTX 2060 : cudaMallocAsync
    • Type: cuda
    • VRAM Total: 6442123264
    • VRAM Free: 5355077632
    • Torch VRAM Total: 0
    • Torch VRAM Free: 0
    • Driver version: 576.57

Reproduction Steps

svdq-int4_r32-flux.1-dev.safetensors

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions