d8ahazard / sd_dreambooth_extension

Other
1.85k stars 281 forks source link

[Bug]: Unable to load .ckpt successfully #1385

Closed wangxr1999 closed 8 months ago

wangxr1999 commented 8 months ago

Is there an existing issue for this?

What happened?

Hello, very good job. My problem is similar to those issues before, and I have also tried many ckpt/safetensor files and dev branch, but I still cannot create the model normally on linux. image

Steps to reproduce the problem

  1. bash webui.sh
  2. load ckpt to create dreambooth model

Commit and libraries

Initializing Dreambooth Dreambooth revision: d8e01e1fd13dd4b6afadbb0382875f905ee5f429 Successfully installed accelerate-0.23.0 diffusers-0.21.4 fastapi-0.94.1 transformers-4.32.1 [!] xformers NOT installed. [+] torch version 2.0.1+cu118 installed. [+] torchvision version 0.15.2+cu118 installed. [+] accelerate version 0.23.0 installed. [+] diffusers version 0.21.4 installed. [+] transformers version 4.32.1 installed. [+] bitsandbytes version 0.41.1 installed.

Command Line Arguments

bash webui.sh -f

Console logs

Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 31.0s (prepare environment: 24.6s, initialize shared: 0.3s, other imports: 0.9s, setup codeformer: 0.3s, load scripts: 2.4s, create ui: 1.3s, gradio launch: 1.1s).
Creating model from config: /mnt/home/wxr/stable-diffusion-webui-master/stable-diffusion-webui/configs/v1-inference.yaml
Applying attention optimization: Doggettx... done.
Model loaded in 156.5s (load weights from disk: 4.5s, create model: 129.2s, apply weights to model: 22.4s, apply half(): 0.1s, calculate empty prompt: 0.1s).
Extracting config from /mnt/home/wxr/stable-diffusion-webui-master/stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/../configs/v1-training-default.yaml
Extracting checkpoint from /mnt/home/wxr/stable-diffusion-webui-master/stable-diffusion-webui/models/Stable-diffusion/model.ckpt
Something went wrong, removing model directory
Traceback (most recent call last):
  File "/mnt/home/wxr/stable-diffusion-webui-master/stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/sd_to_diff.py", line 197, in extract_checkpoint
    pipe = StableDiffusionPipeline.from_pretrained(
  File "/opt/conda/envs/sdwbui/lib/python3.10/site-packages/diffusers/pipelines/pipeline_utils.py", line 1075, in from_pretrained
    raise ValueError(
ValueError: The provided pretrained_model_name_or_path "/mnt/home/wxr/stable-diffusion-webui-master/stable-diffusion-webui/models/Stable-diffusion/model.ckpt" is neither a valid local path nor a valid repo id. Please check the parameter.
Couldn't find /mnt/home/wxr/stable-diffusion-webui-master/stable-diffusion-webui/models/dreambooth/new /working/unet
Unable to extract checkpoint!

Additional information

No response

d8ahazard commented 8 months ago

This should be fixed in the latest release. Please open a new issue if you're still having problems. Thanks! :D