civitai / sd_civitai_extension

All of the Civitai models inside Automatic 1111 Stable Diffusion Web UI
MIT License
2.33k stars 443 forks source link

Loras don't reload or download preview images and info after downloading them via CivitAI Link #121

Open jiveabillion opened 1 year ago

jiveabillion commented 1 year ago

the code has a TODO in it where it might refresh the list saying you're not sure how to import it. Here's the code you need. from modules.ui_extra_networks import extra_pages page = next(iter([x for x in extra_pages if x.name == "lora"]), None) page.refresh() I have already got it working locally. I also hacked loading the preview and info in there too, probably in a bad way since I don't know how to properly circumvent a the circular import to get to the preview and info modules from the civitai.lib module. I am new to python. The above code works for Lora and LyCoris though