thomasasfk / sd-webui-aspect-ratio-helper

Simple extension to easily maintain aspect ratio while changing dimensions. Install via the extensions tab on the AUTOMATIC1111 webui.
https://github.com/thomasasfk/sd-webui-aspect-ratio-helper.git
406 stars 66 forks source link

Seems broken #43

Closed Letiliel closed 1 year ago

Letiliel commented 1 year ago

The extension won't load. Latest commit on Auto1111

Error loading script: sd_webui_aspect_ratio_helper.py
Traceback (most recent call last):
  File "/media/ovo/Données/AI/SD/modules/scripts.py", line 256, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "/media/ovo/Données/AI/SD/modules/script_loading.py", line 11, in load_module
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 843, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/media/ovo/Données/AI/SD/extensions/sd-webui-aspect-ratio-helper/scripts/sd_webui_aspect_ratio_helper.py", line 1, in <module>
    from aspect_ratio_helper.main import AspectRatioStepScript
  File "/media/ovo/Données/AI/SD/extensions/sd-webui-aspect-ratio-helper/aspect_ratio_helper/main.py", line 6, in <module>
    import aspect_ratio_helper._settings as _settings
  File "/media/ovo/Données/AI/SD/extensions/sd-webui-aspect-ratio-helper/aspect_ratio_helper/_settings.py", line 6, in <module>
    import aspect_ratio_helper._components as _components
  File "/media/ovo/Données/AI/SD/extensions/sd-webui-aspect-ratio-helper/aspect_ratio_helper/_components.py", line 10, in <module>
    import aspect_ratio_helper._util as _util
  File "/media/ovo/Données/AI/SD/extensions/sd-webui-aspect-ratio-helper/aspect_ratio_helper/_util.py", line 6, in <module>
    def safe_opt_util(shared_opts, key, default_key_map: dict[str, object]):
TypeError: 'type' object is not subscriptable
thomasasfk commented 1 year ago

Hey - which version of python are you using? My guess is that it's < 3.10

You can check with the following, from the root of the A1111 webui:

.\venv\Scripts\python --version

I recommend using 3.10+ as that's the version mentioned on the A1111 README.md: https://github.com/AUTOMATIC1111/stable-diffusion-webui#automatic-installation-on-windows

Letiliel commented 1 year ago

Damn yes sorry, I reinstalled Auto and didn't fix the default python version used