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

a1111 webui에서 upscaler와 controlnet의 충돌 #23

Open
seonukkim opened this issue Sep 13, 2023 · 0 comments
Open

a1111 webui에서 upscaler와 controlnet의 충돌 #23

seonukkim opened this issue Sep 13, 2023 · 0 comments

Comments

@seonukkim
Copy link

최근 controlnet이 SDXL을 지원하기 시작하면서, 크게 업데이트가 되었는데 이 과정에서 ddsd에 있는 upscaler와 controlnet이 충돌이 있는 듯 합니다. tensor 크기로 인한 문제인 것 같은데 아래와 같은 오류 메시지가 뜨며 upscaling이 skip됩니다.

실제로 controlnet을 SDXL 지원 이전으로 돌렸을 때는 다음과 같은 문제가 발생하지 않습니다.
(Upscaler before running detailer를 체크했을 때 포함)

한 번 확인해보고 이 부분 반영해서 업데이트 해주시면 감사하겠습니다 :)

Tile upscaling will process a total of 16 images tiled as 4x4 per upscale in a total of 17 batches (I2I).
  0%|                                                                                                                             | 0/25 [00:00<?, ?it/s]
*** Error running postprocess_image: /home/ubuntu/stable-diffusion-webui/extensions/sd-webui-ddsd/scripts/ddsd.py

        processed = processing.process_images(pi)
      File "/home/ubuntu/stable-diffusion-webui/modules/processing.py", line 732, in process_images
        res = process_images_inner(p)
      File "/home/ubuntu/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/ubuntu/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/ubuntu/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 "/home/ubuntu/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 "/home/ubuntu/stable-diffusion-webui/modules/sd_samplers_common.py", line 261, in launch_sampling
        return func()
      File "/home/ubuntu/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 "/home/ubuntu/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
        return func(*args, **kwargs)
      File "/home/ubuntu/stable-diffusion-webui/repositories/k-diffusion/k_diffusion/sampling.py", line 668, in sample_dpmpp_3m_sde
        denoised = model(x, sigmas[i] * s_in, **extra_args)
      File "/home/ubuntu/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
        return forward_call(*args, **kwargs)
      File "/home/ubuntu/stable-diffusion-webui/modules/sd_samplers_cfg_denoiser.py", line 188, in forward
        x_out[a:b] = self.inner_model(x_in[a:b], sigma_in[a:b], cond=make_condition_dict(c_crossattn, image_cond_in[a:b]))
      File "/home/ubuntu/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
        return forward_call(*args, **kwargs)

      File "/home/ubuntu/stable-diffusion-webui/modules/sd_hijack_utils.py", line 17, in <lambda>
        setattr(resolved_obj, func_path[-1], lambda *args, **kwargs: self(*args, **kwargs))
      File "/home/ubuntu/stable-diffusion-webui/modules/sd_hijack_utils.py", line 28, in __call__
        return self.__orig_func(*args, **kwargs)
      File "/home/ubuntu/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/models/diffusion/ddpm.py", line 858, in apply_model
        x_recon = self.model(x_noisy, t, **cond)
      File "/home/ubuntu/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
        return forward_call(*args, **kwargs)
      File "/home/ubuntu/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/models/diffusion/ddpm.py", line 1335, in forward
        out = self.diffusion_model(x, t, context=cc)
      File "/home/ubuntu/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
        return forward_call(*args, **kwargs)
      File "/home/ubuntu/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/hook.py", line 858, in forward_webui
        raise e
      File "/home/ubuntu/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/hook.py", line 855, in forward_webui
        return forward(*args, **kwargs)
      File "/home/ubuntu/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/hook.py", line 592, in forward
        control = param.control_model(x=x_in, hint=hint, timesteps=timesteps, context=context, y=y)
      File "/home/ubuntu/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
        return forward_call(*args, **kwargs)
      File "/home/ubuntu/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/cldm.py", line 31, in forward
        return self.control_model(*args, **kwargs)
      File "/home/ubuntu/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1501, in _call_impl
        return forward_call(*args, **kwargs)
      File "/home/ubuntu/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/cldm.py", line 311, in forward
        h += guided_hint
    RuntimeError: The size of tensor a (128) must match the size of tensor b (256) at non-singleton dimension 3
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

No branches or pull requests

1 participant