Giter VIP home page Giter VIP logo

Comments (10)

akiyamasho avatar akiyamasho commented on July 29, 2024 4

@NimaBoscarino Thanks for setting up the reuploaded model repo!
I tried it on the staging Space and it worked perfectly.

As @osanseviero mentioned, I agree that it's best to keep the four models separately, so I created the four model repositories,

and updated it on the production version of the AnimeBackgroundGAN Space.

The space is running well and I made the staging environment private now.
Thanks so much!

I also added both of you to the Special Thanks section of the model repositories.
Let me know if these changes are ok and I'll close this Issue once everything looks good.

from cartoongan-pytorch.

akiyamasho avatar akiyamasho commented on July 29, 2024 2

PS: I updated the README of this repository to link to both the Space and the GitHub repository for the actual space codebase, linked with GitHub actions to auto-update on push.

from cartoongan-pytorch.

osanseviero avatar osanseviero commented on July 29, 2024 2

Super exciting! Thanks @akiyamasho! Love the space!

And thanks for adding us in the special thanks section and adding the links to the space! cc @julien-c It's also exciting you're using the GH workflow with auto-update on push! Super nice work!

Should we close this issue? 🤗

from cartoongan-pytorch.

julien-c avatar julien-c commented on July 29, 2024 2

wow this is really cool, @akiyamasho!

And thanks @NimaBoscarino @osanseviero for helping this is awesome

from cartoongan-pytorch.

NimaBoscarino avatar NimaBoscarino commented on July 29, 2024 2

Excellent, glad it's all fixed up and the new model repos look great! I'll take down my mirrored repo.

from cartoongan-pytorch.

NimaBoscarino avatar NimaBoscarino commented on July 29, 2024 1

@akiyamasho Thanks for uploading the models! Hmm, that's so strange 🤔 Even when I try to manually download the .pth file, I get an "Access Denied" error. It's possible that something went wrong with the Git LFS, so I'll pass this by the Hub team and I'll come back to you with an update soon!

from cartoongan-pytorch.

osanseviero avatar osanseviero commented on July 29, 2024 1

This is amazing, thanks @NimaBoscarino and @akiyamasho!!

By the way, we usually have one model per repository as a usual good practice with model repos. Do you think it would make sense to split this into 4, with each of the models in a different repo?

See how JoJoGan repo loads different models from different repos https://huggingface.co/spaces/akhaliq/JoJoGAN/blob/main/app.py#L122

from cartoongan-pytorch.

akiyamasho avatar akiyamasho commented on July 29, 2024

@osanseviero Thanks for the examples!
I was able to add the pre-trained model files to a public model page successfully:
https://huggingface.co/akiyamasho/AnimeBackgroundGAN

After that, I tried loading it into the Space:
https://huggingface.co/spaces/akiyamasho/AnimeBackgroundGAN_staging/blob/main/app.py#L35-L45

However, whenever I download it in the actual space, it always gives back a 403 error:

Traceback (most recent call last):
  File "app.py", line 42, in <module>
    shinkai_model_hfhub = hf_hub_download(repo_id=MODEL_REPO_ID, filename=MODEL_FILE_SHINKAI)
  File "/home/user/.local/lib/python3.8/site-packages/huggingface_hub/file_download.py", line 533, in hf_hub_download
    return cached_download(
  File "/home/user/.local/lib/python3.8/site-packages/huggingface_hub/file_download.py", line 467, in cached_download
    http_get(
  File "/home/user/.local/lib/python3.8/site-packages/huggingface_hub/file_download.py", line 274, in http_get
    r.raise_for_status()
  File "/home/user/.local/lib/python3.8/site-packages/requests/models.py", line 960, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://cdn-lfs.huggingface.co/repos/3b/28/3b282ada5ebaf8d74c671df28dcdca7f42ae6b587975e7bdea19b7ea2e1c5beb/c3547f611e780e79aebde7f7bc2b6c278555d701620f125583d666351044c486

Tried the following but to no avail (same error message):

  1. Put my HF access token as a secret in the space and use it in the use_auth_token parameter
  2. Try hardcoding the repo_id and filename (with and without the

I reverted the original Space and setup this staging Space for now.
I'll be back to debug this at another time, but if you have any ideas on what might have happened, I'd love to hear them out.

from cartoongan-pytorch.

NimaBoscarino avatar NimaBoscarino commented on July 29, 2024

So according to the Hub team it's possible that something went wrong when uploading the LFS files! Amon the things that could cause that, running git push --no-verify for example bypasses LFS files upload, leading to the error you're seeing.

One "simple" way to try to fix that is to try to push to a new repo. Another a bit more "advanced" would be to create a branch on a previous commit, force-push it on main on origin, checkout the local main branch again, and push again (I haven't tested this, but it should work).

For us though, I reuploaded your models here (https://huggingface.co/NimaBoscarino/AnimeBackgroundGAN) and I'm able to access them. If you want to delete your model from the Hub, I can transfer my model repo over to your account and we can restart the space and hopefully it should all work 😄

from cartoongan-pytorch.

akiyamasho avatar akiyamasho commented on July 29, 2024

@osanseviero Thanks as well!

Should we close this issue? 🤗

Will do 😁

from cartoongan-pytorch.

Related Issues (2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.