Closed sam42contact closed 8 months ago
Thanks for reporting!
I've implemented a similar method where I check if the file ends with any of the valid extensions.
extensions = ['.pt', '.ckpt', '.pth', '.safetensors', '.th', '.zip', '.vae']
for content_type_item in content_type:
folder = _api.contenttype_folder(content_type_item)
for folder_path, _, files in os.walk(folder):
for file in files:
if file.startswith(model_name) and file.endswith(tuple(extensions)):
model_file = os.path.join(folder_path, file)
In the future feel free to make a pull request with any suggested code changes instead of posting a .zip in a bug report :)
I'll go ahead and close this issue since it should be fixed.
Describe the bug.
The model_from_sent() function fails to get the model_file, then the modelID for some models. Check the patch (it should be self explanatory). civitai_file_manage.py.patch.zip
Steps to reproduce the problem.
.
Expected behavior
.
System info
.
Console logs
Additional information
No response