VectorSpaceLab / OmniGen

OmniGen: Unified Image Generation. https://arxiv.org/pdf/2409.11340
MIT License
2.58k stars 191 forks source link

torch.OutOfMemoryError when finetune #125

Open mikeyimer opened 1 day ago

mikeyimer commented 1 day ago

Follow the finetuning commands,I tried setting max_image_size to 512, but still oom on 40g ,how much vram is needed to finetune? Are there any parameters can reduce the vram? thank you

捕获oom

staoxiao commented 1 day ago

You can use lora fine-tuning instead of full fine-tuning: https://github.com/VectorSpaceLab/OmniGen/blob/main/docs/fine-tuning.md#lora-fine-tuning

whl0070179 commented 15 hours ago

How much vram is needed to full fine-tuning?