I fine-tuned a Stable Diffusion Model with Dreambooth in Colab. Now the new Model with the weights is located here
/content/my_model/facial-sketch/800
I also got the .ckpt
file. How can I now push this model to my the HuggingFace Hub. I tried with the method push_to_hub("Path")
, but it didn't work. Also couldn't I use the argument --push_to_hub
during the training.
Are they any solution to push trough the path?
Asked
Active
Viewed 28 times
0

lil_beginner_11
- 3
- 3
1 Answers
0
You can use HuggingFace's Hub Python Library
First install it and login:
pip install -U huggingface_hub
huggingface-cli login
Assuming that the .ckpt
file is at /content/my_model/facial-sketch/800.ckpt
Run the following in a new cell:
from huggingface_hub import HfApi
api = HfApi()
api.upload_file(
path_or_fileobj="/content/my_model/facial-sketch/800.ckpt",
path_in_repo="model.ckpt",
repo_id="username/mymodel",
repo_type="model",
)
You can create a model at hf.co/models with your account. Then, change username/mymodel
for the path of your model. (ex.: https://huggingface.co/johndoe/yogurt
would be johndoe/yogurt
)

shalder
- 1
- 1