You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If it helps someone else, I've made a quick correction to the python script so it works in most cases (it takes the second image).
It's dirty, there are better ways to do it but I don't use python and I don't know the civitai framework, so it will do until someone more knowledgeable saves the day.
A minor annoyance is that the api returns inaccurate urls for images - everything is .jpeg. The type property check is the correct approach (except for animated gif, not sure what it does there), would only check the whole list instead of just the second element, multiple animations happen. A list comprehension will do that neatly.
# Remove this line: if (len(images) == 0): continue
image_urls = [image['url'] for image in images if image['type'] == "image"]
if len(image_urls) == 0: continue
image_url = image_urls[0]
# Etc.
When the first preview image set by the model author is an animation, the extension fails to download a preview image.
What it should do: download the first preview image that is not an animation.
Example Lora where this happens: https://civitai.com/models/214538
For most of my Lora/Checkpoints it works as intended.
Many thanks for this extension as it makes browsing large local model stores a lot easier :)
-- update 10.59
Let me rephrase that, the extension downloads the mp4 but renames it to .png, which can't be displayed by gradio.
It should still download the first available png :)
The text was updated successfully, but these errors were encountered: