stable-diffusion-webui icon indicating copy to clipboard operation
stable-diffusion-webui copied to clipboard

[Bug]: LDSR out of bounds error

Open TwistedFromArma opened this issue 2 years ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues and checked the recent builds/commits

What happened?

everytime i try and use LDSR to updsacle via extras i get an out of bounds message

Steps to reproduce the problem

  1. Go to .... Extras
  2. Press .... LDSR set to 4x and press generate
  3. ... ERROR

What should have happened?

LDSr should upscale image. it used to work.

Commit where the problem happens

Commit hash: d885a4a57b72152745ca76192ef1bdda29e6461d

What platforms do you use to access UI ?

Windows

What browsers do you use to access the UI ?

Mozilla Firefox

Command Line Arguments

No response

Additional information, context and logs

Loading model from C:\AUTOMATIC stable-diffusion-webui\models\LDSR\model.ckpt LatentDiffusion: Running in eps-prediction mode DiffusionWrapper has 113.62 M params. Keeping EMAs of 308. making attention of type 'vanilla' with 512 in_channels Working with z of shape (1, 3, 64, 64) = 12288 dimensions. making attention of type 'vanilla' with 512 in_channels Down sample rate is 1 from 4 / 4 (Not downsampling) Plotting: Switched to EMA weights Sampling with eta = 1.0; steps: 110 Plotting: Restored training weights Error completing request Arguments: (0, 0, <PIL.Image.Image image mode=RGB size=512x512 at 0x152BA073310>, None, '', '', True, 0, 0, 0, 4, 512, 512, True, 2, 0, 1, False) {} Traceback (most recent call last): File "C:\AUTOMATIC stable-diffusion-webui\modules\ui.py", line 221, in f res = list(func(*args, **kwargs)) File "C:\AUTOMATIC stable-diffusion-webui\webui.py", line 63, in f res = func(*args, **kwargs) File "C:\AUTOMATIC stable-diffusion-webui\modules\extras.py", line 186, in run_extras image, info = op(image, info) File "C:\AUTOMATIC stable-diffusion-webui\modules\extras.py", line 147, in run_upscalers_blend res = upscale(image, *upscale_args) File "C:\AUTOMATIC stable-diffusion-webui\modules\extras.py", line 116, in upscale res = upscaler.scaler.upscale(image, resize, upscaler.data_path) File "C:\AUTOMATIC stable-diffusion-webui\modules\upscaler.py", line 62, in upscale img = self.do_upscale(img, selected_model) File "C:\AUTOMATIC stable-diffusion-webui\modules\ldsr_model.py", line 54, in do_upscale return ldsr.super_resolution(img, ddim_steps, self.scale) File "C:\AUTOMATIC stable-diffusion-webui\modules\ldsr_model_arch.py", line 113, in super_resolution logs = self.run(model["model"], im_og, diffusion_steps, eta) File "C:\AUTOMATIC stable-diffusion-webui\modules\ldsr_model_arch.py", line 76, in run logs = make_convolutional_sample(example, model, File "C:\AUTOMATIC stable-diffusion-webui\venv\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context return func(*args, **kwargs) File "C:\AUTOMATIC stable-diffusion-webui\modules\ldsr_model_arch.py", line 200, in make_convolutional_sample sample, intermediates = convsample_ddim(model, c, steps=custom_steps, shape=z.shape, File "C:\AUTOMATIC stable-diffusion-webui\venv\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context return func(*args, **kwargs) File "C:\AUTOMATIC stable-diffusion-webui\modules\ldsr_model_arch.py", line 156, in convsample_ddim samples, intermediates = ddim.sample(steps, batch_size=bs, shape=shape, conditioning=cond, callback=callback, File "C:\AUTOMATIC stable-diffusion-webui\venv\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context return func(*args, **kwargs) File "C:\AUTOMATIC stable-diffusion-webui\modules\sd_hijack_inpainting.py", line 56, in sample_ddim self.make_schedule(ddim_num_steps=S, ddim_eta=eta, verbose=verbose) File "C:\AUTOMATIC stable-diffusion-webui\repositories\stable-diffusion\ldm\models\diffusion\ddim.py", line 44, in make_schedule ddim_sigmas, ddim_alphas, ddim_alphas_prev = make_ddim_sampling_parameters(alphacums=alphas_cumprod.cpu(), File "C:\AUTOMATIC stable-diffusion-webui\repositories\stable-diffusion\ldm\modules\diffusionmodules\util.py", line 65, in make_ddim_sampling_parameters alphas = alphacums[ddim_timesteps] IndexError: index 1000 is out of bounds for dimension 0 with size 1000

TwistedFromArma avatar Oct 29 '22 09:10 TwistedFromArma

just a note that i still get this error. No idea how to solve or why not many other get it.

TwistedFromArma avatar Nov 03 '22 06:11 TwistedFromArma