main
butaixianran 2026-04-17 05:02:41 +08:00
parent bcbb4b72a7
commit fd89f81363
8 changed files with 22 additions and 47 deletions

View File

@ -1,7 +1,3 @@
## 关于Civitai Helper2: Model Info Helper
近况请参考:[about_version2](about_version2.md)
# Civitai Helper
Stable Diffusion Webui 扩展Civitai助手用于更轻松的管理和使用Civitai模型。

View File

@ -3,9 +3,6 @@
[English](README.md)
[한국어(ChatGPT)](README.kr.md)
## About Civitai Helper2: Model Info Helper
Civitai Helper 2は、**ModelInfo Helper**に改名されます。現在開発中です。デモをご覧ください:
[YouTube](https://youtu.be/mPcKwQDDH8s)
# お知らせ
**この拡張機能は現在、非常に安定しています。もし問題があれば、コンソールログの詳細を確認し、[よくある質問](#よくある質問)を確認してください。**

View File

@ -3,9 +3,6 @@
[日本語](README.jp.md)
[한국어(ChatGPT)](README.kr.md)
## About Civitai Helper2: Model Info Helper
check here for Civitai Helper 2's update:
[about_version2](about_version2.md)
# Notice
**This extension request latest SD webui v1.6.x, update it before using this extension. And also re-lanuch SD webui after installing(not just reload UI). If you have an issue, check console log window's detail and read [common issue](#common-issue) part**
@ -245,6 +242,9 @@ Since v1.5.5, we've already optimized the SHA256 function to the top. So the onl
# Change Log
## v1.12.0
* Add "Civitai Domain" to Options on Setting page, since now civitai has 2 domains: `.com` and `.red`. `.red` is for nsfw things.
## v1.11.2
* Add "install.py" to install package "pysocks" for using socks for proxy.

View File

@ -1,30 +0,0 @@
## About Civitai Helper2: Model Info Helper
The first version of "Civitai Helper2" is already finished and I have used it for a while on my local machine. It works exactly as in the demo video I have released before(with some more functions).
[https://www.youtube.com/watch?v=mPcKwQDDH8s](https://www.youtube.com/watch?v=mPcKwQDDH8s)
But the developing process is extremely painful. Its maintenance will also be difficult. If I release it, with all those requests and issues from users, my life gonna be in hell.
The reason for this is, gradio is not suitable for a professional level's management system. But under gradio's framework and SD webui's design, a lot of javascript things won't work well.
So, it is too painful that I don't want to do any further maintenance and development on it. In the meantime, a lot of alternatives become popular. For example, ComfyUI and InvokeAI 3.x.
Especially InvokeAI 3.x, with its Unified Canvas and build-in node system, now we have a photoshop level's SD tool for free.
If you are not familiar with InvokeAI 3.x, you can check this video:
[https://www.youtube.com/watch?v=1Iz4F7o6hgQ](https://www.youtube.com/watch?v=1Iz4F7o6hgQ)
And its unified canvas system:
[https://www.youtube.com/watch?v=aU0jGZpDIVc](https://www.youtube.com/watch?v=aU0jGZpDIVc)
So, for Model Info Helper, I'm re-designing it into a stand alone model and workflow management system, which should work with most popular SD UI, not just for SD webui.
And I'll take down all workflow management functions so this stand alone version can be released sooner.
Since it won't be released as estimated, I have updated the old civitai helper 1.x to work with latest SD webui.

View File

@ -12,10 +12,10 @@ from . import setting
suffix = ".civitai"
url_dict = {
"modelPage":"https://civitai.com/models/",
"modelId": "https://civitai.com/api/v1/models/",
"modelVersionId": "https://civitai.com/api/v1/model-versions/",
"hash": "https://civitai.com/api/v1/model-versions/by-hash/"
"modelPage":f"https://{util.civitai_domain}/models/",
"modelId": f"https://{util.civitai_domain}/api/v1/models/",
"modelVersionId": f"https://{util.civitai_domain}/api/v1/model-versions/",
"hash": f"https://{util.civitai_domain}/api/v1/model-versions/by-hash/"
}
model_type_dict = {

View File

@ -18,6 +18,7 @@ data = {
"general":{
"open_url_with_js": True,
"proxy": "",
"civitai_domain": "civitai.com"
},
"tool":{
}
@ -79,11 +80,15 @@ def load():
if "check_new_ver_exist_in_all_folder" not in data["model"].keys():
data["general"]["check_new_ver_exist_in_all_folder"] = False
if "civitai_domain" not in data["general"].keys():
data["general"]["civitai_domain"] = "civitai.com"
return
# save setting from parameter
def save_from_input(max_size_preview, skip_nsfw_preview, open_url_with_js, proxy, check_new_ver_exist_in_all_folder):
def save_from_input(max_size_preview, skip_nsfw_preview, open_url_with_js, proxy, check_new_ver_exist_in_all_folder, civitai_domain):
global data
data = {
"model":{
@ -94,6 +99,7 @@ def save_from_input(max_size_preview, skip_nsfw_preview, open_url_with_js, proxy
"general":{
"open_url_with_js": open_url_with_js,
"proxy": proxy,
"civitai_domain": civitai_domain,
},
"tool":{
}

View File

@ -6,15 +6,15 @@ import requests
import shutil
version = "1.11.2"
version = "1.12.0"
def_headers = {'User-Agent': 'Mozilla/5.0 (iPad; CPU OS 12_2 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/15E148',
"Authorization": ""}
proxies = None
civitai_api_key = ""
civitai_domain = "civitai.com"
# print for debugging

View File

@ -46,6 +46,7 @@ def on_ui_settings():
shared.opts.add_option("ch_check_new_ver_exist_in_all_folder", shared.OptionInfo(True, "When checking new model version, check new version existing in all model folders", gr.Checkbox, {"interactive": True}, section=ch_section))
shared.opts.add_option("ch_proxy", shared.OptionInfo("", "Civitai Helper Proxy", gr.Textbox, {"interactive": True, "lines":1, "info":"format: socks5h://127.0.0.1:port"}, section=ch_section))
shared.opts.add_option("ch_civiai_api_key", shared.OptionInfo("", "Civitai API Key", gr.Textbox, {"interactive": True, "lines":1, "info":"check doc:https://github.com/zixaphir/Stable-Diffusion-Webui-Civitai-Helper/tree/master#api-key"}, section=ch_section))
shared.opts.add_option("ch_civitai_domain", shared.OptionInfo("civitai.com", "Civitai Domain", gr.Radio, {"interactive": True, "choices": ["civitai.com", "civitai.red"]}, section=ch_section))
def on_ui_tabs():
# init
@ -72,6 +73,7 @@ def on_ui_tabs():
check_new_ver_exist_in_all_folder = shared.opts.data.get("ch_check_new_ver_exist_in_all_folder", False)
proxy = shared.opts.data.get("ch_proxy", "")
civitai_api_key = shared.opts.data.get("ch_civiai_api_key", "")
civitai_domain = shared.opts.data.get("ch_civitai_domain", "civitai.com")
util.printD("Settings:")
util.printD("max_size_preview: " + str(max_size_preview))
@ -89,6 +91,10 @@ def on_ui_tabs():
util.printD(f"use civitai api key: {has_api_key}")
# set civitai_domain
util.civitai_domain = civitai_domain
util.printD(f"civitai domain: {util.civitai_domain}")
# set proxy
if proxy:
util.proxies = {