diffusers icon indicating copy to clipboard operation
diffusers copied to clipboard

AdamW degrades word embeddings in textual inversion training

Open hadaev8 opened this issue 3 years ago • 7 comments

Describe the bug

Text embeddings intended to be frozen/unchanged, but it doesn't happen. First embedding trains against real embeddings, but as training go on, word embeddings decays to zero.

Reproduction

Not sure if really a bug.

Logs

No response

System Info

Example on colab. Code here too.

hadaev8 avatar Nov 07 '22 16:11 hadaev8

cc @patil-suraj

patrickvonplaten avatar Nov 09 '22 19:11 patrickvonplaten

@hadaev8 Might take a look at #855 for a temporary fix.

duongna21 avatar Nov 10 '22 02:11 duongna21

@duongna21 Im sure fixed it in my codebase by using adam. Not ideal way to fix it, if you want weight decay, easier to apply it manually on new embedding.

hadaev8 avatar Nov 10 '22 10:11 hadaev8

Gently ping here again @patil-suraj :-)

patrickvonplaten avatar Nov 15 '22 22:11 patrickvonplaten

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the contributing guidelines are likely to be ignored.

github-actions[bot] avatar Dec 10 '22 15:12 github-actions[bot]

Bump

hadaev8 avatar Dec 12 '22 15:12 hadaev8

Hey @hadaev8,

Could you check whether this is fixed by: https://github.com/huggingface/diffusers/pull/1665

patrickvonplaten avatar Dec 15 '22 20:12 patrickvonplaten

Well I guess so, while I would prefer direct reducing affected embs

hadaev8 avatar Dec 22 '22 15:12 hadaev8