mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-11-12 01:33:33 +08:00
fix & logging
This commit is contained in:
parent
68f8d8c568
commit
c539ee55f4
@ -88,7 +88,7 @@ async def download_model(model_download_request: Callable[[str], Awaitable[aioht
|
|||||||
return DownloadModelStatus(
|
return DownloadModelStatus(
|
||||||
DownloadStatusType.ERROR,
|
DownloadStatusType.ERROR,
|
||||||
0,
|
0,
|
||||||
"Invalid folder path, does not match the list of known directories. If you're seeing this in the downloader UI, you may need to refresh the page.",
|
f"Invalid folder path '{folder_path}', does not match the list of known directories ({get_folder_paths(model_directory)}). If you're seeing this in the downloader UI, you may need to refresh the page.",
|
||||||
False
|
False
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -98,6 +98,7 @@ async def download_model(model_download_request: Callable[[str], Awaitable[aioht
|
|||||||
return existing_file
|
return existing_file
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
logging.info(f"Downloading {model_name} from {model_url}")
|
||||||
status = DownloadModelStatus(DownloadStatusType.PENDING, 0, f"Starting download of {model_name}", False)
|
status = DownloadModelStatus(DownloadStatusType.PENDING, 0, f"Starting download of {model_name}", False)
|
||||||
await progress_callback(model_name, status)
|
await progress_callback(model_name, status)
|
||||||
|
|
||||||
|
|||||||
@ -696,7 +696,7 @@ class PromptServer():
|
|||||||
logging.error("Client session is not initialized")
|
logging.error("Client session is not initialized")
|
||||||
return web.Response(status=500)
|
return web.Response(status=500)
|
||||||
|
|
||||||
task = asyncio.create_task(download_model(lambda url: session.get(url), model_filename, url, model_directory, report_progress, progress_interval, folder_path))
|
task = asyncio.create_task(download_model(lambda url: session.get(url), model_filename, url, model_directory, folder_path, report_progress, progress_interval))
|
||||||
await task
|
await task
|
||||||
|
|
||||||
return web.json_response(task.result().to_dict())
|
return web.json_response(task.result().to_dict())
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user