mirror of
https://github.com/willmiao/ComfyUI-Lora-Manager.git
synced 2026-03-25 15:15:44 -03:00
refactor(downloader): update download_to_memory calls to include response headers
This commit is contained in:
@@ -94,7 +94,7 @@ class CivitaiClient:
|
|||||||
async def download_preview_image(self, image_url: str, save_path: str):
|
async def download_preview_image(self, image_url: str, save_path: str):
|
||||||
try:
|
try:
|
||||||
downloader = await get_downloader()
|
downloader = await get_downloader()
|
||||||
success, content = await downloader.download_to_memory(
|
success, content, headers = await downloader.download_to_memory(
|
||||||
image_url,
|
image_url,
|
||||||
use_auth=False # Preview images don't need auth
|
use_auth=False # Preview images don't need auth
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -463,7 +463,7 @@ class DownloadManager:
|
|||||||
|
|
||||||
# Download the original image to temp path using downloader
|
# Download the original image to temp path using downloader
|
||||||
downloader = await get_downloader()
|
downloader = await get_downloader()
|
||||||
success, content = await downloader.download_to_memory(
|
success, content, headers = await downloader.download_to_memory(
|
||||||
images[0]['url'],
|
images[0]['url'],
|
||||||
use_auth=False
|
use_auth=False
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ class ModelRouteUtils:
|
|||||||
else:
|
else:
|
||||||
# For images, download and then optimize to WebP using downloader
|
# For images, download and then optimize to WebP using downloader
|
||||||
downloader = await get_downloader()
|
downloader = await get_downloader()
|
||||||
success, content = await downloader.download_to_memory(
|
success, content, headers = await downloader.download_to_memory(
|
||||||
first_preview['url'],
|
first_preview['url'],
|
||||||
use_auth=False
|
use_auth=False
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user