zixaphir / Stable-Diffusion-Webui-Civitai-Helper

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

AttributeError: module 'launch' has no attribute 'git_tag' #31

Closed tranzmatt closed 8 months ago

tranzmatt commented 8 months ago

Have you read document?

Yes.

Have you checked console log window's msg?

Yes. Attached.

Describe Issue

After an update to

https://github.com/vladmandic/automatic

the extension now fails because git_tag does exists. Perhaps a try/except clause to directly invoke the git statement if it doesn't exist?

Console log's msg or screenshot for function issue

12:18:03-963256 ERROR    Module load: extensions/Stable-Diffusion-Webui-Civitai-Helper/scripts/civitai_helper.py: AttributeError                                                                            
╭───────────────────────────────────────────────────────────────────────────────── Traceback (most recent call last) ──────────────────────────────────────────────────────────────────────────────────╮
│ /home/sd/automatic-stable-diffusion-webui/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                                                                                                                                                                     │
│                                                                                                                                                                                                      │
│ /home/sd/automatic-stable-diffusion-webui/extensions/Stable-Diffusion-Webui-Civitai-Helper/scripts/civitai_helper.py:31 in <module>                            │
│                                                                                                                                                                                                      │
│    30 │   "open_url_button": False,                                                                                                                                                                  │
│ ❱  31 │   "add_trigger_words_button": util.newer_version(util.webui_version(), '1.5.0', allow_                                                                                                       │
│    32 │   "add_preview_prompt_button": False,                                                                                                                                                        │
│                                                                                                                                                                                                      │
│ /home/sd/automatic-stable-diffusion-webui/extensions/Stable-Diffusion-Webui-Civitai-Helper/scripts/ch_lib/util.py:433 in webui_version                         │
│                                                                                                                                                                                                      │
│   432 │   version = None                                                                                                                                                                             │
│ ❱ 433 │   tag = launch.git_tag()                                                                                                                                                                     │
│   434 │   match = re.match(r"v([\d.]+)", tag)                                                                                                                                                        │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
AttributeError: module 'launch' has no attribute 'git_tag'