Safetensor files in separate subfolders are not found by the extension and cannot be updated #150
Replies: 3 comments 1 reply
-
Thanks for writing in! Unfortunately I can't seem to recreate the issue, which would be required for me to find out where the issue is, as far as I can tell, the code should detect all the files inside the LORA directory, this for example is the relevant part in any of the update model button functions: extensions = ['.pt', '.ckpt', '.pth', '.safetensors', '.th', '.zip', '.vae'] # list of valid file extensions
for folder in folders: # Iterates through each selected content type
if folder and os.path.exists(folder): # Checks if the folder exists
for root, _, files in os.walk(folder): # Walks through every folder and subfolder
for file in files: # Iterates through each file in the current directory
_, file_extension = os.path.splitext(file) # Splits the file name and extension
if file_extension.lower() in extensions: # Checks if the file extension is in the specified list of extensions
model_files.append(os.path.join(root, file)) # Adds the full path of the matching file to the list
model_files = sorted(list(set(model_files))) # sorts all the found items alphabetically I'd love to be able to fix this issue for you, but it's currently hard for me to say where the issue could be 😅 |
Beta Was this translation helpful? Give feedback.
-
I have the same problem. Update: |
Beta Was this translation helpful? Give feedback.
-
Since there have been no updates for a while and I can't seem to recreate this issue, I'll go ahead and close this post. Feel free to make a bug report if you're still experiencing this issue! :) |
Beta Was this translation helpful? Give feedback.
-
For example, let's assume that Lora is my main folder. I have 4 subfolders inside Lora (alongside a handful of safetensors files in the main Lora file, independent of any sub folder):
When I open CivitAI+, only the handful of safetensor files outside of any folder, as well as everything in the Characters subfolder (which itself has dozens and dozens of subfolders based on series of origin) are displayed in the Lora list. Furthermore, when I press the Update information and tags or Update model previews feature, it will only update the files that I listed in this paragraph.
If I show all directories and only filter for another subfolder (i.e. Concepts), the extension will claim that there is no content to be found inside Concepts, even though there is. The same applies to the other three subfolders that aren't Characters.
Lastly, I noticed that if I dragged a safetensors file from Clothes, Concepts, or Styles out from its respective subfolder and out into the main Lora folder, CivitAI+ would then pick up and register that file, showing it in the list.
Could this error in Lora detection be fixed at some point?
Beta Was this translation helpful? Give feedback.
All reactions