Use browser download in missing model dialog (#1362)

* Remove custom backend download logic

* Add download hooks

* Download button

* Use browser download

* Update test
This commit is contained in:
Chenlei Hu
2024-10-29 14:07:16 -04:00
committed by GitHub
parent 1f91a88d7b
commit 8dddffe840
10 changed files with 118 additions and 293 deletions

View File

@@ -77,14 +77,6 @@ const zExecutionErrorWsMessage = zExecutionWsMessageBase.extend({
current_outputs: z.any()
})
const zDownloadModelStatus = z.object({
status: z.string(),
progress_percentage: z.number(),
message: z.string(),
download_path: z.string(),
already_existed: z.boolean()
})
export type StatusWsMessageStatus = z.infer<typeof zStatusWsMessageStatus>
export type StatusWsMessage = z.infer<typeof zStatusWsMessage>
export type ProgressWsMessage = z.infer<typeof zProgressWsMessage>
@@ -99,8 +91,6 @@ export type ExecutionInterruptedWsMessage = z.infer<
typeof zExecutionInterruptedWsMessage
>
export type ExecutionErrorWsMessage = z.infer<typeof zExecutionErrorWsMessage>
export type DownloadModelStatus = z.infer<typeof zDownloadModelStatus>
// End of ws messages
const zPromptInputItem = z.object({