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

Fixed UnboundLocalError #80

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fixed UnboundLocalError #80

wants to merge 1 commit into from

Conversation

ka1tte
Copy link

@ka1tte ka1tte commented Sep 25, 2023

Fixed the UnboundLocalError in the sample_dpmpp_2m_sde and sample_dpmpp_3m_sde functions.

File "/workspace/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 "/workspace/stable-diffusion-webui/modules/processing.py", line 1528, in sample
  samples = self.sampler.sample_img2img(self, self.init_latent, x, conditioning, unconditional_conditioning, image_conditioning=self.image_conditioning)
File "/workspace/stable-diffusion-webui/modules/sd_samplers_kdiffusion.py", line 188, in sample_img2img
  samples = self.launch_sampling(t_enc + 1, lambda: self.func(self.model_wrap_cfg, xi, extra_args=self.sampler_extra_args, disable=False, callback=self.callback_state, **extra_params_kwargs))
File "/workspace/stable-diffusion-webui/modules/sd_samplers_common.py", line 261, in launch_sampling
  return func()
File "/workspace/stable-diffusion-webui/modules/sd_samplers_kdiffusion.py", line 188, in <lambda>
  samples = self.launch_sampling(t_enc + 1, lambda: self.func(self.model_wrap_cfg, xi, extra_args=self.sampler_extra_args, disable=False, callback=self.callback_state, **extra_params_kwargs))
File "/workspace/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
  return func(*args, **kwargs)
File "/workspace/stable-diffusion-webui/repositories/k-diffusion/k_diffusion/sampling.py", line 701, in sample_dpmpp_3m_sde
  h_1, h_2 = h, h_1
UnboundLocalError: local variable 'h' referenced before assignment

This seems to be a problem that has arisen previously. #74

@xgfone
Copy link

xgfone commented Aug 15, 2024

not merge ??

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

Successfully merging this pull request may close these issues.

2 participants