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

[Bug]: RuntimeError: The size of tensor a (64) must match the size of tensor b (100) at non-singleton dimension 3 #15813

Open
1 of 6 tasks
hjj-lmx opened this issue May 16, 2024 · 0 comments
Labels
bug-report Report of a bug, yet to be confirmed

Comments

@hjj-lmx
Copy link

hjj-lmx commented May 16, 2024

Checklist

  • The issue exists after disabling all extensions
  • The issue exists on a clean installation of webui
  • The issue is caused by an extension, but I believe it is caused by a bug in the webui
  • The issue exists in the current version of the webui
  • The issue has not been reported before recently
  • The issue has been reported before but has not been fixed yet

What happened?

Using the Wensheng graphic to report the following error, the previous one can be used normally

Steps to reproduce the problem

1

What should have happened?

1

What browsers do you use to access the UI ?

No response

Sysinfo

1

Console logs

Traceback (most recent call last):
      File "D:\stable-diffusion-webui-1.8\modules\call_queue.py", line 57, in f
        res = list(func(*args, **kwargs))
      File "D:\stable-diffusion-webui-1.8\modules\call_queue.py", line 36, in f
        res = func(*args, **kwargs)
      File "D:\stable-diffusion-webui-1.8\modules\txt2img.py", line 110, in txt2img
        processed = processing.process_images(p)
      File "D:\stable-diffusion-webui-1.8\modules\processing.py", line 786, in process_images
        res = process_images_inner(p)
      File "D:\stable-diffusion-webui-1.8\extensions\sd-webui-controlnet\scripts\batch_hijack.py", line 41, in processing_process_images_hijack
        return getattr(processing, '__controlnet_original_process_images_inner')(p, *args, **kwargs)
      File "D:\stable-diffusion-webui-1.8\modules\processing.py", line 922, 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 "D:\stable-diffusion-webui-1.8\modules\processing.py", line 1262, in sample
        samples = self.sampler.sample(self, x, conditioning, unconditional_conditioning, image_conditioning=self.txt2img_image_conditioning(x))
      File "D:\stable-diffusion-webui-1.8\modules\sd_samplers_kdiffusion.py", line 234, 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 "D:\stable-diffusion-webui-1.8\modules\sd_samplers_common.py", line 261, in launch_sampling
        return func()
      File "D:\stable-diffusion-webui-1.8\modules\sd_samplers_kdiffusion.py", line 234, in <lambda>
        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 "D:\stable-diffusion-webui-1.8\venv\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
        return func(*args, **kwargs)
      File "D:\stable-diffusion-webui-1.8\repositories\k-diffusion\k_diffusion\sampling.py", line 594, in sample_dpmpp_2m
        denoised = model(x, sigmas[i] * s_in, **extra_args)
      File "D:\stable-diffusion-webui-1.8\venv\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
        return self._call_impl(*args, **kwargs)
      File "D:\stable-diffusion-webui-1.8\venv\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
        return forward_call(*args, **kwargs)
      File "D:\stable-diffusion-webui-1.8\modules\sd_samplers_cfg_denoiser.py", line 256, 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 "D:\stable-diffusion-webui-1.8\venv\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
        return self._call_impl(*args, **kwargs)
      File "D:\stable-diffusion-webui-1.8\venv\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
        return forward_call(*args, **kwargs)
      File "D:\stable-diffusion-webui-1.8\repositories\k-diffusion\k_diffusion\external.py", line 112, in forward
        eps = self.get_eps(input * c_in, self.sigma_to_t(sigma), **kwargs)
      File "D:\stable-diffusion-webui-1.8\repositories\k-diffusion\k_diffusion\external.py", line 138, in get_eps
        return self.inner_model.apply_model(*args, **kwargs)
      File "D:\stable-diffusion-webui-1.8\modules\sd_models_xl.py", line 44, in apply_model
        return self.model(x, t, cond)
      File "D:\stable-diffusion-webui-1.8\venv\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
        return self._call_impl(*args, **kwargs)
      File "D:\stable-diffusion-webui-1.8\venv\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
        return forward_call(*args, **kwargs)
      File "D:\stable-diffusion-webui-1.8\modules\sd_hijack_utils.py", line 18, in <lambda>
        setattr(resolved_obj, func_path[-1], lambda *args, **kwargs: self(*args, **kwargs))
      File "D:\stable-diffusion-webui-1.8\modules\sd_hijack_utils.py", line 32, in __call__
        return self.__orig_func(*args, **kwargs)
      File "D:\stable-diffusion-webui-1.8\repositories\generative-models\sgm\modules\diffusionmodules\wrappers.py", line 28, in forward
        return self.diffusion_model(
      File "D:\stable-diffusion-webui-1.8\venv\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
        return self._call_impl(*args, **kwargs)
      File "D:\stable-diffusion-webui-1.8\venv\lib\site-packages\torch\nn\modules\module.py", line 1568, in _call_impl
        result = forward_call(*args, **kwargs)
      File "D:\stable-diffusion-webui-1.8\extensions\sd-webui-controlnet\scripts\hook.py", line 845, in forward_webui
        raise e
      File "D:\stable-diffusion-webui-1.8\extensions\sd-webui-controlnet\scripts\hook.py", line 842, in forward_webui
        return forward(*args, **kwargs)
      File "D:\stable-diffusion-webui-1.8\extensions\sd-webui-controlnet\scripts\hook.py", line 570, in forward
        control = param.control_model(x=x_in, hint=hint, timesteps=timesteps, context=context, y=y)
      File "D:\stable-diffusion-webui-1.8\venv\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
        return self._call_impl(*args, **kwargs)
      File "D:\stable-diffusion-webui-1.8\venv\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
        return forward_call(*args, **kwargs)
      File "D:\stable-diffusion-webui-1.8\extensions\sd-webui-controlnet\scripts\cldm.py", line 31, in forward
        return self.control_model(*args, **kwargs)
      File "D:\stable-diffusion-webui-1.8\venv\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
        return self._call_impl(*args, **kwargs)
      File "D:\stable-diffusion-webui-1.8\venv\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
        return forward_call(*args, **kwargs)
      File "D:\stable-diffusion-webui-1.8\extensions\sd-webui-controlnet\scripts\cldm.py", line 311, in forward
        h += guided_hint
    RuntimeError: The size of tensor a (64) must match the size of tensor b (100) at non-singleton dimension 3

Additional information

No response

@hjj-lmx hjj-lmx added the bug-report Report of a bug, yet to be confirmed label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Report of a bug, yet to be confirmed
Projects
None yet
Development

No branches or pull requests

1 participant