Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to move the models to another drive? #179

Open
bulutharbeli opened this issue Jan 6, 2025 · 6 comments
Open

How to move the models to another drive? #179

bulutharbeli opened this issue Jan 6, 2025 · 6 comments

Comments

@bulutharbeli
Copy link

It's automatically downloading huge model files into C:\Users\user_name.cache\huggingface\hub
However, I am using an external drive and already installed Omni on an external drive.
How do I move downloaded models into an external drive?

I guess I must revise the model.py file but not sure about that.
Some help will be appreciated. Thnx

@staoxiao
Copy link
Contributor

staoxiao commented Jan 6, 2025

You can replace the Shitao/OmniGen-v1 with the path you have downloaded the model:

# pipe = OmniGenPipeline.from_pretrained("Shitao/OmniGen-v1") 
pipe = OmniGenPipeline.from_pretrained("your_local_path") 

You can also change the default path to download model:

import os
os.environ['HF_HUB_CACHE'] = "another_path"

@bulutharbeli
Copy link
Author

You can replace the Shitao/OmniGen-v1 with the path you have downloaded the model:

# pipe = OmniGenPipeline.from_pretrained("Shitao/OmniGen-v1") 
pipe = OmniGenPipeline.from_pretrained("your_local_path") 

You can also change the default path to download model:

import os
os.environ['HF_HUB_CACHE'] = "another_path"

Thanks for your quick response. Could you explain a little bit more? I'm not familiar with Python. Where to put the code exactly and where is the exact location of the "Shitao/OmniGen-v1"? Thank you.

@staoxiao
Copy link
Contributor

staoxiao commented Jan 7, 2025

@bulutharbeli , How did you run OmniGen? python app.py or run it in Jupyter?

@bulutharbeli
Copy link
Author

@bulutharbeli , How did you run OmniGen? python app.py or run it in Jupyter?

python app.py

@staoxiao
Copy link
Contributor

staoxiao commented Jan 7, 2025

@bulutharbeli
Copy link
Author

bulutharbeli commented Jan 8, 2025

You can change the path in https://github.com/VectorSpaceLab/OmniGen/blob/main/app.py#L12 or add the default path in https://github.com/VectorSpaceLab/OmniGen/blob/main/app.py#L3

now i am getting this error
`I:\OmniGen>python app.py
Traceback (most recent call last):
File "I:\OmniGen\app.py", line 6, in
import spaces
ModuleNotFoundError: No module named 'spaces'

I:\OmniGen>`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants