Skip to content

Download manager tab #264

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

Closed
Zombie-Dude opened this issue Sep 15, 2024 · 1 comment
Closed

Download manager tab #264

Zombie-Dude opened this issue Sep 15, 2024 · 1 comment
Labels
Bug Something isn't working

Comments

@Zombie-Dude
Copy link

Zombie-Dude commented Sep 15, 2024

Expected Behavior

When downloading a model from civitai.com with a proper link (no zip), the download can fail to finish and gets stuck. In this case i would expect to be able to "manage" the download with buttons for functions to ["download", "pause", "resume", "cancel"].

Actual Behavior

When downloading a model from civit.ai with a proper link (no zip), the download can fail to finish and get's stuck without means to resume or otherwise "manage" it. I then have to look for the .tmp file and delete it manually.

Steps to Reproduce

#1 Go to civitai.com in your browser and logon.
#2 Find a model to download and copy the correct link.
#3 Spin up SwarmUi and navigate to the Model Downloader tab.
#4 Paste the link to the model in the appropriate field and make sure it's valid.
#5 Start the download with a click on the download button.
#6 Force the download to fail by disconnecting or other means that result in failing of the download.
#7 Observe the download being stuck and unable to resume after reconnecting.

Debug Logs

Synthetic as the behavior had to be forced by disabling NIC

2024-09-15 06:01:13.751 [Warning] Failed to download the model due to internal exception: System.IO.IOException: Unable to read data from the transport connection: Eine bestehende Verbindung wurde softwaregesteuert
durch den Hostcomputer abgebrochen..
 ---> System.Net.Sockets.SocketException (10053): Eine bestehende Verbindung wurde softwaregesteuert
durch den Hostcomputer abgebrochen.
   --- End of inner exception stack trace ---
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
   at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource<System.Int32>.GetResult(Int16 token)
   at System.Net.Security.SslStream.EnsureFullTlsFrameAsync[TIOAdapter](CancellationToken cancellationToken, Int32 estimatedSize)
   at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
   at System.Net.Security.SslStream.ReadAsyncInternal[TIOAdapter](Memory`1 buffer, CancellationToken cancellationToken)
   at System.Runtime.CompilerServices.PoolingAsyncValueTaskMethodBuilder`1.StateMachineBox`1.System.Threading.Tasks.Sources.IValueTaskSource<TResult>.GetResult(Int16 token)
   at System.Net.Http.HttpConnection.ReadAsync(Memory`1 destination)
   at System.Net.Http.HttpConnection.ContentLengthReadStream.ReadAsync(Memory`1 buffer, CancellationToken cancellationToken)
   at SwarmUI.Utils.Utilities.<>c__DisplayClass47_0.<<DownloadFile>b__0>d.MoveNext() in Z:\StableSwarmUI\src\Utils\Utilities.cs:line 543
--- End of stack trace from previous location ---
   at SwarmUI.Utils.Utilities.DownloadFile(String url, String filepath, Action`3 progressUpdate, CancellationTokenSource cancel, String altUrl) in Z:\StableSwarmUI\src\Utils\Utilities.cs:line 632
   at SwarmUI.WebAPI.ModelsAPI.DoModelDownloadWS(Session session, WebSocket ws, String url, String type, String name, String metadata) in Z:\StableSwarmUI\src\WebAPI\ModelsAPI.cs:line 558

Other

No response

@Zombie-Dude Zombie-Dude added the Bug Something isn't working label Sep 15, 2024
@mcmonkey4eva
Copy link
Member

Retry button added on failed downloads

.tmp should clean themselves up already

pause/resume not reasonably possible without a major redesign of the relevant code that'd be a bit of a pain.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants