Update download_sd-concepts-library.py

This commit is contained in:
Cyberes 2022-09-22 00:38:05 -06:00 committed by GitHub
parent 87594791e6
commit fd54ed734c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -14,7 +14,7 @@ from huggingface_hub import HfApi
import os
api = HfApi()
models_list = api.list_models(author="sd-concepts-library", sort="likes", direction=-1)
models_list = api.list_models(author="sd-concepts-library")
print('Downloading', len(models_list), 'models...')
i = 1
@ -25,3 +25,6 @@ for model_info in models_list:
os.system(f'rm -rf repositories/{model_name}/.git*') # delete all git stuff in the repository
os.system(f'mv repositories/{model_name}/learned_embeds.bin {model_name}.pt') # move the bin file out of the repository and rename it to a .pt file
i = i + 1
# Pro-tip: use this command to compress the files with 7zip max compression.
# 7z a -t7z -m0=lzma2 -mx=9 -mfb=64 -md=32m -ms=on sd-concepts-library_complete.7z sd-concepts-library/