zixaphir / Stable-Diffusion-Webui-Civitai-Helper

Stable Diffusion Webui Extension for Civitai, to manage your model much more easily.
175 stars 24 forks source link

Can't download LORAs #112

Open diffussy69 opened 2 weeks ago

diffussy69 commented 2 weeks ago

Get this following error trying to run single or batch downloads for LORAs:

CHv1.8.10: Getting model info for: 352581 CHv1.8.10: Request model info from civitai: 352581 CHv1.8.10: Get subfolder for: C:\ComfyUI_windows_portable\ComfyUI\models\loras CHv1.8.10: Searching local model by version id CHv1.8.10: folder: C:\ComfyUI_windows_portable\ComfyUI\models\loras\ CHv1.8.10: model_ids: {'model': 352581, 'version': 569015} CHv1.8.10: Start downloading from: https://civitai.com/api/download/models/569015 CHv1.8.10: Target file path: C:\ComfyUI_windows_portable\ComfyUI\models\loras\sp1tXLP.safetensors Traceback (most recent call last): File "C:\ForgeSD\system\python\lib\site-packages\gradio\routes.py", line 488, in run_predict output = await app.get_blocks().process_api( File "C:\ForgeSD\system\python\lib\site-packages\gradio\blocks.py", line 1431, in process_api result = await self.call_function( File "C:\ForgeSD\system\python\lib\site-packages\gradio\blocks.py", line 1117, in call_function prediction = await utils.async_iteration(iterator) File "C:\ForgeSD\system\python\lib\site-packages\gradio\utils.py", line 350, in async_iteration return await iterator.anext() File "C:\ForgeSD\system\python\lib\site-packages\gradio\utils.py", line 343, in anext return await anyio.to_thread.run_sync( File "C:\ForgeSD\system\python\lib\site-packages\anyio\to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "C:\ForgeSD\system\python\lib\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "C:\ForgeSD\system\python\lib\site-packages\anyio_backends_asyncio.py", line 807, in run result = context.run(func, args) File "C:\ForgeSD\system\python\lib\site-packages\gradio\utils.py", line 326, in run_sync_iterator_async return next(iterator) File "C:\ForgeSD\system\python\lib\site-packages\gradio\utils.py", line 695, in gen_wrapper yield from f(args, **kwargs) File "C:\ForgeSD\webui\extensions\Stable-Diffusion-Webui-Civitai-Helper\ch_lib\model_action_civitai.py", line 823, in dl_model_by_input for result in download_files(filename, folder, ver_info, headers, filetypes, dl_all, duplicate): File "C:\ForgeSD\webui\extensions\Stable-Diffusion-Webui-Civitai-Helper\ch_lib\model_action_civitai.py", line 656, in download_files for result in downloader.dl_file( File "C:\ForgeSD\webui\extensions\Stable-Diffusion-Webui-Civitai-Helper\ch_lib\downloader.py", line 360, in dl_file total_size = int(response.headers['Content-Length']) File "C:\ForgeSD\system\python\lib\site-packages\requests\structures.py", line 52, in getitem return self._store[key.lower()][1] KeyError: 'content-length'

Seems to be working for checkpoints.

GoldVinyl commented 1 week ago

Try adding a CivitAI API key from your CivitAI account to the settings for the CivitAI helper and see if that fixes the issue. It fixed it for me.