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

Model Downloader enhancements #44

Closed
Taruvi opened this issue Jul 3, 2024 · 2 comments
Closed

Model Downloader enhancements #44

Taruvi opened this issue Jul 3, 2024 · 2 comments
Labels
Feature New feature or request

Comments

@Taruvi
Copy link

Taruvi commented Jul 3, 2024

Feature Idea

Sometimes when downloading through Utilities -> Model Downloader, the speed will be at a crawl. Due to their size, when downloading a checkpoint this can mean it takes a very long time. I have a gigabit connection so I'm used to checkpoints arriving in around three minutes or less. When this crawl pace effect happens it can take literally hours to complete. In fact, when this happens I now restart the container (I use a Docker version) and, after trying the download again, it often comes through at a much more reasonable speed.

In Model Downloader, there is a 'Download' button and that's it.

  1. So, part one of my feature requests is to add a cancel button to the model downloader.

If it's at all possible, maybe even a Retry/Resume button as well. This could check for 'ModelName.download.tmp' and resume the download, or overwrite if resume not possible.

I'm a convert from A1111 and I've been massively spoilt by CivitAi Browser+

One of the things that makes that extension such a joy is that it uses Aria2 for downloading which uses multiple threads at once. Every time I've used CivitAi Browser+ my bandwidth has been maxed out every time so Aria2 does work well with CivitAI. There's a whole Issue where Aria2 is discussed in depth.

  1. So a secondary feature request is to add Aria2 to the model downloader.

  2. Thirdly, this might be asking a lot but basically, I'd like to see CivitAI Browser+ integrated into SwarmUI in some capacity. Its model management features are something I sorely miss.

Other

No response

@Taruvi Taruvi added the Feature New feature or request label Jul 3, 2024
mcmonkey4eva added a commit that referenced this issue Jul 4, 2024
mcmonkey4eva added a commit that referenced this issue Jul 4, 2024
mcmonkey4eva added a commit that referenced this issue Jul 4, 2024
mcmonkey4eva added a commit that referenced this issue Jul 4, 2024
mcmonkey4eva added a commit that referenced this issue Jul 4, 2024
mcmonkey4eva added a commit that referenced this issue Jul 4, 2024
@mcmonkey4eva
Copy link
Member

I've revamped the downloader:

  • Tracks download speed and displays it
  • Multithreaded internals for the downloader to hopefully avoid bottlenecking. Still limited to whatever the remote link speed is. I noticed civitai's cloudflare provides some models faster than others. Not sure what's up with that.
  • General code cleanup/opti again to avoid any bottlenecks at least on my end of code (it's backed by C# Http standard lib, not sure if there's any weird secret issues hiding in there that would be an issue for high-speed networks, but it saturated my own 40 MiB/sec speed at least, for some models). (I'd rather not integrate a whole external C++ engine thing just for this unless it's actually needed)
  • Added the ability to have multiple downloads going at once
  • Added the ability to cancel downloads
  • I'd like to see CivitAI Browser+ integrated into SwarmUI in some capacity. Its model management features are something I sorely miss. not going to try to copy/paste straight out of some other tool. Swarm has pretty nice model management already - feel free to feature request specific things you want for it.

@Taruvi
Copy link
Author

Taruvi commented Jul 4, 2024

Well, that was fast!

I tested, first by downloading that link I gave you here that isn't a proper link to a file. That worked perfect.

While it was downloading, I went to Civit and grabbed something random. It's nice to have multiple in the queue. Before I'd have to keep checking until the first one was finished and do the next, etc. etc...

I monitored the speeds. A single model does, indeed, seem to cap out at around 45MB/s. Adding a second bumps the speed to double. When the first finished, then speed dropped again. You can see in the graph below. So it seems as though each single download will cap but you can keep adding more to saturate bandwidth.

Stats

Nice! Thanks.

Features in CivitAI Browser+ are 'nice to have' quality of life things more than anything so that's fair enough.

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

No branches or pull requests

2 participants