chflame163 / ComfyUI_CatVTON_Wrapper

CatVTON warpper for ComfyUI
166 stars 22 forks source link

Trouble running on Mac #9

Open sysfox opened 1 month ago

sysfox commented 1 month ago

the console returned error code below:

# 😺dzNodes: LayerStyle -> SegmentAnythingUltra V2 Processed 1 image(s).
!!! Exception during processing!!! Torch not compiled with CUDA enabled
Traceback (most recent call last):
  File "/Users/huangtianrui/Documents/Project/ComfyUI/execution.py", line 152, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/huangtianrui/Documents/Project/ComfyUI/execution.py", line 82, in get_output_data
    return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/huangtianrui/Documents/Project/ComfyUI/execution.py", line 75, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/huangtianrui/Documents/Project/ComfyUI/custom_nodes/ComfyUI_CatVTON_Wrapper/py/cat_vton.py", line 41, in catvton
    pipeline = CatVTONPipeline(
               ^^^^^^^^^^^^^^^^
  File "/Users/huangtianrui/Documents/Project/ComfyUI/custom_nodes/ComfyUI_CatVTON_Wrapper/py/catvton/pipeline.py", line 41, in __init__
    self.vae = AutoencoderKL.from_pretrained(os.path.join(folder_paths.models_dir, "CatVTON", "sd-vae-ft-mse")).to(device, dtype=weight_dtype)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/torch-gpu/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1340, in to
    return self._apply(convert)
           ^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/torch-gpu/lib/python3.12/site-packages/torch/nn/modules/module.py", line 900, in _apply
    module._apply(fn)
  File "/opt/anaconda3/envs/torch-gpu/lib/python3.12/site-packages/torch/nn/modules/module.py", line 900, in _apply
    module._apply(fn)
  File "/opt/anaconda3/envs/torch-gpu/lib/python3.12/site-packages/torch/nn/modules/module.py", line 927, in _apply
    param_applied = fn(param)
                    ^^^^^^^^^
  File "/opt/anaconda3/envs/torch-gpu/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1326, in convert
    return t.to(
           ^^^^^
  File "/opt/anaconda3/envs/torch-gpu/lib/python3.12/site-packages/torch/cuda/__init__.py", line 309, in _lazy_init
    raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled

Prompt executed in 386.13 seconds
got prompt
Failed to validate prompt for output 9:
* CheckpointLoaderSimple 4:
  - Required input is missing: ckpt_name
Output will be ignored
invalid prompt: {'type': 'prompt_outputs_failed_validation', 'message': 'Prompt outputs failed validation', 'details': '', 'extra_info': {}}
got prompt
!!! Exception during processing!!! Torch not compiled with CUDA enabled
Traceback (most recent call last):
  File "/Users/huangtianrui/Documents/Project/ComfyUI/execution.py", line 152, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/huangtianrui/Documents/Project/ComfyUI/execution.py", line 82, in get_output_data
    return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/huangtianrui/Documents/Project/ComfyUI/execution.py", line 75, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/huangtianrui/Documents/Project/ComfyUI/custom_nodes/ComfyUI_CatVTON_Wrapper/py/cat_vton.py", line 41, in catvton
    pipeline = CatVTONPipeline(
               ^^^^^^^^^^^^^^^^
  File "/Users/huangtianrui/Documents/Project/ComfyUI/custom_nodes/ComfyUI_CatVTON_Wrapper/py/catvton/pipeline.py", line 41, in __init__
    self.vae = AutoencoderKL.from_pretrained(os.path.join(folder_paths.models_dir, "CatVTON", "sd-vae-ft-mse")).to(device, dtype=weight_dtype)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/torch-gpu/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1340, in to
    return self._apply(convert)
           ^^^^^^^^^^^^^^^^^^^^
  File "/opt/anaconda3/envs/torch-gpu/lib/python3.12/site-packages/torch/nn/modules/module.py", line 900, in _apply
    module._apply(fn)
  File "/opt/anaconda3/envs/torch-gpu/lib/python3.12/site-packages/torch/nn/modules/module.py", line 900, in _apply
    module._apply(fn)
  File "/opt/anaconda3/envs/torch-gpu/lib/python3.12/site-packages/torch/nn/modules/module.py", line 927, in _apply
    param_applied = fn(param)
                    ^^^^^^^^^
  File "/opt/anaconda3/envs/torch-gpu/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1326, in convert
    return t.to(
           ^^^^^
  File "/opt/anaconda3/envs/torch-gpu/lib/python3.12/site-packages/torch/cuda/__init__.py", line 309, in _lazy_init
    raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled

Could anyone tell me how to solve the problem?

chflame163 commented 1 month ago

It has currently only tested on CUDA devices. I don't have any Mac for testing.

sysfox commented 1 month ago

It has currently only tested on CUDA devices. I don't have any Mac for testing.

That's a pity. I have tried every way I could find on Google and Bing about how to open CUDA on M1, but none of them work, maybe there's some problem with the code...

I'll try to run ComfyUI on NVIDIA

ruucm-working commented 1 month ago

same here

cl000100 commented 2 weeks ago

It has currently only tested on CUDA devices. I don't have any Mac for testing.

I sincerely hope that this great plugin will be compatible with macOS in the future. @chflame163

chflame163 commented 2 weeks ago

I sincerely hope that this great plugin will be compatible with macOS in the future. @chflame163

Firstly, I need to save money to buy a Mac, you know, it's quite expensive:)

scofield5381 commented 2 days ago

同样的问题,希望作者能早日解决