lora icon indicating copy to clipboard operation
lora copied to clipboard

Train unet and text_encoder separately? (feature request)

Open b4nn3d opened this issue 2 years ago • 5 comments
trafficstars

Can be useful For low vram, and/or bigger batch sizer and/or fine tuning only one network, maybe?

b4nn3d avatar Dec 15 '22 09:12 b4nn3d

You can already do this, disabling train_text_encoder will only train the unet, enabling it will train both.

Or perhaps you mean you want to train the text_encoder by itself?

brian6091 avatar Dec 15 '22 10:12 brian6091

I know that we can train unet alone, I'm asking if theorically we can get some advantages training only the text encoder ;)

b4nn3d avatar Dec 15 '22 11:12 b4nn3d

Ah got it. That's a pretty easy change, I could do that in a day or so if you want to test it ;-)

brian6091 avatar Dec 15 '22 11:12 brian6091

Sure thats no problem. I also think that we can update them one at a time, iteratively. This will get the best of both worlds: training both text, unet + small memory

cloneofsimo avatar Dec 15 '22 12:12 cloneofsimo

Sure thats no problem. I also think that we can update them one at a time, iteratively. This will get the best of both worlds: training both text, unet + small memory

this is a very good idea too :) still, the ability to train the two networks indipendently.. i think it can be a good source for experiments ;)

b4nn3d avatar Dec 15 '22 23:12 b4nn3d