AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
141.71k stars 26.77k forks source link

[Bug]: Training hypernetwork for SD2.1 gives black images #5916

Open Centurion-Rome opened 1 year ago

Centurion-Rome commented 1 year ago

Is there an existing issue for this?

What happened?

Trying to train an hypernetwork

2.1 produces black images

Steps to reproduce the problem

Load 2.0 / 2.1 ckpt (768px), train hypernetwork See black images produces in "\stable-diffusion-webui\textual_inversion\2022-12-21\hypernetworkname\images" Training Embedings gives good images Training Hypernetworks give black images...

So it seems that hypernetwork training is broken. Embedding works. Also commented in https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/5715

What should have happened?

Hypernetwork being traind and images are generated correctly in "\stable-diffusion-webui\textual_inversion\2022-12-21\hypernetworkname\images"

Commit where the problem happens

685f9631b56ff8bd43bce24ff5ce0f9a0e9af490

What platforms do you use to access UI ?

Windows

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

--xformers
but also without it problem persists.

Additional information, context and logs

No response

morphinapg commented 1 year ago

This was marked as completed but I'm still having this issue. Using a 3080 TI (12GB). Training embedding is working with --xformers and "Use cross attention optimizations while training" enabled, but not hypernetworks. Loss always says nan.