taabata / LCM_Inpaint_Outpaint_Comfy

ComfyUI custom nodes for inpainting/outpainting using the new latent consistency model (LCM)
252 stars 19 forks source link

CanvasTool #15

Closed Makerman991 closed 11 months ago

Makerman991 commented 11 months ago

I have used the setup.py for the canvas tool. It's moved the files properly, but comfyui appears to not be using the files.

ERROR:root:!!! Exception during processing !!!
ERROR:root:Traceback (most recent call last):
  File "C:\Users\llamp\OneDrive\Desktop\ComfyUI_windows_portable\ComfyUI\execution.py", line 153, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\llamp\OneDrive\Desktop\ComfyUI_windows_portable\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 "C:\Users\llamp\OneDrive\Desktop\ComfyUI_windows_portable\ComfyUI\execution.py", line 76, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\llamp\OneDrive\Desktop\ComfyUI_windows_portable\ComfyUI\custom_nodes\LCM_Inpaint_Outpaint_Comfy\LCM_Nodes.py", line 2011, in canvasopen
    bg = Image.open(folder_paths.get_folder_paths("custom_nodes")[0]+"/LCM_Inpaint_Outpaint_Comfy/CanvasTool/image.png")
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\llamp\OneDrive\Desktop\ComfyUI_windows_portable\python_embeded\Lib\site-packages\PIL\Image.py", line 3243, in open
    fp = builtins.open(filename, "rb")
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\llamp\\OneDrive\\Desktop\\ComfyUI_windows_portable\\ComfyUI\\custom_nodes/LCM_Inpaint_Outpaint_Comfy/CanvasTool/image.png'

There is no new UI or anything in the comfyui page.

taabata commented 11 months ago

I think you hit on Queue Prompt without setting the image and mask. You should first press on the open canvas button to set these.

Screenshot from 2023-12-07 21-06-34

Makerman991 commented 11 months ago

Well, there's no open canvas button. Another thing I should say, is I had to add xformers to the comfyUI files manually. (Because they removed it) image_2023-12-07_121435559

taabata commented 11 months ago

@Makerman991 you can try and manually replace the following files with the files found in the CanvasTool folder: In ComfyUI directory: server.py

In ComfyUI/web folder: index.html

This was supposed to be done automatically when you run the setup.py script in CanvasTool folder, but whatever. Then the Open Canvas button should appear in the bottom right corner of the UI.

Makerman991 commented 11 months ago

I figured it out. The open canvas button is behind the thing. It did install properly, it's just not in the right layer order. This was a complete and udder guess after I saw the files were in the right spot. image

taabata commented 11 months ago

@Makerman991 Yeah. Honestly, I should've added the buttons to the panel.

Makerman991 commented 11 months ago

I just did a quick and simple fix of

z-index: 1000;

Added to the buttons in the index. (Don't do 999 or below, the comfyUI menu is at 999)