0xbitches / sd-webui-lcm

Latent Consistency Model for AUTOMATIC1111 Stable Diffusion WebUI
MIT License
614 stars 43 forks source link

malware - corrupts webui "IndexError: list index out of range" #40

Open ato-zen opened 10 months ago

ato-zen commented 10 months ago

After installation, image often fails to generate "IndexError: list index out of range"

Arguments: ('task(sjlf58gfj1snmh7)', 'cat', '', [], 8, 'Euler a', 1, 1, 1, 512, 512, False, 0.7, 2, 'Latent', 0, 0, 0, 'Use same checkpoint', 'Use same sampler', '', '', [], <gradio.routes.Request object at 0x7f40666d3250>, 0, False, '', 0.8, -1, False, -1, 0, 0, 0, UiControlNetUnit(enabled=False, module='none', model='None', weight=1, image=None, resize_mode='Crop and Resize', low_vram=False, processor_res=-1, threshold_a=-1, threshold_b=-1, guidance_start=0, guidance_end=1, pixel_perfect=False, control_mode='Balanced', save_detected_map=True), UiControlNetUnit(enabled=False, module='none', model='None', weight=1, image=None, resize_mode='Crop and Resize', low_vram=False, processor_res=-1, threshold_a=-1, threshold_b=-1, guidance_start=0, guidance_end=1, pixel_perfect=False, control_mode='Balanced', save_detected_map=True), UiControlNetUnit(enabled=False, module='none', model='None', weight=1, image=None, resize_mode='Crop and Resize', low_vram=False, processor_res=-1, threshold_a=-1, threshold_b=-1, guidance_start=0, guidance_end=1, pixel_perfect=False, control_mode='Balanced', save_detected_map=True), None, '', None, True, False, False, False, False, False, 0, 0, '0', 0, False, True, 0, 'Portrait of a [gender]', 'blurry', 20, ['DPM++ 2M Karras'], '', 0, 'None', 1, 1, '', False, False, False, 1, 0, 'Portrait of a [gender]', 'blurry', 20, ['DPM++ 2M Karras'], '', 0, None, '', None, True, False, False, False, False, False, 0, 0, '0', 0, False, True, 0, 'Portrait of a [gender]', 'blurry', 20, ['DPM++ 2M Karras'], '', 0, 'None', 1, 1, '', False, False, False, 1, 0, 'Portrait of a [gender]', 'blurry', 20, ['DPM++ 2M Karras'], '', 0, None, '', None, True, False, False, False, False, False, 0, 0, '0', 0, False, True, 0, 'Portrait of a [gender]', 'blurry', 20, ['DPM++ 2M Karras'], '', 0, 'None', 1, 1, '', False, False, False, 1, 0, 'Portrait of a [gender]', 'blurry', 20, ['DPM++ 2M Karras'], '', 0, 'CodeFormer', 1, 1, 'None', 1, 1, ['After Upscaling/Before Restore Face'], 0, 'Portrait of a [gender]', 'blurry', 20, ['DPM++ 2M Karras'], '', 0, False, False, 'positive', 'comma', 0, False, False, '', 1, '', [], 0, '', [], 0, '', [], True, False, False, False, 0, False, None, None, False, None, None, False, None, None, False, 50) {} Traceback (most recent call last): File "/home/user/stable-diffusion-webui/modules/call_queue.py", line 57, in f res = list(func(args, kwargs)) File "/home/user/stable-diffusion-webui/modules/call_queue.py", line 36, in f res = func(*args, kwargs) File "/home/user/stable-diffusion-webui/modules/txt2img.py", line 55, in txt2img processed = processing.process_images(p) File "/home/user/stable-diffusion-webui/modules/processing.py", line 732, in process_images res = process_images_inner(p) File "/home/user/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/batch_hijack.py", line 42, in processing_process_images_hijack return getattr(processing, '__controlnet_original_process_images_inner')(p, *args, kwargs) File "/home/user/stable-diffusion-webui/modules/processing.py", line 867, in process_images_inner samples_ddim = p.sample(conditioning=p.c, unconditional_conditioning=p.uc, seeds=p.seeds, subseeds=p.subseeds, subseed_strength=p.subseed_strength, prompts=p.prompts) File "/home/user/stable-diffusion-webui/modules/processing.py", line 1140, in sample samples = self.sampler.sample(self, x, conditioning, unconditional_conditioning, image_conditioning=self.txt2img_image_conditioning(x)) File "/home/user/stable-diffusion-webui/modules/sd_samplers_kdiffusion.py", line 235, in sample samples = self.launch_sampling(steps, lambda: self.func(self.model_wrap_cfg, x, extra_args=self.sampler_extra_args, disable=False, callback=self.callback_state, extra_params_kwargs)) File "/home/user/stable-diffusion-webui/modules/sd_samplers_common.py", line 261, in launch_sampling return func() File "/home/user/stable-diffusion-webui/modules/sd_samplers_kdiffusion.py", line 235, in samples = self.launch_sampling(steps, lambda: self.func(self.model_wrap_cfg, x, extra_args=self.sampler_extra_args, disable=False, callback=self.callback_state, *extra_params_kwargs)) File "/home/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(args, kwargs) File "/home/user/stable-diffusion-webui/repositories/k-diffusion/k_diffusion/sampling.py", line 144, in sample_euler_ancestral for i in trange(len(sigmas) - 1, disable=disable): File "/home/user/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/helpers.py", line 515, in next current_iterable = self.iterables[-1] IndexError: list index out of range


slbillups commented 10 months ago

...Please don't list your issue with "malware" if you don't even know what malware is.

Untitled

That aside, list index out of range is a pretty common issue with LCM, and it's usually due to a conflict with pytorch, but it could be due to several different factors with your unique setup. If this is only occurring when attempting to load the extension for the first time, I would remove it from your venv folder and restart your webui.

You should also include things like where you run your webui from? I'm assuming you're using the pre-compiled .zip and the run.bat file? If so, delete your venv folder in /home/user/stable-diffusion-webui/ entirely, then add set COMMANDLINE_ARGS="--reinstall-torch" in your webui-user.bat inside of /home/user/stable-diffusion-webui/. If that doesn't work, I would nuke the stable-diffusion-webui folder at that point and reinstall.