IDEA-Research / HumanSD

[ICCV 2023] The official implementation of paper "HumanSD: A Native Skeleton-Guided Diffusion Model for Human Image Generation"
Apache License 2.0
271 stars 18 forks source link

Train with fp16 #6

Closed yjhong89 closed 1 year ago

yjhong89 commented 1 year ago

I am trying to fine-tune HumanSD ckpt with use_fp16=True option. (I installed xformers) But it still RuntimeError occurs like below image

juxuan27 commented 1 year ago

Hi, @yjhong89 ! Thank you for your focus. I have tried to train with use_fp16=True but it just works fine. Maybe you can try to force the input to FloatTensor in your case? To do so, you can go to comparison_models/ControlNet/ldm/models/diffusion/ddpm.py and find get_input function in your latent diffusion class, then use .to(your expected data type).

yjhong89 commented 1 year ago

Thanks!

xiao2mo commented 6 months ago

你能自己复现下吗。把环境发一下,fp16 训练有问题啊。

xiao2mo commented 6 months ago

@yjhong89

chaunceywx commented 6 months ago

Thanks!

Have you successfully trained model with fp16 now? I encountered the same issue. How should I modify the code to train the model with fp16?

chaunceywx commented 6 months ago

Thanks!

@yjhong89