picobyte / stable-diffusion-webui-wd14-tagger

Labeling extension for Automatic1111's Web UI
601 stars 74 forks source link

Usage error in SageMaker Studio Lab #73

Closed anxety-solo closed 1 year ago

anxety-solo commented 1 year ago

The error occurs when you click on the "interrogate image" button. The extension did not cause any problems when installed. The values are set to default.

Error:

*** Error completing request
*** Arguments: (<PIL.Image.Image image mode=RGB size=720x720 at 0x7FD129266160>, 'WD14 moat tagger v2', '', '', '', '', '', '') {}
    Traceback (most recent call last):
      File "/home/studio-lab-user/content/sdw/modules/call_queue.py", line 57, in f
        res = list(func(*args, **kwargs))
      File "/home/studio-lab-user/content/sdw/modules/call_queue.py", line 36, in f
        res = func(*args, **kwargs)
      File "/home/studio-lab-user/content/sdw/extensions/wd_tagger/tagger/ui.py", line 113, in on_interrogate_image_submit
        interrogator.interrogate_image(image)
      File "/home/studio-lab-user/content/sdw/extensions/wd_tagger/tagger/interrogator.py", line 150, in interrogate_image
        data = ('', '', fi_key) + self.interrogate(image)
      File "/home/studio-lab-user/content/sdw/extensions/wd_tagger/tagger/interrogator.py", line 448, in interrogate
        self.load()
      File "/home/studio-lab-user/content/sdw/extensions/wd_tagger/tagger/interrogator.py", line 431, in load
        model_path, tags_path = self.download()
      File "/home/studio-lab-user/content/sdw/extensions/wd_tagger/tagger/interrogator.py", line 391, in download
        model_path = hf_hub_download(
      File "/home/studio-lab-user/.conda/envs/default/lib/python3.9/site-packages/huggingface_hub/utils/_validators.py", line 118, in _inner_fn
        return fn(*args, **kwargs)
      File "/home/studio-lab-user/.conda/envs/default/lib/python3.9/site-packages/huggingface_hub/file_download.py", line 1195, in hf_hub_download
        os.makedirs(storage_folder, exist_ok=True)
      File "/home/studio-lab-user/.conda/envs/default/lib/python3.9/os.py", line 215, in makedirs
        makedirs(head, exist_ok=exist_ok)
      File "/home/studio-lab-user/.conda/envs/default/lib/python3.9/os.py", line 215, in makedirs
        makedirs(head, exist_ok=exist_ok)
      File "/home/studio-lab-user/.conda/envs/default/lib/python3.9/os.py", line 215, in makedirs
        makedirs(head, exist_ok=exist_ok)
      [Previous line repeated 1 more time]
      File "/home/studio-lab-user/.conda/envs/default/lib/python3.9/os.py", line 225, in makedirs
        mkdir(name, mode)
    PermissionError: [Errno 13] Permission denied: '/content'

---
Traceback (most recent call last):
  File "/home/studio-lab-user/.conda/envs/default/lib/python3.9/site-packages/gradio/routes.py", line 488, in run_predict
    output = await app.get_blocks().process_api(
  File "/home/studio-lab-user/.conda/envs/default/lib/python3.9/site-packages/gradio/blocks.py", line 1434, in process_api
    data = self.postprocess_data(fn_index, result["prediction"], state)
  File "/home/studio-lab-user/.conda/envs/default/lib/python3.9/site-packages/gradio/blocks.py", line 1297, in postprocess_data
    self.validate_outputs(fn_index, predictions)  # type: ignore
  File "/home/studio-lab-user/.conda/envs/default/lib/python3.9/site-packages/gradio/blocks.py", line 1272, in validate_outputs
    raise ValueError(
ValueError: An event handler (on_interrogate_image_submit) didn't receive enough output values (needed: 7, received: 3).
Wanted outputs:
    [state, html, html, label, label, label, html]
Received outputs:
    [None, "", "<div class='error'>PermissionError: [Errno 13] Permission denied: &#x27;/content&#x27;</div><div class='performance'><p class='time'>Time taken: <wbr><span class='measurement'>0.0 sec.</span></p></div>"]
picobyte commented 1 year ago

Your stable diffusion folder seems to be /home/studio-lab-user/content/sdw and for some reason it ends up trying to install in /content which may not even exist. I'm not sure what you did to get there. What interrogation model were you using. Is it just for that one model?

anxety-solo commented 1 year ago

interrogation model

I checked and the error comes out on any model. I also decided to check the operability of /content - move sd-webui to this directory - the same error.