Skip to content

Loras with nested folder organization not showing preview images & suggestion for .webm previews Bug Report #4

@CesarCruzUtec

Description

@CesarCruzUtec

Describe the bug
The user interface fails to display preview images for some LoRA models, even when the corresponding image files are present in the same directory as the LoRA file. This issue seems to be related to the organizational structure of the LoRA folders.

To Reproduce
Steps to reproduce the behavior:

  • Organize LoRA models in a nested folder structure, for example: models/Lora/BaseModel/Author/Model/Version/model.safetensors.
  • Place a preview image next to the model file with the same name, for instance: models/Lora/BaseModel/Author/Model/Version/model.png.
  • Navigate to the LoRA selection tab in the web UI.
  • Observe that some LoRA models do not display their preview image, showing a blank or default icon instead.

Expected behavior
The web UI should correctly identify and display the preview image for each LoRA model, regardless of the folder depth, as long as the image file is located in the same directory and shares the same filename as the LoRA model.

Screenshots
Image showing the missing preview in the UI:
Image
Image showing the file exists in the directory:
Image

Troubleshooting Steps Taken

  • Used the Rebuild thumbnails button with no success
  • Verified that the image file exists in the same directory as the LoRA model file.
  • Confirmed the image file is a standard format (e.g., .png, .jpg).

Feature Request
Some LoRA and model creators provide preview files in .webm format to showcase the model's capabilities in a short animation. The current UI does not support .webm files for previews, meaning these models will not have a visual preview. The current workaround is to manually extract a frame from the .webm file and save it as a .png, which is a tedious process, especially with a large number of models.

Describe the solution you'd like
It would be highly beneficial if the web UI could automatically handle .webm preview files. A proposed solution is for the UI to automatically extract the first frame of a .webm file (that shares the same name as the LoRA model) and use that frame as the preview image.

Describe alternatives you've considered
The only alternative at the moment is to manually use video editing software or command-line tools like FFmpeg to extract a frame from each .webm file and save it as a compatible image format. This is not ideal for managing a large collection of models.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions