Training does not work AttributeError: 'NoneType' object has no attribute 'detach
See original GitHub issueThe following error message appears and training cannot be started. Is this due to a misconfiguration? Note: This log is from standalone DreamArtist, but the exact same error was output in Extension.
Training at rate of 0.005 until step 30000
Preparing dataset...
100%|██████████████████████████████████████| 1/1 [00:05<00:00, 5.43s/it]
0%| | 0/30000 [00:01<?, ?it/s]
Error completing request
Arguments: ('emma', '0.005', 1, 'D:\\StableDiffusion\\work\\APT\\emma', 'dream_artist', 512, 512, 30000, 1000, 1000, 'D:\\SDWU\\DreamArtist-stable-diffusion\\textual_inversion_templates\\default.txt', True, True, '', '', 15, 0, 7, -1.0, 512, 512, 5.0, '', True, False, 1, 1) {}
Traceback (most recent call last):
File "D:\SDWU\DreamArtist-stable-diffusion\modules\ui.py", line 185, in f
res = list(func(*args, **kwargs))
File "D:\SDWU\DreamArtist-stable-diffusion\webui.py", line 54, in f
res = func(*args, **kwargs)
File "D:\SDWU\DreamArtist-stable-diffusion\modules\dream_artist\ui.py", line 36, in train_embedding
embedding, filename = modules.dream_artist.cptuning.train_embedding(*args)
File "D:\SDWU\DreamArtist-stable-diffusion\modules\dream_artist\cptuning.py", line 436, in train_embedding
f"grad:{embedding.vec.grad.detach().cpu().abs().mean().item():.7f}, "
AttributeError: 'NoneType' object has no attribute 'detach'
Issue Analytics
- State:
- Created 10 months ago
- Comments:10 (1 by maintainers)
Top Results From Across the Web
Why do I get AttributeError: 'NoneType' object has no attribute ...
It means the object you are trying to access None . None is a Null variable ...
Read more >attributeerror: 'nonetype' object has no attribute 'detach'
This is the problem. You're assigning elem to the result of the click() function, which doesn't return anything, therefore it returns None ....
Read more >AttributeError: 'NoneType' object has no attribute 'detach'
I am trying to create a hybrid recommender system using pytorch lightning. Here are my dataset and model classes: import pytorch_lightning ...
Read more >AttributeError: 'NoneType' object has no attribute 'get_items'
Hello everyone, We have imported one job (Local Resolution Estimation) from an old project and an old instance onto a newly installed, ...
Read more >AttributeError: 'NoneType' object has no attribute 'dtype'
Hello! I've been trying to fine-tune a german gpt-2 Modell with a dataset from huggingface via TensorFlow. When trying to start the Training...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Some findings if anyone can corroborate. This setup has worked for me.
Note you can include fixed text such as “a drawing of” in step 2 or 3, e.g. “a drawing of [name]”
Otherwise I get either the error described in this issue or in #4, if I:
yep this worked for me. Thank you for sharing your solution. I switched to style.txt. Clicked train then saw it got passed the error and so I stopped it and now I can use whatever template now and it works.