Now, we finally have a Civitai SD webui extension!!
Update:
v1.10.2 is on github, which support SD webui v1.8.x.
Some models request login to civitai to download. So you need to set a civitai API Key on Civitai, then fill that API Key into this extension's setting page. Check document on github (Civitai API Key Section) for detail.
Civitai Helper
Stable Diffusion Webui Extension for Civitai, to help you handle models much more easily.
The official SD extension for civitai takes months for developing and still has no good output. So, I developed this Unofficial one.
Github project:
https://github.com/butaixianran/Stable-Diffusion-Webui-Civitai-Helper
(Github page has better document)
Feature
Scan all models to download model information and preview images from Civitai.
Link local model to a civitai model by a civitai url
Download a model(with info+preview) by Civitai Url into SD's model folder or subfolder.
Downloading can resume at break-point.
Checking all your local model's new version from Civitai
Download a new version directly into SD model folder (with info+preview)
Modified Built-in "Extra Network" cards, to add the following buttons on each card:
🌐: Open this model's Civitai url in a new tab
💡: Add this model's trigger words to prompt
🏷: Use this model's preview image's prompt
Install
Everytime you install or update this extension, you need to shutdown SD Webui and Relaunch it. Just "Reload UI" won't work.
How to use
First of all, Update Your SD Webui to latest version!
This extension need to get extra network's cards id. Which is added since 2023-02-06. If your SD webui is an earlier version, you need to update it!
After install, Go to extension tab "Civitai Helper". There is a button called "Scan Model".
Click it, extension will scan all your models to generate SHA256 hash, and use this hash, to get model information and preview images from civitai.
After scanning finished,
Go to SD webui's build-in "Extra Network" tab, and click "Refresh Civitai Helper" button, to show all addtional buttons.
Everytime extra network tab refreshed, it will remove all additional buttons of this extension. You need to click Refresh Civitai Helper button to bring them back.
Move your mouse on to the Top of a model card. It will show 3 additional icon buttons:
🌐: Open this model's Civitai url in a new tab
💡: Add this model's trigger words to prompt
🏷: Use this model's preview image's prompt
Description
v1.5.6
update error msg when can not connect to civitai API service
update thumb mode for SD webui new version's metadata button
v1.5.5
update SHA256 function, now it just use the code from pip
FAQ
Comments (30)
感谢您的工作,来自美国。你是这个社区的英雄,你的奉献和热情是显而易见的。祝你成功和幸福。
点了这四个小图标没有反应 控制台显示:Load model info of /breastinclassBetter_v141.safetensors in lora
你点的没反应的这个模型,有从civitai取到模型信息吗?模型信息文件是空的吗?
@butaixianran 执行了但提示找不到模型信息文件,无法获取 lora
那就是模型信息是空的,civitai没有这个模型的话,你本地没有模型信息,那自然就点按钮没有反应。
关于为什么在civitai上找不到这个模型,阅读文档的 SHA256部分。
谢谢,已解决 但发生一个新的问题 获取封面按键没反应 其他三个有反应
控制器提示:There is no image in gallery to save as a preview.
那不是获取封面按钮,那是把当前生成的图片保存为预览图。是SD webui自带的功能。
@butaixianran 谢谢 我看图标换了 就把他理解成获取封面了
You are a hero!
Great idea. Thanks!
hello dalao,
I am at latest version, why is there logs like "Civitai Link: Presence update: SD: xxx, Clients: x" repeatly print in the backend termainal?
You are not even using this extension.
this extension's name is Civitai Helper, not Civitai Link.
There is no such log in this extension
webui - settings - Civitai - uncheck 'Show Civitai Link events in the console'
Can you help me with the error? it shouldn't be from the extension, but idk what to do :(
Every time I try to run SD in colab, i get this:
reading lora /content/gdrive/MyDrive/sd/stable-diffusion-webui/models/Lora/yamamuraSadakoTheRing_v3.safetensors: OSError Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions-builtin/Lora/lora.py", line 53, in init File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_models.py", line 216, in read_metadata_from_safetensors OSError: [Errno 107] Transport endpoint is not connected: '/content/gdrive/MyDrive/sd/stable-diffusion-webui/models/Lora/yamamuraSadakoTheRing_v3.safetensors' reading lora /content/gdrive/MyDrive/sd/stable-diffusion-webui/models/Lora/youreUNDERARRESTLoha_v10.safetensors: OSError Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions-builtin/Lora/lora.py", line 53, in init File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/sd_models.py", line 216, in read_metadata_from_safetensors OSError: [Errno 107] Transport endpoint is not connected: '/content/gdrive/MyDrive/sd/stable-diffusion-webui/models/Lora/youreUNDERARRESTLoha_v10.safetensors' Error loading script: lora_script.py Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/scripts.py", line 248, in load_scripts File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/script_loading.py", line 11, in load_module File "<frozen importlib._bootstrap_external>", line 850, in exec_module File "<frozen importlib._bootstrap>", line 228, in callwith_frames_removed File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions-builtin/Lora/scripts/lora_script.py", line 5, in <module> File "<frozen importlib._bootstrap>", line 1007, in findand_load File "<frozen importlib._bootstrap>", line 982, in findand_load_unlocked File "<frozen importlib._bootstrap>", line 925, in findspec File "<frozen importlib._bootstrap_external>", line 1423, in find_spec File "<frozen importlib._bootstrap_external>", line 1395, in getspec File "<frozen importlib._bootstrap_external>", line 1526, in find_spec File "<frozen importlib._bootstrap_external>", line 1569, in fillcache OSError: [Errno 107] Transport endpoint is not connected: '/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions-builtin/Lora' Error loading script: scunet_model.py Traceback (most recent call last): File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/scripts.py", line 248, in load_scripts File "/content/gdrive/MyDrive/sd/stable-diffusion-webui/modules/script_loading.py", line 11, in load_module File "<frozen importlib._bootstrap_external>", line 846, in exec_module File "<frozen importlib._bootstrap_external>", line 982, in get_code File "<frozen importlib._bootstrap_external>", line 1039, in get_data OSError: [Errno 107] Transport endpoint is not connected: '/content/gdrive/MyDrive/sd/stable-diffusion-webui/extensions-builtin/ScuNET/scripts/scunet_model.py'
The list of errors like this goes on after this.
But, if I remove the Lora folder before running SD, I dont get the error. But I can't use my Loras then.
Any help is appreciated, thanks.
hi, this is a corlab error, there is nothing to do with this extension. Search "Transport endpoint is not connected corlab" in Google to learn it.
I can only support this extension, I have no time to teach people how to use corlab, learn it from Google.
@butaixianran I tried a few things and i think i figured out the problem:
Automatic ui has trouble loading many loras at once. i have 200 loras and their related files, when i only move half of them first, and the rest after loading, I don't have issues. Might get fixed soon i guess.
大佬求助,之前用的好好的(只有扫描功能时),今天更新了新版civitaihelper后四个按钮就不显示了
重启sdweb ui了吗,不光是reloadui。
sd webui 升级到最新版了吗。
如果使用了双语汉化插件,换成普通汉化插件。
@butaixianran 请问普通汉化插件指的是哪种,换了好几个都不显示这个4个按钮了
@92811jason865 如果关掉汉化插件还不显示,那就是你的SD webui太旧了,要升级。
如果你是昨天才升级的SD webui那就是SD webui界面突然大幅更新导致的。需要去github升级本插件的最新版v1.6
大佬,c站被墙了 你的插件也用不了了怎么办
我也是
挂全局代理
@butaixianran 挂了全局代理也不行😭
@242424 挂了代理就一定能正常。今天的话,是因为civitai网站挂了。它挂一次8小时,差不多2~3周挂一次。网站恢复了再试。
已支持代理,在github查看新版。用法看文档。
This could be integrated with Dynamic Prompts.
https://github.com/adieyal/sd-dynamic-prompts
Scan lora to create wildcard files based on tags.
Example: all lora with "character" tag would be put in a character.txt file alphabetically like
<A_character:1>, A_char_trigger
<B_character:1>, B_char_trigger
Then they could be used with the '__character__' wildcard. Same for '__style__'
The main issue I see is that tagging on civitai isn't good and relies on the author to tag accurately. If civitai implemented tag weights/voting it would be better.
今天stable diffusion更新了,你的插件也重新安装了最新版本,现在lora旁边的 插件按钮也消失了,但是页面最上方的助手选项有的,就是4个按钮消失了,希望大神更新下
更新最新版v1.6
我扫描不了本地文件了,用了梯子也没用。。。一直time out,请问怎么解决
