Skip to content

Access Violation (0xC0000005) in convert_diffusers_mmdit when loading FLUX Fill model after v0.15.1 #12856

Description

@rong7932

Custom Node Testing

Expected Behavior

The FLUX.1-Fill-Dev model (specifically checkpoints like flux.1-fill-dev-OneReward) should load successfully and enter the sampling stage. It worked perfectly in v0.15.1 (Commit: 3dd10a5).

Actual Behavior

The process crashes immediately with a Windows Access Violation (0xC0000005) during the model weight conversion stage (convert_diffusers_mmdit). In some cases, it is preceded by an aiohttp TypeError. The backend process exits completely (Code: 3221225477).

Steps to Reproduce

Update ComfyUI to any version newer than v0.15.1 (Commit: 3dd10a5).

Use Python 3.12 or 3.13 on a Windows environment.

Use a basic workflow to load the flux.1-fill-dev-OneReward checkpoint (or any standard FLUX Fill model).

Queue the prompt.

The crash occurs exactly when the console reaches the MMDIT weight conversion stage.

Note: Standard FLUX.1 Dev/Schnell models load correctly; only the Fill architecture triggers this crash.

Debug Logs

FETCH ComfyRegistry Data: 125/129
FETCH ComfyRegistry Data [DONE]
[ComfyUI-Manager] default cache updated: https://api.comfy.org/nodes
FETCH DATA from: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json
 [DONE]
[ComfyUI-Manager] All startup tasks have been completed.
fast DB scan failed for models: 'NoneType' object is not callable
Traceback (most recent call last):
  File "D:\AI\ComfyUINeo\app\assets\scanner.py", line 36, in seed_assets
    survivors: set[str] = _fast_db_consistency_pass(r, collect_existing_paths=True, update_missing_tags=True)
                          ~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\AI\ComfyUINeo\app\assets\scanner.py", line 156, in _fast_db_consistency_pass
    with create_session() as sess:
         ~~~~~~~~~~~~~~^^
  File "D:\AI\ComfyUINeo\app\database\db.py", line 112, in create_session
    return Session()
TypeError: 'NoneType' object is not callable
orphan pruning failed: 'NoneType' object is not callable
Traceback (most recent call last):
  File "D:\AI\ComfyUINeo\app\assets\scanner.py", line 43, in seed_assets
    orphans_pruned = _prune_orphaned_assets(roots)
  File "D:\AI\ComfyUINeo\app\assets\scanner.py", line 123, in _prune_orphaned_assets
    with create_session() as sess:
         ~~~~~~~~~~~~~~^^
  File "D:\AI\ComfyUINeo\app\database\db.py", line 112, in create_session
    return Session()
TypeError: 'NoneType' object is not callable
Failed to seed assets: 'NoneType' object is not callable
got prompt
Using xformers attention in VAE
Using xformers attention in VAE
VAE load device: cuda:0, offload device: cpu, dtype: torch.bfloat16
Found quantization metadata version 1
Using MixedPrecisionOps for text encoder
clip missing: ['text_projection.weight']
CLIP/text encoder model load device: cuda:0, offload device: cpu, current: cpu, dtype: torch.float16
Requested to load FluxClipModel_
Model FluxClipModel_ prepared for dynamic VRAM loading. 4903MB Staged. 0 patches attached. Force pre-loaded 49 weights: 392 KB.
Requested to load AutoencodingEngine
Model AutoencodingEngine prepared for dynamic VRAM loading. 159MB Staged. 0 patches attached.
Model AutoencodingEngine prepared for dynamic VRAM loading. 159MB Staged. 0 patches attached.
Windows fatal exception: access violation

Windows fatal exception: Thread 0x00008f8c (most recent call first):
  File "Windows fatal exception: D:\AI\ComfyUINeo\py313\Lib\concurrent\futures\thread.py", line 90 in access violation_workerWindows fatal exception: 
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line Windows fatal exception: access violation994access violation

 in 

run
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 1043 in _bootstrap_inner
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 1014 in _bootstrap

Thread 0x00006a78 (most recent call first):
  File "D:\AI\ComfyUINeo\py313\Lib\concurrent\futures\thread.py", line 90 in _worker
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 994 in run


  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 1043 in _bootstrap_inner
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 1014 in _bootstrap

Thread 0x00008bfc (most recent call first):
  File "D:\AI\ComfyUINeo\py313\Lib\concurrent\futures\thread.py", line 90 in _worker
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 994 in run
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py
", line 1043 in _bootstrap_inner
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 1014 in _bootstrap

Thread 0x00002fcc (most recent call first):
  File "D:\AI\ComfyUINeo\py313\Lib\concurrent\futures\thread.py"Windows fatal exception: , line 90 in _worker
Windows fatal exception: access violation

Windows fatal exception: access violation

Windows fatal exception: access violation

access violation

access violation

Windows fatal exception: access violation

  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 994 in run
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 1043 in _bootstrap_inner
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 1014 in _bootstrap

Thread 0x00009c18 (most recent call first):
  File "D:\AI\ComfyUINeo\py313\Lib\concurrent\futures\thread.py", line 90 in _worker
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py"
, line 994 in run
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 1043 in _bootstrap_inner
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 1014 in _bootstrap

Thread 0x00009344 (most recent call first):
  File "D:\AI\ComfyUINeo\py313\Lib\concurrent\futures\thread.py", line 90 in _worker
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 994 in run
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 1043 in _bootstrap_inner
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 1014 in _bootstrap

Thread 0x00002cf4 (most recent call first):
  File "D:\AI\ComfyUINeo\py313\Lib\concurrent\futures\thread.py", line 90 in _worker
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 994 in run
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 1043 in _bootstrap_inner
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 1014 in _bootstrap

Thread 0x00009f80 (most recent call first):
  File "D:\AI\ComfyUINeo\py313\Lib\concurrent\futures\thread.py", line 90 in _worker
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 994 in run
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 1043 in _bootstrap_inner
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 1014 in _bootstrap

Thread 0x000093f0 (most recent call first):
  File "D:\AI\ComfyUINeo\comfy\model_detection.py", line 1125 in convert_diffusers_mmdit
  File "D:\AI\ComfyUINeo\comfy\sd.py", line 1717 in load_diffusion_model_state_dict
  File "D:\AI\ComfyUINeo\comfy\sd.py", line 1771 in load_diffusion_model
  File "D:\AI\ComfyUINeo\nodes.py", line 972 in load_unet
  File "D:\AI\ComfyUINeo\execution.py", line 295 in process_inputs
  File "D:\AI\ComfyUINeo\execution.py", line 307 in _async_map_node_over_list
  File "D:\AI\ComfyUINeo\custom_nodes\ComfyUI-Lora-Manager\py\metadata_collector\metadata_hook.py", line 168 in async_map_node_over_list_with_metadata
  File "D:\AI\ComfyUINeo\execution.py", line 333 in get_output_data
  File "D:\AI\ComfyUINeo\execution.py", line 524 in execute
  File "D:\AI\ComfyUINeo\custom_nodes\ComfyUI-Lora-Manager\py\metadata_collector\metadata_hook.py", line 203 in async_execute_with_prompt_tracking
  File "D:\AI\ComfyUINeo\execution.py", line 737 in execute_async
  File "D:\AI\ComfyUINeo\py313\Lib\asyncio\events.py", line 89 in _run
  File "D:\AI\ComfyUINeo\py313\Lib\asyncio\base_events.py", line 2050 in _run_once
  File "D:\AI\ComfyUINeo\py313\Lib\asyncio\base_events.py", line 683 in run_forever
  File "D:\AI\ComfyUINeo\py313\Lib\asyncio\base_events.py", line 712 in run_until_complete
  File "D:\AI\ComfyUINeo\py313\Lib\asyncio\runners.py", line 118 in run
  File "D:\AI\ComfyUINeo\py313\Lib\asyncio\runners.py", line 195 in run
  File "D:\AI\ComfyUINeo\execution.py", line 688 in execute
  File "D:\AI\ComfyUINeo\main.py", line 261 in prompt_worker
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 994 in run
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 1043 in _bootstrap_inner
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 1014 in _bootstrap

Thread 0x00006628 (most recent call first):
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 359 in wait
  File "D:\AI\ComfyUINeo\py313\Lib\queue.py", line 199 in get
  File "D:\AI\ComfyUINeo\custom_nodes\ComfyUI_VNCCS_Utils\nodes\vnccs_model_manager.py", line 116 in worker_loop
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 994 in run
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 1043 in _bootstrap_inner
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 1014 in _bootstrap

Thread 0x00001278 (most recent call first):
  File "D:\AI\ComfyUINeo\custom_nodes\comfyui_fk_server\server.py", line 59 in _run_node_program
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 994 in run
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 1043 in _bootstrap_inner
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 1014 in _bootstrap

Thread 0x00001c18 (most recent call first):
  File "D:\AI\ComfyUINeo\py313\Lib\asyncio\windows_events.py", line 775 in _poll
  File "D:\AI\ComfyUINeo\py313\Lib\asyncio\windows_events.py", line 446 in select
  File "D:\AI\ComfyUINeo\py313\Lib\asyncio\base_events.py", line 2012 in _run_once
  File "D:\AI\ComfyUINeo\py313\Lib\asyncio\base_events.py", line 683 in run_forever
  File "D:\AI\ComfyUINeo\py313\Lib\asyncio\base_events.py", line 712 in run_until_complete
  File "D:\AI\ComfyUINeo\py313\Lib\asyncio\runners.py", line 118 in run
  File "D:\AI\ComfyUINeo\py313\Lib\asyncio\runners.py", line 195 in run
  File "D:\AI\ComfyUINeo\custom_nodes\ComfyUI-Crystools\general\monitor.py", line 31 in startMonitorLoop
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 994 in run
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 1043 in _bootstrap_inner
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 1014 in _bootstrap

Thread 0x00009430 (most recent call first):
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 359 in wait
  File "D:\AI\ComfyUINeo\py313\Lib\queue.py", line 199 in get
  File "D:\AI\ComfyUINeo\py313\Lib\site-packages\watchdog\observers\api.py", line 379 in dispatch_events
  File "D:\AI\ComfyUINeo\py313\Lib\site-packages\watchdog\observers\api.py", line 213 in run
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 1043 in _bootstrap_inner
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 1014 in _bootstrap

Thread 0x00007bb0 (most recent call first):
  File "D:\AI\ComfyUINeo\py313\Lib\site-packages\watchdog\observers\winapi.py", line 326 in read_directory_changes
  File "D:\AI\ComfyUINeo\py313\Lib\site-packages\watchdog\observers\winapi.py", line 380 in read_events
  File "D:\AI\ComfyUINeo\py313\Lib\site-packages\watchdog\observers\read_directory_changes.py", line 67 in _read_events
  File "D:\AI\ComfyUINeo\py313\Lib\site-packages\watchdog\observers\read_directory_changes.py", line 70 in queue_events
  File "D:\AI\ComfyUINeo\py313\Lib\site-packages\watchdog\observers\api.py", line 158 in run
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 1043 in _bootstrap_inner
  File "D:\AI\ComfyUINeo\py313\Lib\threading.py", line 1014 in _bootstrap

Thread 0x000078b8 (most recent call first):
  File "D:\AI\ComfyUINeo\py313\Lib\asyncio\windows_events.py", line 775 in _poll
  File "D:\AI\ComfyUINeo\py313\Lib\asyncio\windows_events.py", line 446 in select
  File "D:\AI\ComfyUINeo\py313\Lib\asyncio\base_events.py", line 2012 in _run_once
  File "D:\AI\ComfyUINeo\py313\Lib\asyncio\base_events.py", line 683 in run_forever
  File "D:\AI\ComfyUINeo\py313\Lib\asyncio\base_events.py", line 712 in run_until_complete
  File "D:\AI\ComfyUINeo\main.py", line 440 in <module>

Other

Last Working Commit: 3dd10a5 (v0.15.1, Feb 26, 2026).

Environment: Windows 11, RTX 5060 Ti (16GB), 64GB RAM.

Hypothesis: The regression seems to be in the new tensor offset calculation logic for models with extra input channels (like FLUX Fill) within the convert_diffusers_mmdit function.

Even with --disable-smart-memory and --deterministic, the issue persists on the latest master.

Metadata

Metadata

Assignees

Labels

Potential BugUser is reporting a bug. This should be tested.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions