opparco / stable-diffusion-webui-two-shot

Latent Couple extension (two shot diffusion port)
MIT License
717 stars 152 forks source link

How can I fix cfg_denoiser_callback ImportError #1

Closed sss28765431 closed 1 year ago

sss28765431 commented 1 year ago

Error loading script: two_shot.py Traceback (most recent call last): File "E:\AI\stable-diffusion-webui\modules\scripts.py", line 229, in load_scripts script_module = script_loading.load_module(scriptfile.path) File "E:\AI\stable-diffusion-webui\modules\script_loading.py", line 11, in load_module module_spec.loader.exec_module(module) File "", line 883, in exec_module File "", line 241, in _call_with_frames_removed File "E:\AI\stable-diffusion-webui\extensions-builtin\stable-diffusion-webui-two-shot\scripts\two_shot.py", line 10, in from modules.script_callbacks import CFGDenoisedParams, on_cfg_denoised ImportError: cannot import name 'CFGDenoisedParams' from 'modules.script_callbacks' (E:\AI\stable-diffusion-webui\modules\script_callbacks.py)

ddPn08 commented 1 year ago

Did you run this command?

git apply --ignore-whitespace extensions/stable-diffusion-webui-two-shot/cfg_denoised_callback-ea9bd9fc.patch
sss28765431 commented 1 year ago

Yes, I do it

E:\AI\stable-diffusion-webui\extensions-builtin>git apply --ignore-whitespace extensions/stable-diffusion-webui-two-shot/cfg_denoised_callback-ea9bd9fc.patch error: can't open patch 'extensions-builtin/extensions/stable-diffusion-webui-two-shot/cfg_denoised_callback-ea9bd9fc.patch': No such file or directory

nickkolok commented 1 year ago

Try:

cd E:\AI\stable-diffusion-webui
git apply --ignore-whitespace extensions/stable-diffusion-webui-two-shot/cfg_denoised_callback-ea9bd9fc.patch

You have to be in the proper folder

sss28765431 commented 1 year ago

I have no idea how to fix it.

E:\AI\stable-diffusion-webui>git apply -- extensions/stable-diffusion-webui-two-shot/cfg_denoised_callback-ea9bd9fc.patch error: can't open patch 'extensions/stable-diffusion-webui-two-shot/cfg_denoised_callback-ea9bd9fc.patch': No such file or directory

sss28765431 commented 1 year ago

Today I install extension in success with the patch.