butaixianran
803d44c474
Fix None type error for TI module
...
When user using model_name.png as a preview image, textural_inversion.py still treat it as an embeding, and didn't handle its error, just let python throw out an None type error like following:
```bash
File "D:\Work\Dev\AI\stable-diffusion-webui\modules\textual_inversion\textual_inversion.py", line 155, in load_from_file
name = data.get('name', name)
AttributeError: 'NoneType' object has no attribute 'get'
```
With just a simple `if data:` checking as following, there will be no error, breaks nothing, and now this module can works fine with user's preview images.
Old code:
```python
data = extract_image_data_embed(embed_image)
name = data.get('name', name)
```
New code:
```python
data = extract_image_data_embed(embed_image)
if data:
name = data.get('name', name)
else:
# if data is None, means this is not an embeding, just a preview image
return
```
Also, since there is no more errors on textual inversion module, from now on, extra network can set "model_name.png" as preview image for embedings.
3 years ago
Shondoit
edb10092de
Add ability to choose using weighted loss or not
3 years ago
Shondoit
bc50936745
Call weighted_forward during training
3 years ago
AUTOMATIC
aa6e55e001
do not display the message for TI unless the list of loaded embeddings changed
3 years ago
Alex "mcmonkey" Goodwin
e179b6098a
allow symlinks in the textual inversion embeddings folder
3 years ago
AUTOMATIC
40ff6db532
extra networks UI
...
rework of hypernets: rather than via settings, hypernets are added directly to prompt as <hypernet:name:weight>
3 years ago
AUTOMATIC
924e222004
add option to show/hide warnings
...
removed hiding warnings from LDSR
fixed/reworked few places that produced warnings
3 years ago
AUTOMATIC
d8b90ac121
big rework of progressbar/preview system to allow multiple users to prompts at the same time and do not get previews of each other
3 years ago
AUTOMATIC
a95f135308
change hash to sha256
3 years ago
AUTOMATIC
82725f0ac4
fix a bug caused by merge
3 years ago
AUTOMATIC1111
9cd7716753
Merge branch 'master' into tensorboard
3 years ago
AUTOMATIC
a176d89487
print bucket sizes for training without resizing images #6620
...
fix an error when generating a picture with embedding in it
3 years ago
Shondoit
d52a80f7f7
Allow creation of zero vectors for TI
3 years ago
Vladimir Mandic
3f43d8a966
set descriptions
3 years ago
Lee Bousfield
f9706acf43
Support loading textual inversion embeddings from safetensors files
3 years ago
AUTOMATIC
1fbb6f9ebe
make a dropdown for prompt template selection
3 years ago
AUTOMATIC
43bb5190fc
remove/simplify some changes from #6481
3 years ago
AUTOMATIC1111
18c001792a
Merge branch 'master' into varsize
3 years ago
AUTOMATIC
085427de0e
make it possible for extensions/scripts to add their own embedding directories
3 years ago
AUTOMATIC
a0c87f1fdf
skip images in embeddings dir if they have a second .preview extension
3 years ago
dan
669fb18d52
Add checkbox for variable training dims
3 years ago
dan
448b9cedab
Allow variable img size
3 years ago
AUTOMATIC
79e39fae61
CLIP hijack rework
3 years ago
AUTOMATIC
683287d87f
rework saving training params to file #6372
3 years ago
AUTOMATIC1111
88e01b237e
Merge pull request #6372 from timntorres/save-ti-hypernet-settings-to-txt-revised
...
Save hypernet and textual inversion settings to text file, revised.
3 years ago
Faber
81133d4168
allow loading embeddings from subdirectories
3 years ago
Kuma
fda04e620d
typo in TI
3 years ago
timntorres
b6bab2f052
Include model in log file. Exclude directory.
3 years ago
timntorres
b85c2b5cf4
Clean up ti, add same behavior to hypernetwork.
3 years ago
timntorres
eea8fc40e1
Add option to save ti settings to file.
3 years ago
AUTOMATIC1111
eeb1de4388
Merge branch 'master' into gradient-clipping
3 years ago
AUTOMATIC
525cea9245
use shared function from processing for creating dummy mask when training inpainting model
3 years ago
AUTOMATIC
184e670126
fix the merge
3 years ago
AUTOMATIC1111
da5c1e8a73
Merge branch 'master' into inpaint_textual_inversion
3 years ago
AUTOMATIC1111
7bbd984dda
Merge pull request #6253 from Shondoit/ti-optim
...
Save Optimizer next to TI embedding
3 years ago
Vladimir Mandic
192ddc04d6
add job info to modules
3 years ago
Shondoit
bddebe09ed
Save Optimizer next to TI embedding
...
Also add check to load only .PT and .BIN files as embeddings. (since we add .optim files in the same directory)
3 years ago
Philpax
c65909ad16
feat(api): return more data for embeddings
3 years ago
AUTOMATIC
311354c0bb
fix the issue with training on SD2.0
3 years ago
AUTOMATIC
bdbe09827b
changed embedding accepted shape detection to use existing code and support the new alt-diffusion model, and reformatted messages a bit #6149
3 years ago
Vladimir Mandic
f55ac33d44
validate textual inversion embeddings
3 years ago
Yuval Aboulafia
3bf5591efe
fix F541 f-string without any placeholders
3 years ago
Jim Hays
c0355caefe
Fix various typos
3 years ago
AUTOMATIC1111
c9a2cfdf2a
Merge branch 'master' into racecond_fix
3 years ago
brkirch
4d5f1691dd
Use devices.autocast instead of torch.autocast
3 years ago
AUTOMATIC
b48b7999c8
Merge remote-tracking branch 'flamelaw/master'
3 years ago
flamelaw
755df94b2a
set TI AdamW default weight decay to 0
3 years ago
AUTOMATIC
ce6911158b
Add support Stable Diffusion 2.0
3 years ago
flamelaw
89d8ecff09
small fixes
3 years ago
flamelaw
5b57f61ba4
fix pin_memory with different latent sampling method
3 years ago