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

Slow downloads from CivitAI #35

Open
Lalimec opened this issue Oct 22, 2024 · 3 comments
Open

Slow downloads from CivitAI #35

Lalimec opened this issue Oct 22, 2024 · 3 comments

Comments

@Lalimec
Copy link

Lalimec commented Oct 22, 2024

This is probably due to civitai api but I wanted to know if you have some idea about the issue. A basic wget downloads much faster than using this Model Manager or Workspace Manager (another custom node that offers civitai download functions) etc. I was wondering if anything can be done to increase the download speeds? I am also using an ec2 instance, not sure if that affects anything though.

@cdb-boop
Copy link
Contributor

Not sure. Could be python slowness, something to do with multithreading or a code mistake. The relevant code is here. It might be possible to have python make a wget call to the system, but it also might require OS specific code and error handling.

If you want to test if it's an issue on Civitai's end, you could try downloading a model that is also on HuggingFace, since it also should be supported.

I personally haven't noticed that big of a difference as compared to downloading in a web browser, but if you could give some timings that show a significant slowdown, then I would be willing to look into solutions.

@Lalimec
Copy link
Author

Lalimec commented Oct 23, 2024

Turns out its not just civitai. Model manager doesnt show speed so ive taken two screenshots to compare the speeds. Yes they are downloading at the same time so there is going to be a slow down obv but you get my point. I remember back in the day the dev of CIvitai Browser fixed this by using aria or sth in a1111.

image
image

Also is there a way to cancel a download that im not seeing?

@sansmoraxz
Copy link
Contributor

Check #36.

Also, if anyone has figured out proper way to do multipart downloads form civitai that may help improve this more. Namely they block HEAD requests and the size returned by API call is in floating point kB. Multiplying by 1024 may work but seems risky.

Ref article for multipart download:
https://hackernoon.com/how-to-speed-up-file-downloads-with-python

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

3 participants