camenduru / stable-diffusion-webui-colab

stable diffusion webui colab
The Unlicense
15.47k stars 2.61k forks source link

[Bug]: when running img2img error #382

Closed muuua1004 closed 1 year ago

muuua1004 commented 1 year ago

What happened?

when use img2img, error cameout. Although it can be carried out normally, but every step will prompt an error, what is the problem?

Colab cell output

0% 0/61 [00:00<?, ?it/s]Error executing callback cfg_denoised_callback for /content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/stable-diffusion-webui-two-shot/scripts/two_shot.py
Traceback (most recent call last):
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/modules/script_callbacks.py", line 175, in cfg_denoised_callback
    c.callback(params)
  File "/content/drive/MyDrive/stable-diffusion-webui-colab/stable-diffusion-webui/extensions/stable-diffusion-webui-two-shot/scripts/two_shot.py", line 506, in denoised_callback
    if self.enabled and params.sampling_step < self.end_at_step:
TypeError: '<' not supported between instances of 'int' and 'str'

Which colab and model(s) were you using when the error occurred?

https://colab.research.google.com/github/camenduru/stable-diffusion-webui-colab/blob/drive/run.ipynb

Which Public WebUI Colab URL were you using when the error occurred?

gradio.live

If you used HiRes mode when the error occurred, please provide the Hires info

No response

machiavel23 commented 1 year ago

It would have been interesting to have your prompt and two-shot settings, because apparently, it's a two-shot bug. It tries to compare if the parameter sampling_step is inferior to the parameter end_at_step. The problem is one is an integer (Real number like 27) and the other one is a string (a following of characters like this "27"). Therefore it can't compare the numbers, because one of them is a text, it's like trying to do if 27 < magma which doesn't makes sense for it.