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

HiRes Fix時、高解像度step数を0にしているとエラー? #32

Closed
JujoHotaru opened this issue Dec 23, 2023 · 3 comments
Closed

Comments

@JujoHotaru
Copy link

JujoHotaru commented Dec 23, 2023

いつもお世話になっております。

WebUI 1.7.0+NegPiP 本日最新版で、HiRes Fixを有効にし、高解像度でのstep数を0(元出力のサンプリングステップ数指定をそのまま使う)として出力すると、コンソールで以下のエラーが発生していました。

この場合、出力自体は行われるのですが、マイナス指定プロンプトが入っていてもNegPiPが効かなくなっているようです。

** Error running process_batch: C:\stable-diffusion-webui\extensions\sd-webui-negpip\scripts\negpip.py [00:00<?, ?it/s]
    Traceback (most recent call last):
      File "C:\stable-diffusion-webui\modules\scripts.py", line 742, in process_batch
        script.process_batch(p, *script_args, **kwargs)
      File "C:\stable-diffusion-webui\extensions\sd-webui-negpip\scripts\negpip.py", line 160, in process_batch
        if self.hrp: scheduled_hr_p = prompt_parser.get_learned_conditioning_prompt_schedules(p.hr_prompts,p.hr_second_pass_steps if p.hr_second_pass_steps > 0 else p.step)
    AttributeError: 'StableDiffusionProcessingTxt2Img' object has no attribute 'step'

WebUI 1.6.0を使っていたときは発生していなかった症状と思われます。

@aolko
Copy link

aolko commented Jan 7, 2024

Same here, any fix?

@34256346
Copy link

34256346 commented Jan 9, 2024

To fix this issue, you can manually replace p.step with p.steps in the following code in sd-webui-negpip/scripts/negpip.py

if self.hrp: scheduled_hr_p = prompt_parser.get_learned_conditioning_prompt_schedules(p.hr_prompts,p.hr_second_pass_steps if p.hr_second_pass_steps > 0 else p.step)
if self.hrn: scheduled_hr_np = prompt_parser.get_learned_conditioning_prompt_schedules(p.hr_negative_prompts,p.hr_second_pass_steps if p.hr_second_pass_steps > 0 else p.step)

hako-mikan added a commit that referenced this issue Feb 1, 2024
@hako-mikan
Copy link
Owner

修正しました。

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

4 participants