AUTOMATIC1111 / stable-diffusion-webui

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

textual inversion default values.... #2784

Open 1blackbar opened 1 year ago

1blackbar commented 1 year ago

Can we get defaults exacly like in this file ? https://github.com/nicolai256/Stable-textual-inversion_win/blob/main/configs/stable-diffusion/v1-finetune.yaml

Learning rate is 5.0e-03 but i think other stuff was changed too I think current defaults give pretty bad results, id also change all other stuff to be exactly like in that yaml cause these values are proven to work great here https://github.com/rinongal/textual_inversion/issues/35

CodeExplode commented 1 year ago

I've mostly used the original TI code, though am wondering what Automatic's is missing which that settings file allows? Num_workers was a setting which could be played to bring down vram usage and I'm not sure if Automatic's has an equivalent (or what it does), and some of Rinon Gal's experimental settings like progressive words aren't implemented (though he said they didn't help anyway) - though Automatic's code is pretty nicely organized for adding new experiments like that in yourself (I've added a few).

The one big thing I'd like is a way to emulate accumulate_grad_batches, which seemed to give much better results when added to the original yaml and set to something like >5. I think it might be as simple as just holding off doing the loss backwards propagation until every n steps though, using the average loss from the last n steps (and ensuring it is done on the last step of a batch if the accumulation size doesn't divide neatly).

1blackbar commented 1 year ago

even when channging learning rate to 5.0e-03 the result is not as good as wth the repo i linked accu grad batches is not used in original repo The best solve to this would be extra place in webui to just provide that v1-finetune.yaml file i linked so you can use it or not. Its really struggling to get the likeness with 70 vectors even with like 10k steps, crazy.This didnt happened with nicolai256 repo. I dont know what was done but please do allow to use original code like it was intended.

CodeExplode commented 1 year ago

Yeah I'm still not sure if I can get as good results in this repo, have had a few successes but also some which just seem to never work, so there may be something missing still. The webui can't do anything with the yaml unless all those particular settings are implemented, and things are so different in this repo it doesn't really make sense to include most of those settings.

CodeExplode commented 1 year ago

Hrm yeah I've been trying to train an embedding for a character all day with Automatic's, and had no luck even undoing all my customizations (except for custom prompts). Then went back to lstein's old repo and am getting much better results very quickly.

I have had some successful TI runs with Automatic's repo, so I'm not sure what the issue could be.

1blackbar commented 1 year ago

yes, the "optimizations" affected the results, thats why id prefere to have just vanilla versions (ontouched code) as well and current optimized one for whoever wants/needs it too. Currently TI is broken in this webui.