continue-revolution / sd-webui-segment-anything

Segment Anything for Stable Diffusion WebUI
3.41k stars 205 forks source link

Sam model not found. #181

Open nasekajlo opened 10 months ago

nasekajlo commented 10 months ago

Is there an existing issue for this?

Have you 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?

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

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?

What happened?

Hello! I have a problem with installation of SAM models. (SAM model not found. Please download SAM model from extension README.) I have added two models from README to folder stable-diffusion-webiu -> extensions -> segment-anything-webui -> models -> sam as it is written in readme, but this error occures. I saw the same issue, but I use the v1 sd, so it must work, but I don't even see this models on UI (screenshot is attached).

This is console print:

Loading weights [fe06753eee] from /content/gdrive/MyDrive/sd/uberRealisticPornMerge_urpmv13Inpainting.safetensors
Running on public URL: https://9a10ea64834a47a35d.gradio.live/
✔ Connected
Creating model from config: /content/gdrive/MyDrive/sd/stable-diffusion-webui/configs/v1-inpainting-inference.yaml
Civitai: Check resources for missing info files
Civitai: Check resources for missing preview images
Startup time: 211.1s (launcher: 0.8s, import torch: 12.5s, import gradio: 2.4s, setup paths: 24.0s, import ldm: 0.8s, initialize shared: 6.2s, other imports: 38.1s, setup codeformer: 9.6s, setup gfpgan: 0.4s, list SD models: 0.7s, load scripts: 63.7s, load upscalers: 0.7s, reload hypernetworks: 0.6s, initialize extra networks: 12.5s, create ui: 22.3s, gradio launch: 15.5s, add APIs: 0.5s).
Civitai: Found 0 resources missing info files
Civitai: No info found on Civitai
Civitai: Found 0 resources missing preview images
Civitai: No preview images found on Civitai
Applying attention optimization: xformers... done.
Model loaded in 75.0s (load weights from disk: 51.3s, create model: 5.1s, apply weights to model: 16.5s, hijack: 0.5s, load textual inversion embeddings: 1.0s, calculate empty prompt: 0.5s).
Start SAM Processing
Start SAM Processing

image

image

Steps to reproduce the problem

I don't really know how to fix this bug

What should have happened?

The normal behavior is showimg up the SAM model on the webui

Commit where the problem happens

webui: the last version extension: the last version

What browsers do you use to access the UI ?

No response

Command Line Arguments

No

Console logs

Loading weights [fe06753eee] from /content/gdrive/MyDrive/sd/uberRealisticPornMerge_urpmv13Inpainting.safetensors
Running on public URL: https://9a10ea64834a47a35d.gradio.live
✔ Connected
Creating model from config: /content/gdrive/MyDrive/sd/stable-diffusion-webui/configs/v1-inpainting-inference.yaml
Civitai: Check resources for missing info files
Civitai: Check resources for missing preview images
Startup time: 211.1s (launcher: 0.8s, import torch: 12.5s, import gradio: 2.4s, setup paths: 24.0s, import ldm: 0.8s, initialize shared: 6.2s, other imports: 38.1s, setup codeformer: 9.6s, setup gfpgan: 0.4s, list SD models: 0.7s, load scripts: 63.7s, load upscalers: 0.7s, reload hypernetworks: 0.6s, initialize extra networks: 12.5s, create ui: 22.3s, gradio launch: 15.5s, add APIs: 0.5s).
Civitai: Found 0 resources missing info files
Civitai: No info found on Civitai
Civitai: Found 0 resources missing preview images
Civitai: No preview images found on Civitai
Applying attention optimization: xformers... done.
Model loaded in 75.0s (load weights from disk: 51.3s, create model: 5.1s, apply weights to model: 16.5s, hijack: 0.5s, load textual inversion embeddings: 1.0s, calculate empty prompt: 0.5s).
Start SAM Processing
Start SAM Processing

Additional information

No response

FoxyDelta1 commented 3 months ago

I have the same issue. Model is already downloaded and copied to the .\stable-diffusion-webui\extensions\sd-webui-segment-anything\models\sam\ It worked once for me and after restart, unable to find the model at all. Downloaded multiple times. Deleted and reinstalled the extension. Nothing works

gniqeh commented 3 days ago

Choose one or more of the models below and put them to ${sd-webui}/models/sam or ${sd-webui-segment-anything}/models/sam (Choose one, not both. Remove the former folder if you choose to use the latter.). Do not change model name, otherwise this extension may fail due to a bug inside segment anything.