Skip to content

'NullCache' object has no attribute 'cache' #4

@monstari

Description

@monstari

Crash when switching to RAM pressure cache: 'NullCache' object has no attribute 'cache'

Environment

OS: Linux
Python: 3.12
ComfyUI: latest (as of Jan 2026)
GPU: NVIDIA GeForce RTX 5090
Torch: recent stable (FutureWarning about torch.distributed.reduce_op)

Error:

AttributeError: 'NullCache' object has no attribute 'cache'

Full traceback:
!!! Exception during processing !!! 'NullCache' object has no attribute 'cache'
Traceback (most recent call last):
  File "/home/rtl-6/execution.py", line 518, in execute
    output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(...)
  File "/home/rtl-6/execution.py", line 329, in get_output_data
    return_values = await _async_map_node_over_list(...)
  File "/home/rtl-6/execution.py", line 303, in _async_map_node_over_list
    await process_inputs(input_dict, i)
  File "/home/rtl-6/execution.py", line 291, in process_inputs
    result = f(**inputs)
  File "/home/rtl-6/custom_nodes/dynamic-ramcache/nodes.py", line 63, in manage_cache
    self._execute_cache_logic(mode, cleanup_threshold)
  File "/home/rtl-6/custom_nodes/dynamic-ramcache/nodes.py", line 124, in _execute_cache_logic
    self._switch_to_ram_pressure(cache_set, current_cache, caching)
  File "/home/rtl-6/custom_nodes/dynamic-ramcache/nodes.py", line 156, in _switch_to_ram_pressure
    self._migrate_cache_data(old_cache, new_cache)
  File "/home/rtl-6/custom_nodes/dynamic-ramcache/nodes.py", line 183, in _migrate_cache_data
    new_cache.cache = old_cache.cache
                       ^^^^^^^^^^^^^^^
AttributeError: 'NullCache' object has no attribute 'cache'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions