comfyanonymous / ComfyUI_TensorRT

MIT License
514 stars 34 forks source link

Converting SVD models fails #75

Open DuckersMcQuack opened 2 months ago

DuckersMcQuack commented 2 months ago

I can convert regular models just fine, but video diffusion models won't. They error out.

Restored from D:\Stablediff\Comfyuimanual\ComfyUI\models\svd\svd.safetensors with 0 missing and 0 unexpected keys
!!! Exception during processing !!! 'DiffusionEngine' object has no attribute 'load_device'
Traceback (most recent call last):
  File "D:\Stablediff\Comfyuimanual\ComfyUI\execution.py", line 323, in execute
    output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
  File "D:\Stablediff\Comfyuimanual\ComfyUI\execution.py", line 198, in get_output_data
    return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
  File "D:\Stablediff\Comfyuimanual\ComfyUI\execution.py", line 169, in _map_node_over_list
    process_inputs(input_dict, i)
  File "D:\Stablediff\Comfyuimanual\ComfyUI\execution.py", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
  File "D:\Stablediff\Comfyuimanual\ComfyUI\custom_nodes\ComfyUI_TensorRT-master\tensorrt_convert.py", line 611, in convert
    return super()._convert(
  File "D:\Stablediff\Comfyuimanual\ComfyUI\custom_nodes\ComfyUI_TensorRT-master\tensorrt_convert.py", line 158, in _convert
    comfy.model_management.load_models_gpu([model], force_patch_weights=True)
  File "D:\Stablediff\Comfyuimanual\ComfyUI\comfy\model_management.py", line 471, in load_models_gpu
    loaded_model = LoadedModel(x)
  File "D:\Stablediff\Comfyuimanual\ComfyUI\comfy\model_management.py", line 291, in __init__
    self.device = model.load_device
  File "D:\Stablediff\Comfyuimanual\ComfyUI\venv\lib\site-packages\torch\nn\modules\module.py", line 1709, in __getattr__
    raise AttributeError(f"'{type(self).__name__}' object has no attribute '{name}'")
AttributeError: 'DiffusionEngine' object has no attribute 'load_device'
comfyanonymous commented 2 months ago

Works fine here, try disabling your custom nodes.