AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
141.47k stars 26.73k forks source link

[Bug]: Upon generating the promp, an error is displayed... #7513

Closed Odawgthat closed 1 year ago

Odawgthat commented 1 year ago

Is there an existing issue for this?

What happened?

As soon as I try to generate an image it produces an error!

I have tried different models, earlier this morning it was working fine, I did install kohya_ss-master to create a lora model, (which worked) and when I came back to stable diffusion it was no longer working.

I'm not sure if it is something to do with the environment because I set one up for kohya_ss-master?

image

Steps to reproduce the problem

  1. Use any model
  2. Error will appear

What should have happened?

The image should have been generated

Commit where the problem happens

https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/226d840e84c5f306350b0681945989b86760e616

What platforms do you use to access the UI ?

Windows

What browsers do you use to access the UI ?

Google Chrome

Command Line Arguments

Just using the commandline -xformers

List of extensions

I have extensions, but I have tested it with and without and it makes no difference. However, I did install:

https://github.com/kohya-ss/sd-webui-additional-networks.git

Console logs

Error completing request
Arguments: ('task(zoysntdbaizr28a)', 'dog', '', [], 20, 0, False, False, 1, 1, 7, -1.0, -1.0, 0, 0, 0, False, 512, 512, False, 0.7, 2, 'Latent', 0, 0, 0, [], 0, False, False, 'positive', 'comma', False, False, '', 1, '', 0, '', 0, '', True, False, False, False) {}
Traceback (most recent call last):
  File "C:\ai\stable-diffusion-webui\modules\call_queue.py", line 56, in f
    res = list(func(*args, **kwargs))
  File "C:\ai\stable-diffusion-webui\modules\call_queue.py", line 37, in f
    res = func(*args, **kwargs)
  File "C:\ai\stable-diffusion-webui\modules\txt2img.py", line 56, in txt2img
    processed = process_images(p)
  File "C:\ai\stable-diffusion-webui\modules\processing.py", line 484, in process_images
    res = process_images_inner(p)
  File "C:\ai\stable-diffusion-webui\modules\processing.py", line 626, in process_images_inner
    samples_ddim = p.sample(conditioning=c, unconditional_conditioning=uc, seeds=seeds, subseeds=subseeds, subseed_strength=p.subseed_strength, prompts=prompts)
  File "C:\ai\stable-diffusion-webui\modules\processing.py", line 826, in sample
    samples = self.sampler.sample(self, x, conditioning, unconditional_conditioning, image_conditioning=self.txt2img_image_conditioning(x))
  File "C:\ai\stable-diffusion-webui\modules\sd_samplers_kdiffusion.py", line 290, in sample
    samples = self.launch_sampling(steps, lambda: self.func(self.model_wrap_cfg, x, extra_args={
  File "C:\ai\stable-diffusion-webui\modules\sd_samplers_kdiffusion.py", line 190, in launch_sampling
    return func()
  File "C:\ai\stable-diffusion-webui\modules\sd_samplers_kdiffusion.py", line 290, in <lambda>
    samples = self.launch_sampling(steps, lambda: self.func(self.model_wrap_cfg, x, extra_args={
  File "C:\ai\stable-diffusion-webui\venv\lib\site-packages\torch\autograd\grad_mode.py", line 27, in decorate_context
    return func(*args, **kwargs)
  File "C:\ai\stable-diffusion-webui\repositories\k-diffusion\k_diffusion\sampling.py", line 145, in sample_euler_ancestral
    denoised = model(x, sigmas[i] * s_in, **extra_args)
  File "C:\ai\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "C:\ai\stable-diffusion-webui\modules\sd_samplers_kdiffusion.py", line 94, in forward
    x_out = self.inner_model(x_in, sigma_in, cond={"c_crossattn": [cond_in], "c_concat": [image_cond_in]})
  File "C:\ai\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "C:\ai\stable-diffusion-webui\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 "C:\ai\stable-diffusion-webui\repositories\k-diffusion\k_diffusion\external.py", line 138, in get_eps
    return self.inner_model.apply_model(*args, **kwargs)
  File "C:\ai\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 "C:\ai\stable-diffusion-webui\modules\sd_hijack_utils.py", line 28, in __call__
    return self.__orig_func(*args, **kwargs)
  File "C:\ai\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 "C:\ai\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "C:\ai\stable-diffusion-webui\repositories\stable-diffusion-stability-ai\ldm\models\diffusion\ddpm.py", line 1329, in forward
    out = self.diffusion_model(x, t, context=cc)
  File "C:\ai\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "C:\ai\stable-diffusion-webui\repositories\stable-diffusion-stability-ai\ldm\modules\diffusionmodules\openaimodel.py", line 776, in forward
    h = module(h, emb, context)
  File "C:\ai\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "C:\ai\stable-diffusion-webui\repositories\stable-diffusion-stability-ai\ldm\modules\diffusionmodules\openaimodel.py", line 84, in forward
    x = layer(x, context)
  File "C:\ai\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
    return forward_call(*input, **kwargs)
  File "C:\ai\stable-diffusion-webui\repositories\stable-diffusion-stability-ai\ldm\modules\attention.py", line 320, in forward
    x = rearrange(x, 'b c h w -> b (h w) c').contiguous()
  File "C:\ai\stable-diffusion-webui\venv\lib\site-packages\einops\einops.py", line 487, in rearrange
    return reduce(tensor, pattern, reduction='rearrange', **axes_lengths)
  File "C:\ai\stable-diffusion-webui\venv\lib\site-packages\einops\einops.py", line 410, in reduce
    return _apply_recipe(recipe, tensor, reduction_type=reduction)
  File "C:\ai\stable-diffusion-webui\venv\lib\site-packages\einops\einops.py", line 231, in _apply_recipe
    backend = get_backend(tensor)
  File "C:\ai\stable-diffusion-webui\venv\lib\site-packages\einops\_backends.py", line 28, in get_backend
    if backend.is_appropriate_type(tensor):
  File "C:\ai\stable-diffusion-webui\venv\lib\site-packages\einops\_backends.py", line 457, in is_appropriate_type
    return isinstance(tensor, (self.tf.Tensor, self.tf.Variable))
AttributeError: module 'tensorflow' has no attribute 'Tensor'

Additional information

No response

Odawgthat commented 1 year ago

I DELETED THE VENV FOLDER AND RAN THE BAT FILE. Basically reset all the venv files and installed again, all working now :)

carlosbanonai commented 1 year ago

I have the same issue and the problem persists after deleting the VENV folder. Anything else I can do to fix it ?