javsezlol1 / Stylez

117 stars 8 forks source link

AttributeError: 'Namespace' object has no attribute 'styles_file' #23

Open Moxie1776 opened 3 months ago

Moxie1776 commented 3 months ago

System Details Report


Report details

Hardware Information:

Software Information:

07:16:22-326884 ERROR Module load: extensions/Stylez/scripts/Stylez.py: AttributeError
╭──────────────────────────────── Traceback (most recent call last) ─────────────────────────────────╮ │ /home/jeff/code/automatic/modules/script_loading.py:29 in load_module │ │ │ │ 28 │ │ │ │ with contextlib.redirect_stdout(io.StringIO()) as stdout: │ │ ❱ 29 │ │ │ │ │ module_spec.loader.exec_module(module) │ │ 30 │ │ │ setup_logging() # reset since scripts can hijaack logging │ │ in exec_module:995 │ │ in _call_with_frames_removed:488 │ │ │ │ /home/jeff/code/automatic/extensions/Stylez/scripts/Stylez.py:145 in │ │ │ │ 144 if autoconvert: │ │ ❱ 145 │ styles_files = shared.cmd_opts.styles_file if isinstance(shared.cmd_opts.styles_file, li │ │ 146 │ for styles_file_path in styles_files: │ ╰────────────────────────────────────────────────────────────────────────────────────────────────────╯ AttributeError: 'Namespace' object has no attribute 'styles_file'

javsezlol1 commented 4 weeks ago

Sorry for auper late reply been busy with life. It looks like shared opts doesnt have the styles file option in cmd_opts

Im not sure why this is.

I will add some code to just skip this section of code if its not there.

javsezlol1 commented 2 weeks ago

hey if you go to your automatic1111 folder > extensions > stylez > scripts > config.json and set the autoconvert to false and save you should be able to bypass this error