VectorSpaceLab / OmniGen

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

Extremely slow while loading OmniGen #72

Open zc1023 opened 3 weeks ago

zc1023 commented 3 weeks ago

Hi, there. I noticed that you have optimized the speed of the diffusion process. However, it takes me about 3 mins to load OmniGen. Compared to the diffusion process, this part is more unbearable for me. I am not sure if this is a problem. Does anyone feel like the loading time is too long like me?

staoxiao commented 3 weeks ago

The model only needs to be loaded once and doesn't require repeated loading. This might be related to model initialization, delete this line might help: https://github.com/VectorSpaceLab/OmniGen/blob/main/OmniGen/model.py#L184 I will try to resolve it later.

ayttop commented 3 weeks ago

yes

zc1023 commented 3 weeks ago

The model only needs to be loaded once and doesn't require repeated loading. This might be related to model initialization, delete this line might help: https://github.com/VectorSpaceLab/OmniGen/blob/main/OmniGen/model.py#L184 I will try to resolve it later.

Doesn't work! 😢

junkyuim commented 2 weeks ago

The model only needs to be loaded once and doesn't require repeated loading. This might be related to model initialization, delete this line might help: https://github.com/VectorSpaceLab/OmniGen/blob/main/OmniGen/model.py#L184 I will try to resolve it later.

I found it's very slow when it initializes phi-3 weights. Is there any way to make faster?