sd-webui-depth-lib icon indicating copy to clipboard operation
sd-webui-depth-lib copied to clipboard

failed to add new .png to /maps folder for more hand shapes

Open stonegoGit opened this issue 2 years ago • 4 comments

The error message is listed below: Error executing callback ui_tabs_callback for /root/autodl-tmp/stable-diffusion-webui/extensions/sd-webui-depth-lib/scripts/main.py Traceback (most recent call last): File "/root/autodl-tmp/stable-diffusion-webui/modules/script_callbacks.py", line 119, in ui_tabs_callback res += c.callback() or [] File "/root/autodl-tmp/stable-diffusion-webui/extensions/sd-webui-depth-lib/scripts/main.py", line 40, in on_ui_tabs dataset = gr.Examples(examples=os.path.abspath(os.path.join(os.path.dirname(file), "../maps")), inputs=[png_input_area],examples_per_page=24,label="Depth Maps") File "/root/miniconda3/envs/xl_env/lib/python3.10/site-packages/gradio/helpers.py", line 53, in create_examples examples_obj = Examples( File "/root/miniconda3/envs/xl_env/lib/python3.10/site-packages/gradio/helpers.py", line 200, in init self.processed_examples = [ File "/root/miniconda3/envs/xl_env/lib/python3.10/site-packages/gradio/helpers.py", line 201, in [ File "/root/miniconda3/envs/xl_env/lib/python3.10/site-packages/gradio/helpers.py", line 202, in component.postprocess(sample) File "/root/miniconda3/envs/xl_env/lib/python3.10/site-packages/gradio/components.py", line 1532, in postprocess return processing_utils.encode_url_or_file_to_base64(y) File "/root/miniconda3/envs/xl_env/lib/python3.10/site-packages/gradio/processing_utils.py", line 62, in encode_url_or_file_to_base64 return encode_file_to_base64(str(path), encryption_key=encryption_key) File "/root/miniconda3/envs/xl_env/lib/python3.10/site-packages/gradio/processing_utils.py", line 86, in encode_file_to_base64 with open(f, "rb") as file: IsADirectoryError: [Errno 21] Is a directory: '.ipynb_checkpoints' This occours after I added one new handshape.png to the /maps folder, and the extension didn't appear on the WebUI tab as a result.

stonegoGit avatar Mar 04 '23 15:03 stonegoGit

Could you upload the image in question, because I can't reproduce it. It's literally how I add the images to it myself. Also if you're using a colab I'm afraid I won't be able to help for now as I'm using only a local installation myself.

jexom avatar Mar 04 '23 18:03 jexom

This error appears on my colab deployment, I tried to put the same image into local deployment, and the extension works fine with it, so I guess the problem is caused by the ‘os.path.abspath(os.path.join(os.path.dirname(file)’ command, which might need to be modified for colab installment.

stonegoGit avatar Mar 04 '23 22:03 stonegoGit

Well going by the stacktrace doesn't seem like it. In any case you could try updating as I switched to the webui method of getting the base extension path.

jexom avatar Mar 06 '23 05:03 jexom

Should be fixed by 1d31c07

jexom avatar Mar 06 '23 21:03 jexom

Closing due to inactivity

jexom avatar Mar 08 '23 07:03 jexom