LucianoCirino/efficiency-nodes-comfyui

AttributeError: 'NoneType' object has no attribute 'cpu'

Closed this issue · 1 comments

Getting the below error when trying to use the simplest workflow. I've used the efficiency nodes successfully a million times before. I'm sure it's something in my Python environment which I've been debugging over the past couple of days, but would appreciate help debugging.

Efficient Loader Models Cache:
Ckpt:
  [1] visiongenRealism_visiongenRealism
ERROR:root:!!! Exception during processing !!!
ERROR:root:Traceback (most recent call last):
  File "D:\hal\stable-diffusion\ComfyUI\execution.py", line 153, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
  File "D:\hal\stable-diffusion\ComfyUI\execution.py", line 83, in get_output_data
    return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
  File "D:\hal\stable-diffusion\ComfyUI\execution.py", line 76, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
  File "D:\hal\stable-diffusion\ComfyUI\custom_nodes\efficiency-nodes-comfyui\efficiency_nodes.py", line 700, in sample
    samples, images, gifs, preview = process_latent_image(model, seed, steps, cfg, sampler_name, scheduler,
  File "D:\hal\stable-diffusion\ComfyUI\custom_nodes\efficiency-nodes-comfyui\efficiency_nodes.py", line 503, in process_latent_image
    positive_hash = tensor_to_hash(positive[0][0])
  File "D:\hal\stable-diffusion\ComfyUI\custom_nodes\efficiency-nodes-comfyui\tsc_utils.py", line 96, in tensor_to_hash
    byte_repr = tensor.cpu().numpy().tobytes()  # Convert tensor to bytes
AttributeError: 'NoneType' object has no attribute 'cpu'

Workflow image:

workflow (1)

Repro steps

  1. Load default workflow, click Queue
  2. Observe successful generation
  3. Clear canvas
  4. Add efficiency loader, efficiency sampler, preview image nodes, wire them together, click queue
  5. Observe error

Resolved by uninstalling and reinstalling the new fork.