d8ahazard / sd_dreambooth_extension

Other
1.86k stars 281 forks source link

[Bug]: Can not create model with sdxl type #1333

Closed gujingit closed 11 months ago

gujingit commented 1 year ago

Is there an existing issue for this?

What happened?

can not create model with sdxl type.

Steps to reproduce the problem

AUTOMATIC1111: v1.5.1 Dreambooth Extension: c93ac4efffb4448e3b61b285801d986f708001f3 model: sd_xl_base_1.0.safetensors

cannot create a model with SDXL model type

Commit and libraries

Initializing Dreambooth Dreambooth revision: c93ac4efffb4448e3b61b285801d986f708001f3 Successfully installed fastapi-0.94.1 [!] xformers NOT installed. [+] torch version 2.0.1+cu118 installed. [+] torchvision version 0.15.2+cu118 installed. [+] accelerate version 0.21.0 installed. [+] diffusers version 0.19.3 installed. [+] transformers version 4.30.2 installed. [+] bitsandbytes version 0.35.4 installed.

Command Line Arguments

python3 launch.py --listen --skip-prepare-environment --skip-install

Console logs

Extracting config from /stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/../configs/v1-training-default.yaml
Extracting checkpoint from /stable-diffusion-webui/models/Stable-diffusion/sd_xl_base_1.0.safetensors
[2023-08-21 11:57:21,647][DEBUG][dreambooth.dataclasses.db_config] - Saving to /stable-diffusion-webui/models/dreambooth/bob
Something went wrong, removing model directory
Traceback (most recent call last):
  File "/stable-diffusion-webui/extensions/sd_dreambooth_extension/dreambooth/sd_to_diff.py", line 157, in extract_checkpoint
    pipe = download_from_original_stable_diffusion_ckpt(
  File "/stable-diffusion-webui/venv/lib/python3.10/site-packages/diffusers/pipelines/stable_diffusion/convert_from_ckpt.py", line 1370, in download_from_original_stable_diffusion_ckpt
    set_module_tensor_to_device(unet, param_name, "cpu", value=param)
  File "/stable-diffusion-webui/venv/lib/python3.10/site-packages/accelerate/utils/modeling.py", line 255, in set_module_tensor_to_device
    new_module = getattr(module, split)
  File "/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1614, in __getattr__
    raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'ModuleList' object has no attribute '1'
Couldn't find /stable-diffusion-webui/models/dreambooth/bob/working/unet
Unable to extract checkpoint!
Duration: 00:00:04

Additional information

No response

commander443 commented 1 year ago

iv had this issue for a while to and still can't figure it out i think SDXL doesn't have unet?

d8ahazard commented 1 year ago

SDXL definitely has a unet.

However, this feature is not quite ready for full-time yet. I've started the work of adding SDXL training support, but it will likely be a few more days until it's fully completed. Once it is, I'll be testing the extraction method and finalizing everything else.

On Mon, Aug 21, 2023 at 7:35 AM commander443 @.***> wrote:

iv had this issue for a while to and still can't figure it out i think SDXL doesn't have unet?

— Reply to this email directly, view it on GitHub https://github.com/d8ahazard/sd_dreambooth_extension/issues/1333#issuecomment-1686246714, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMO4NFEYE5AWW44CJEVLATXWNIZ5ANCNFSM6AAAAAA3YIYNDI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

311-code commented 1 year ago

SDXL definitely has a unet. However, this feature is not quite ready for full-time yet. I've started the work of adding SDXL training support, but it will likely be a few more days until it's fully completed. Once it is, I'll be testing the extraction method and finalizing everything else. On Mon, Aug 21, 2023 at 7:35 AM commander443 @.> wrote: iv had this issue for a while to and still can't figure it out i think SDXL doesn't have unet? — Reply to this email directly, view it on GitHub <#1333 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMO4NFEYE5AWW44CJEVLATXWNIZ5ANCNFSM6AAAAAA3YIYNDI . You are receiving this because you are subscribed to this thread.Message ID: @.>

You are awesome, thanks! This extension is so much more user friendly than kohya's. Really appreciate the effort here.

benedlore commented 1 year ago

Looking forward to this as well!

github-actions[bot] commented 12 months ago

This issue is stale because it has been open 5 days with no activity. Remove stale label or comment or this will be closed in 5 days

norton-chris commented 12 months ago

Looking forward to this too!! (commenting so it doesn't go stale)

d8ahazard commented 12 months ago

This is live in the dev branch, just doing a bit more testing before it goes to main.

On Sat, Sep 9, 2023, 2:04 AM Chris Norton @.***> wrote:

Looking forward to this too!! (commenting so it doesn't go stale)

— Reply to this email directly, view it on GitHub https://github.com/d8ahazard/sd_dreambooth_extension/issues/1333#issuecomment-1712438060, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAMO4NH4MW2YR3EHS3LSWVLXZQII5ANCNFSM6AAAAAA3YIYNDI . You are receiving this because you commented.Message ID: @.***>

Miraculous14 commented 11 months ago

When can we solve this problem? emo :)

Ciduss commented 11 months ago

I'd love to hear more on this. Would you recommend people to test the dev branch with you D8?

venshine commented 11 months ago

same problem

ushanboe commented 11 months ago

same problem here would really love to have this working :)

Straafe commented 11 months ago

In meantime you can try it out on the test branch (I haven't tried it yet there), use kohya, or there are paid services you can use like dreamlook (I have had good results with kohya).

norton-chris commented 11 months ago

On the test branch, I keep getting an OOM error. I have 24GB of VRAM and I tried the lowest settings possible. (Performance wizard seems to think I can do much higher settings, which also doesn't work)

ushanboe commented 11 months ago

Im using a 3060 12GB VRAM can get kohya sdxl training working on LORA, but a lot of fiddling around with settings. Also very slow training but it does work. Keeping the Network Rank Dimension low (8) keeps the VRAM usage down but slow training.

github-actions[bot] commented 11 months ago

This issue is stale because it has been open 5 days with no activity. Remove stale label or comment or this will be closed in 5 days