AUTOMATIC1111 / stable-diffusion-webui

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

[Bug]: Training error #4053

Closed Aspector1 closed 1 year ago

Aspector1 commented 1 year ago

Is there an existing issue for this?

What happened?

Activation function is None
Weight initialization is Normal
Layer norm is set to False
Dropout usage is set to False
Preparing dataset...
100%|██████████████████████████████████████████████████████████████████████████████████| 26/26 [00:20<00:00,  1.27it/s]
Mean loss of 13 elements
Training at rate of 1e-05 until step 2000
  0%|                                                                                         | 0/2000 [00:00<?, ?it/s]
Applying xformers cross attention optimization.
Error completing request
Arguments: ('me', '0.00001', 1, 'C:\\Ai\\me\\Processed', 'textual_inversion', 512, 512, 2000, 200, 200, 'C:\\WBC\\stable-diffusion-webui\\textual_inversion_templates\\subject2.txt', False, '', '', 20, 0, 7, -1.0, 512, 512) {}
Traceback (most recent call last):
  File "C:\WBC\stable-diffusion-webui\modules\ui.py", line 221, in f
    res = list(func(*args, **kwargs))
  File "C:\WBC\stable-diffusion-webui\webui.py", line 63, in f
    res = func(*args, **kwargs)
  File "C:\WBC\stable-diffusion-webui\modules\hypernetworks\ui.py", line 49, in train_hypernetwork
    hypernetwork, filename = modules.hypernetworks.hypernetwork.train_hypernetwork(*args)
  File "C:\WBC\stable-diffusion-webui\modules\hypernetworks\hypernetwork.py", line 411, in train_hypernetwork
    loss = shared.sd_model(x, c)[0]
  File "C:\WBC\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "C:\WBC\stable-diffusion-webui\repositories\stable-diffusion\ldm\models\diffusion\ddpm.py", line 879, in forward
    return self.p_losses(x, c, t, *args, **kwargs)
  File "C:\WBC\stable-diffusion-webui\repositories\stable-diffusion\ldm\models\diffusion\ddpm.py", line 1015, in p_losses
    model_output = self.apply_model(x_noisy, t, cond)
  File "C:\WBC\stable-diffusion-webui\repositories\stable-diffusion\ldm\models\diffusion\ddpm.py", line 987, in apply_model
    x_recon = self.model(x_noisy, t, **cond)
  File "C:\WBC\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1148, in _call_impl
    result = forward_call(*input, **kwargs)
  File "C:\WBC\stable-diffusion-webui\repositories\stable-diffusion\ldm\models\diffusion\ddpm.py", line 1412, in forward
    xc = torch.cat([x] + c_concat, dim=1)
TypeError: can only concatenate list (not "NoneType") to list

Steps to reproduce the problem

  1. Go to train
  2. Press "Train Hypemetwork"
  3. See the error

What should have happened?

Training hypernetwork

Commit where the problem happens

Commit 9b384df

What platforms do you use to access UI ?

Windows

What browsers do you use to access the UI ?

Microsoft Edge

Command Line Arguments

--xformers --medvram --precision full --no-half --vae-path models/VAE/vae-ft-ema-560000-ema-pruned.ckpt

Additional information, context and logs

No response

mykeehu commented 1 year ago

Could you have had a model active that is not trainable (for example, an inpaint model)?

Aspector1 commented 1 year ago

Could you have had a model active that is not trainable (for example, an inpaint model)?

Is NovelAI trainable? Cause I've used this model.

somenewaccountthen commented 1 year ago

Could you have had a model active that is not trainable (for example, an inpaint model)?

eh.. ahh... had this issue and i was using the inpaint model :) Thanks @mykeehu