w-e-w / sd-webui-hires-fix-tweaks

Add additional options and features to hires fix of Stable Diffusion web UI
GNU Affero General Public License v3.0
35 stars 1 forks source link

Forge compatibility #8

Open rrroddri opened 2 weeks ago

rrroddri commented 2 weeks ago

Hey, I'm thankful for your extension and i'd love to test it with Flux, is there a chance that it could be implemented in forge? I installed the repo but it gives me this error on startup

*** Error loading script: sd-webui-hires-fix-tweaks.py
    Traceback (most recent call last):
      File "G:\stable-diffusion-webui-forge\modules\scripts.py", line 525, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "G:\stable-diffusion-webui-forge\modules\script_loading.py", line 13, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "G:\stable-diffusion-webui-forge\extensions\sd-webui-hires-fix-tweaks\scripts\sd-webui-hires-fix-tweaks.py", line 2, in <module>
        from hires_fix_tweaks import ui, xyz, settings  # noqa: F401
      File "G:\stable-diffusion-webui-forge\extensions\sd-webui-hires-fix-tweaks\hires_fix_tweaks\settings.py", line 94, in <module>
        hr_prompt_mode.setup_regex()
      File "G:\stable-diffusion-webui-forge\extensions\sd-webui-hires-fix-tweaks\hires_fix_tweaks\hr_modules\hr_prompt_mode.py", line 10, in setup_regex
        if len(shared.opts.hires_fix_tweaks_marker_char) != 1 or re.match(r'[\s\w]', shared.opts.hires_fix_tweaks_marker_char):
      File "G:\stable-diffusion-webui-forge\modules\options.py", line 142, in __getattr__
        return super(Options, self).__getattribute__(item)
    AttributeError: 'Options' object has no attribute 'hires_fix_tweaks_marker_char'

forge version: f2.0.1v1.10.1-previous-461-g948e9145

Thank you in advance

w-e-w commented 2 weeks ago

since I have not tested this extension with foirge how compatible this extension is with forge due to the nature of this extension lots of part of this extension is implemented using unorthodox methods it is likely that this extension would break on forge


I did a quick test with forge 948e9145 and was not able to reporduce the issue my instance was able to load without the error you've posted

and based on my knowledge of the code base I'm not sure how the above issue can occur is the above error you posted the only error that appears in the entire logs?

rrroddri commented 2 weeks ago

Thank you for your quick response, I reinstalled the extension via git clone and it worked without issues; I was wondering if there any chance that the Distilled CFG scale for Flux by forge could be implemented with your extension

hiresfix