ManglerFTW / ComfyI2I

ComfyI2I is a set of custom nodes for ComfyUI that help with image 2 image functions.
Other
158 stars 16 forks source link

Error occurred when executing Color Transfer: #17

Open minifisk opened 1 year ago

minifisk commented 1 year ago

Thanks for an interesting node, getting this error, I'm running a M1 mac, but maybe there is a way to run this without CUDA?

`Error occurred when executing Color Transfer:

Torch not compiled with CUDA enabled

File "/Users/Alexander/Documents/AI/ComfyUI/execution.py", line 153, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/Alexander/Documents/AI/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 "/Users/Alexander/Documents/AI/ComfyUI/execution.py", line 76, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/Alexander/Documents/AI/ComfyUI/custom_nodes/ComfyI2I/ComfyI2I.py", line 1289, in ColorXfer2 segmented_np = segment_image(Source, colors1, mask_torch=mask_torch, threshold=1) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/Alexander/Documents/AI/ComfyUI/custom_nodes/ComfyI2I/ComfyI2I.py", line 371, in segment_image palette_torch = torch.tensor([list(color.rgb) for color in palette_colors], device='cuda').float() ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/homebrew/lib/python3.11/site-packages/torch/cuda/init.py", line 289, in _lazy_init raise AssertionError("Torch not compiled with CUDA enabled")`

minifisk commented 1 year ago

Created a PR for fixing this issue: https://github.com/ManglerFTW/ComfyI2I/pull/18