lyc0929 / OOTDiffusion-train

Other
119 stars 20 forks source link

Have you tried xformers? #10

Open Aaron2117 opened 5 months ago

Aaron2117 commented 5 months ago

Maybe your training time will drop dramatically if you use xformers

lyc0929 commented 5 months ago

ok,thank you ,we will try it .

joe-zxh commented 5 months ago

@Aaron2117 Hi, how to use xformers in the training code(ootd_train.py)?

I simply add these 2 lines: unet_garm.enable_xformers_memory_efficient_attention() unet_vton.enable_xformers_memory_efficient_attention()

It didn't work. The speed and memory is same without xformers.

joe-zxh commented 5 months ago

I use pytorch version 2.2.1, my classmate tell me that the new version of pytorch already has the xformer optimization inside it. So it may be the same with or without the xformer.