Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: An error occurs when autosam is used with controlnet #123

Closed
5 tasks done
BanXia-Ww opened this issue Jun 11, 2023 · 1 comment
Closed
5 tasks done

[Bug]: An error occurs when autosam is used with controlnet #123

BanXia-Ww opened this issue Jun 11, 2023 · 1 comment

Comments

@BanXia-Ww
Copy link

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits of both this extension and the webui

Have you updated WebUI and this extension to the latest version?

  • I have updated WebUI and this extension to the latest version

Do you understand that you should read the 1st item of https://github.com/continue-revolution/sd-webui-segment-anything#faq if you cannot install GroundingDINO?

  • My problem is not about installing GroundingDINO

Do you understand that you should use the latest ControlNet extension and enable external control if you want SAM extension to control ControlNet?

  • I have updated ControlNet extension and enabled "Allow other script to control this extension"

Do you understand that you should read the 2nd item of https://github.com/continue-revolution/sd-webui-segment-anything#faq if you observe problems like AttributeError bool object has no attribute enabled and TypeError bool object is not subscriptable?

  • My problem is not about such issue, otherwise I have tried changing the extension directory name from sd-webui-segment-anything to a1111-sd-webui-segment-anything

What happened?

image
An error occurs when autosam is used with controlnet
There is no throne when using controlnet normally

Steps to reproduce the problem

  1. Go to ....
  2. Press ....
  3. ...

What should have happened?

Normal output picture

Commit where the problem happens

webui:
extension:

What browsers do you use to access the UI ?

Microsoft Edge

Command Line Arguments

no

Console logs

Start semantic segmentation with processor seg_ofade20k
Pixel Perfect Mode (written by lllyasviel) Enabled.
resize_mode = 1
raw_H = 768
raw_W = 512
target_H = 768
target_W = 512
estimation = 512.0
preprocessor resolution = 512
Generating semantic segmentation without SAM
Loading config D:\Stable_diffusion\sd-webui-aki\sd-webui-aki-v4.1\extensions\sd-webui-controlnet\annotator\oneformer\configs/ade20k/oneformer_swin_large_IN21k_384_bs16_160k.yaml with yaml.unsafe_load. Your machine may be at risk if the file contains malicious content.
Loading config D:\Stable_diffusion\sd-webui-aki\sd-webui-aki-v4.1\extensions\sd-webui-controlnet\annotator\oneformer\configs/ade20k\Base-ADE20K-UnifiedSegmentation.yaml with yaml.unsafe_load. Your machine may be at risk if the file contains malicious content.
Generating semantic segmentation with SAM
Auto SAM strengthening semantic segmentation
Auto SAM generated 83 masks
Auto SAM strengthen process end
Traceback (most recent call last):
  File "D:\Stable_diffusion\sd-webui-aki\sd-webui-aki-v4.1\python\lib\site-packages\gradio\routes.py", line 422, in run_predict
    output = await app.get_blocks().process_api(
  File "D:\Stable_diffusion\sd-webui-aki\sd-webui-aki-v4.1\python\lib\site-packages\gradio\blocks.py", line 1326, in process_api
    data = self.postprocess_data(fn_index, result["prediction"], state)
  File "D:\Stable_diffusion\sd-webui-aki\sd-webui-aki-v4.1\python\lib\site-packages\gradio\blocks.py", line 1260, in postprocess_data
    prediction_value = block.postprocess(prediction_value)
  File "D:\Stable_diffusion\sd-webui-aki\sd-webui-aki-v4.1\python\lib\site-packages\gradio\components.py", line 4457, in postprocess
    file = self.img_array_to_temp_file(img, dir=self.DEFAULT_TEMP_DIR)
  File "D:\Stable_diffusion\sd-webui-aki\sd-webui-aki-v4.1\python\lib\site-packages\gradio\components.py", line 355, in img_array_to_temp_file
    return self.pil_to_temp_file(pil_image, dir, format="png")
TypeError: save_pil_to_file() got an unexpected keyword argument 'format'

Additional information

No response

@continue-revolution
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants