stable-diffusion-webui
stable-diffusion-webui copied to clipboard
Image generation fails using highres fix, DDIM, "IndexError: index 1000 is out of bounds for dimension 0 with size 1000"
On certain settings, the image generation fails on the second phase of generation when using highres fix and DDIM. This happens more frequently when the denoising strength is less than 0.3. Here are the exact settings that I get the bug from:
--no-half --precision full --xformers on startup Steps: 90-100 EDIT: tried with 80, still failed. DDIM width 768 height 1024 Restore faces, highres fix, Firstpass width 576, height 768, CFG 7 Seed 3076125250 Switching to Euler A works just fine. Here are the errors it throws:
Error completing request2:03, 4.48it/s] Arguments:PROMPT REMOVED'bad anatomy, low res, jpeg artifacts, missing fingers, extra digit, extra limbs, disfigured, out of frame, deformed, cropped, bad art, blurry, ruined face, extra leg, long neck, ugly photo, bad hands, text, error, fewer digits, cropped, worst quality, low quality, normal quality, signature, watermark, username, unscientific, ', 'None', 'None', 95, 11, True, False, 1, 1, 7, 3076125250.0, -1.0, 0, 0, 0, False, 1024, 768, True, 0.12, 576, 768, 0, False, False, None, '', 1, '', 0, '', True, False, False) {} Traceback (most recent call last): File "C:\Users\azure\stable-diffusion-webui\modules\sd_samplers.py", line 186, in sample_img2img self.sampler.make_schedule(ddim_num_steps=steps, ddim_eta=self.eta, ddim_discretize=p.ddim_discretize, verbose=False) File "C:\Users\azure\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:\Users\azure\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
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "C:\Users\azure\stable-diffusion-webui\modules\ui.py", line 187, in f res = list(func(*args, **kwargs)) File "C:\Users\azure\stable-diffusion-webui\webui.py", line 64, in f res = func(*args, **kwargs) File "C:\Users\azure\stable-diffusion-webui\modules\txt2img.py", line 44, in txt2img processed = process_images(p) File "C:\Users\azure\stable-diffusion-webui\modules\processing.py", line 408, in process_images samples_ddim = p.sample(conditioning=c, unconditional_conditioning=uc, seeds=seeds, subseeds=subseeds, subseed_strength=p.subseed_strength) File "C:\Users\azure\stable-diffusion-webui\modules\processing.py", line 593, in sample samples = self.sampler.sample_img2img(self, samples, noise, conditioning, unconditional_conditioning, steps=self.steps) File "C:\Users\azure\stable-diffusion-webui\modules\sd_samplers.py", line 188, in sample_img2img self.sampler.make_schedule(ddim_num_steps=steps+1, ddim_eta=self.eta, ddim_discretize=p.ddim_discretize, verbose=False) File "C:\Users\azure\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:\Users\azure\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
I am running on windows with a 3090, Commit hash: acedbe67d2b8a3af99ca3b9a2f809e7a2db285d1, Firefox
Been having this issue for a few pulls as well.
This is an issue that also happens in the plain CompVis repo version of the code too, not sure exactly what the problem is but certain combinations of steps/sizes seem to trigger it
same here, I have not found a clear pattern, although I confirm that the times it has happened to me, it has been with DDIM.
I am getting this error as well. Would be great to find a fix because I often settle on DDIM as my sampler of choice for some seeds