zixaphir / Stable-Diffusion-Webui-Civitai-Helper

Stable Diffusion Webui Extension for Civitai, to manage your model much more easily.
174 stars 24 forks source link

Please support new SD.Next version #43

Closed ChiaYen-Kan closed 7 months ago

ChiaYen-Kan commented 7 months ago

i try to install into the SD.Next new version but it can't work, please support new SD.Next version

18:20:35-333770 INFO     Extension: script='extensions-builtin\sd-webui-controlnet\scripts\hook.py' Warning: ControlNet
                         failed to load SGM - will use LDM instead.
18:20:35-569659 ERROR    Module load: extensions\Stable-Diffusion-Webui-Civitai-Helper\scripts\civitai_helper.py:
                         InvalidVersion
┌───────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────┐
│ C:\AI\automatic\modules\script_loading.py:21 in load_module                                                         │
│                                                                                                                     │
│   20 │   │   │   with contextlib.redirect_stdout(io.StringIO()) as stdout:                                          │
│ > 21 │   │   │   │   module_spec.loader.exec_module(module)                                                         │
│   22 │   │   │   setup_logging() # reset since scripts can hijaack logging                                          │
│ in exec_module:883                                                                                                  │
│ in _call_with_frames_removed:241                                                                                    │
│                                                                                                                     │
│ C:\AI\automatic\extensions\Stable-Diffusion-Webui-Civitai-Helper\scripts\civitai_helper.py:30 in <module>           │
│                                                                                                                     │
│    29 │   "open_url_button": False,                                                                                 │
│ >  30 │   "add_trigger_words_button": False,                                                                        │
│    31 │   "add_preview_prompt_button": False,                                                                       │
│                                                                                                                     │
│ C:\AI\automatic\extensions\Stable-Diffusion-Webui-Civitai-Helper\scripts\ch_lib\util.py:349 in newer_version        │
│                                                                                                                     │
│   348 │   if allow_equal:                                                                                           │
│ > 349 │   │   return parse_version(ver1) >= parse_version(ver2)                                                     │
│   350                                                                                                               │
│                                                                                                                     │
│ C:\AI\automatic\venv\lib\site-packages\packaging\version.py:54 in parse                                             │
│                                                                                                                     │
│    53 │   """                                                                                                       │
│ >  54 │   return Version(version)                                                                                   │
│    55                                                                                                               │
│                                                                                                                     │
│ C:\AI\automatic\venv\lib\site-packages\packaging\version.py:200 in __init__                                         │
│                                                                                                                     │
│   199 │   │   if not match:                                                                                         │
│ > 200 │   │   │   raise InvalidVersion(f"Invalid version: '{version}'")                                             │
│   201                                                                                                               │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
InvalidVersion: Invalid version: 'OK-16-gb5c05873'
18:20:35-655359 INFO     Extensions time: 0.92 { Lora=0.21 sd-webui-agent-scheduler=0.11 sd-webui-controlnet=0.19
                         stable-diffusion-webui-images-browser=0.12 stable-diffusion-webui-rembg=0.05
                         Stable-Diffusion-Webui-Civitai-Helper=0.14 }
18:20:35-749277 INFO     Load UI theme: name="black-teal" style=Auto base=style.css
18:20:37-689071 INFO     Local URL: http://127.0.0.1:7860/
18:20:37-689071 INFO     Initializing middleware
18:20:38-217307 INFO     [AgentScheduler] Task queue is empty
18:20:38-217307 INFO     [AgentScheduler] Registering APIs
18:20:38-339933 INFO     Startup time: 154.10 { samplers=150.48 extensions=0.92 ui-extra-networks=0.18 ui-txt2img=0.05
                         ui-img2img=0.09 ui-settings=0.09 ui-extensions=1.27 ui-defaults=0.06 launch=0.19
                         app-started=0.64 }
18:20:40-835002 INFO     MOTD: N/A
18:20:43-896223 INFO     Browser session: client=127.0.0.1 agent=Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0)
                         Gecko/20100101 Firefox/119.0
zixaphir commented 7 months ago

I'll try to have this fixed in the next version, but I'd really recommend that the author of SD.Next try to use a more standard versioning system. It was not in my expectations that anyone would use a versioning system incompatible with Python's packaging version compare functions.

ChiaYen-Kan commented 7 months ago

Hi

i do some test, if create a tag in SD.Next repository will be come error

because SD.Next update frequency is fast, before update SD.Next i always create a tag to keep the working version, in the old SD.Next is work fine

thank you

zixaphir commented 7 months ago

https://github.com/zixaphir/Stable-Diffusion-Webui-Civitai-Helper/commit/355f399cc7a68472e988103a088cdb1e9fb784ff

ChiaYen-Kan commented 6 months ago

hi @zixaphir

Is broken again after update v1.8.2

20:13:54-691230 INFO     Extension: script='extensions-builtin\sd-webui-controlnet\scripts\hook.py' Warning: ControlNet
                         failed to load SGM - will use LDM instead.
20:13:55-998270 ERROR    Module load: extensions\Stable-Diffusion-Webui-Civitai-Helper\scripts\civitai_helper.py:
                         ModuleNotFoundError
┌───────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────┐
│ C:\AI\automatic\modules\script_loading.py:21 in load_module                                                         │
│                                                                                                                     │
│   20 │   │   │   with contextlib.redirect_stdout(io.StringIO()) as stdout:                                          │
│ > 21 │   │   │   │   module_spec.loader.exec_module(module)                                                         │
│   22 │   │   │   setup_logging() # reset since scripts can hijaack logging                                          │
│ in exec_module:883                                                                                                  │
│ in _call_with_frames_removed:241                                                                                    │
│                                                                                                                     │
│ C:\AI\automatic\extensions\Stable-Diffusion-Webui-Civitai-Helper\scripts\civitai_helper.py:13 in <module>           │
│                                                                                                                     │
│    12 from modules import script_callbacks                                                                          │
│ >  13 from scripts.ch_lib import model                                                                              │
│    14 from scripts.ch_lib import js_action_civitai                                                                  │
│                                                                                                                     │
│ C:\AI\automatic\extensions\Stable-Diffusion-Webui-Civitai-Helper\scripts\ch_lib\model.py:12 in <module>             │
│                                                                                                                     │
│    11 from modules import paths_internal                                                                            │
│ >  12 from . import civitai                                                                                         │
│    13 from . import downloader                                                                                      │
│                                                                                                                     │
│ C:\AI\automatic\extensions\Stable-Diffusion-Webui-Civitai-Helper\scripts\ch_lib\civitai.py:7 in <module>            │
│                                                                                                                     │
│     6 import re                                                                                                     │
│ >   7 from . import util                                                                                            │
│     8 from . import model                                                                                           │
│                                                                                                                     │
│ C:\AI\automatic\extensions\Stable-Diffusion-Webui-Civitai-Helper\scripts\ch_lib\util.py:16 in <module>              │
│                                                                                                                     │
│    15 from modules import hashes                                                                                    │
│ >  16 import modules.cache as sha256_cache                                                                          │
│    17 import launch                                                                                                 │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
ModuleNotFoundError: No module named 'modules.cache'
20:13:56-070247 ERROR    Module load: extensions\Stable-Diffusion-Webui-Civitai-Helper\scripts\sections.py:
                         ModuleNotFoundError
┌───────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────┐
│ C:\AI\automatic\modules\script_loading.py:21 in load_module                                                         │
│                                                                                                                     │
│   20 │   │   │   with contextlib.redirect_stdout(io.StringIO()) as stdout:                                          │
│ > 21 │   │   │   │   module_spec.loader.exec_module(module)                                                         │
│   22 │   │   │   setup_logging() # reset since scripts can hijaack logging                                          │
│ in exec_module:883                                                                                                  │
│ in _call_with_frames_removed:241                                                                                    │
│                                                                                                                     │
│ C:\AI\automatic\extensions\Stable-Diffusion-Webui-Civitai-Helper\scripts\sections.py:6 in <module>                  │
│                                                                                                                     │
│     5 import gradio as gr                                                                                           │
│ >   6 from scripts.ch_lib import model                                                                              │
│     7 from scripts.ch_lib import js_action_civitai                                                                  │
│                                                                                                                     │
│ C:\AI\automatic\extensions\Stable-Diffusion-Webui-Civitai-Helper\scripts\ch_lib\model.py:12 in <module>             │
│                                                                                                                     │
│    11 from modules import paths_internal                                                                            │
│ >  12 from . import civitai                                                                                         │
│    13 from . import downloader                                                                                      │
│                                                                                                                     │
│ C:\AI\automatic\extensions\Stable-Diffusion-Webui-Civitai-Helper\scripts\ch_lib\civitai.py:7 in <module>            │
│                                                                                                                     │
│     6 import re                                                                                                     │
│ >   7 from . import util                                                                                            │
│     8 from . import model                                                                                           │
│                                                                                                                     │
│ C:\AI\automatic\extensions\Stable-Diffusion-Webui-Civitai-Helper\scripts\ch_lib\util.py:16 in <module>              │
│                                                                                                                     │
│    15 from modules import hashes                                                                                    │
│ >  16 import modules.cache as sha256_cache                                                                          │
│    17 import launch                                                                                                 │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
ModuleNotFoundError: No module named 'modules.cache'
20:13:56-111805 INFO     Extensions time: 4.83 { Lora=2.36 sd-extension-chainner=0.11 sd-webui-agent-scheduler=0.42
                         sd-webui-controlnet=0.47 stable-diffusion-webui-images-browser=0.14
                         stable-diffusion-webui-rembg=1.15 Stable-Diffusion-Webui-Civitai-Helper=0.13 }
20:13:56-349716 INFO     Load UI theme: name="black-teal" style=Auto base=sdnext.css
20:13:58-772408 INFO     Local URL: http://127.0.0.1:7860/
20:13:58-772408 INFO     Initializing middleware
20:13:59-003805 INFO     [AgentScheduler] Task queue is empty
20:13:59-003805 INFO     [AgentScheduler] Registering APIs
20:13:59-150945 INFO     Startup time: 18.47 { torch=3.96 gradio=1.15 diffusers=0.07 libraries=5.10 extensions=4.83
                         face-restore=0.29 upscalers=0.15 ui-extra-networks=0.17 ui-txt2img=0.06 ui-img2img=0.10
                         ui-settings=0.23 ui-extensions=1.55 ui-defaults=0.08 launch=0.22 api=0.08 app-started=0.29 }