Add relative file path to the progress report. (#4621)

This commit is contained in:
Robin Huang 2024-08-26 23:06:12 -07:00 committed by GitHub
parent 2ca8f6e23d
commit 70b84058c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -586,7 +586,9 @@ class PromptServer():
@routes.post("/internal/models/download") @routes.post("/internal/models/download")
async def download_handler(request): async def download_handler(request):
async def report_progress(filename: str, status: DownloadModelStatus): async def report_progress(filename: str, status: DownloadModelStatus):
await self.send_json("download_progress", status.to_dict()) payload = status.to_dict()
payload['download_path'] = filename
await self.send_json("download_progress", payload)
data = await request.json() data = await request.json()
url = data.get('url') url = data.get('url')