Confuzu / CivitAI-Model-grabber

The Script Downloads in bulk both model(Lora,Lycoris,Embeding etc..) and related images, from a given CivitAI Username
GNU General Public License v3.0
18 stars 4 forks source link

Problem and suggestion #9

Closed LeonWGal closed 2 months ago

LeonWGal commented 2 months ago

Hi. Thank you so much for your work.

Problem. Some models do not want to download the program at all, as well as continue. Traceback (most recent call last): File "S:\Lora\civitAI_Model_downloader.py", line 264, in <module> | 0.00/9.58M [00:00<?, ?B/s] process_username(username) | 0.00/9.56M [00:00<?, ?B/s] File "S:\Lora\civitAI_Model_downloader.py", line 242, in process_username result = future.result() File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\_base.py", line 458, in result return self.__get_result() File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\_base.py", line 403, in __get_result raise self._exception File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\concurrent\futures\thread.py", line 58, in run result = self.fn(*self.args, **self.kwargs) File "S:\Lora\civitAI_Model_downloader.py", line 137, in download_model_files download_file_or_image(file_url, file_path) File "S:\Lora\civitAI_Model_downloader.py", line 78, in download_file_or_image with open(output_path, "wb") as file: FileNotFoundError: [Errno 2] No such file or directory: 'model_downloads\\LUUNA\\TheSabu Style LoRA \\TheSabu-Style-A2.safetensors'

Suggestion. Is it possible to limit downloads on category. For example, I download only lora, but checkpoint is also downloaded, which I do not need and which must be manually deleted.

Worldgate commented 2 months ago

I believe some of the missing model downloads is because the name of the model and the filename share the same name and so it truncakes it, usually making the file shorter and sometimes removing the name entirely. I have a lot of files named .safetensors

Confuzu commented 2 months ago

fixed the bug where the files have no names only .file extension Also added a new Feature to download only the category that you want