Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Error loading script: sonar.py" after updating A1111's webui to latest commit #4

Closed
illtellyoulater opened this issue Jan 30, 2023 · 2 comments

Comments

@illtellyoulater
Copy link

getting this on windows 10 after updating webui to aa4688eb8345de583070ca9ddb4c6f585f06762b

Error loading script: sonar.py
Traceback (most recent call last):
  File "C:\Users\username\Downloads\generative-nn-models\stable-diffusion-webui\modules\scripts.py", line 229, in load_scripts
    script_module = script_loading.load_module(scriptfile.path)
  File "C:\Users\username\Downloads\generative-nn-models\stable-diffusion-webui\modules\script_loading.py", line 11, 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 "C:\Users\username\Downloads\generative-nn-models\stable-diffusion-webui\extensions\stable-diffusion-webui-sonar\scripts\sonar.py", line 445, in <module>
    def sample_naive(model:CFGDenoiser, x:Tensor, sigmas:List, extra_args={}, callback=None, *args):
NameError: name 'CFGDenoiser' is not defined
@illtellyoulater
Copy link
Author

illtellyoulater commented Jan 30, 2023

More info: this is due to WebUI updated to reorganize sampler code recently.
It goes away by doing: git checkout cbd6329488beafe036ea3a3d0cea1a6940105cf9 (the last commit before sampler reorg).

How this was fixed in another extension: mcmonkeyprojects/sd-dynamic-thresholding#2

@RainehDaze
Copy link

Looks like KDifffusionSampler and CFGDenoiser are now in sd_samplers_kdiffusion, while setup_img2imgsteps is in sd_samplers_common.

I'd change the import lines myself, but I can't work out where inspect is being imported from

It's only this line that needs changing:

from modules.sd_samplers import * KDiffusionSampler, CFGDenoiser, SamplerData, setup_img2img_steps, inspect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants