229 Commits (daa5a83bb7b38a46b875a4df2f9a35b848359297)

Author SHA1 Message Date
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
AUTOMATIC 11183b4d90 fix for #6700 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
Shondoit 21642000b3 Add PNG alpha channel as weight maps to data entries 3 years ago
AUTOMATIC aa6e55e001 do not display the message for TI unless the list of loaded embeddings changed 3 years ago
Max Audron 5eee2ac398 add data-dir flag and set all user data directories based on it 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
AUTOMATIC1111 0f9cacaa0e
Merge pull request #6844 from guaneec/crop-ui
Add auto-sized cropping UI
3 years ago
dan 2985b317d7 Fix of fix 3 years ago
dan 18a09c7e00 Simplification and bugfix 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
dan 4688bfff55 Add auto-sized cropping UI 3 years ago
Vladimir Mandic 110d1a2d59
add fields to settings file 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
AUTOMATIC1111 544e7a233e
Merge pull request #6689 from Poktay/add_gradient_settings_to_logging_file
add gradient settings to training settings log files
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
AUTOMATIC1111 486bda9b33
Merge pull request #6620 from guaneec/varsize_batch
Enable batch_size>1 for mixed-sized training
3 years ago
Josh R 0b262802b8 add gradient settings to training settings log files 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
dan 6be644fa04 Enable batch_size>1 for mixed-sized training 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 72497895b9 Move batchsize check 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