Repository: stable-diffusion-webui
Issue: [Bug]: CUDNN_STATUS_NOT_INITIALIZED
Labels: bug-report

[Solved] [Edit] See my 2nd reply.

### Is there an existing issue for this?

- [X] I have searched the existing issues and checked the recent builds/commits

### What happened?

It's been a while since I updated, but I just pulled a couple days ago (and today).  Just loading and typing 'hi' and clicking Generate results in the console error:

`site-packages/torch/nn/modules/conv.
py", line 459, in _conv_forward
    return F.conv2d(input, weight, bias, self.stride,
RuntimeError: cuDNN error: CUDNN_STATUS_NOT_INITIALIZED`

(Full log below)

### Steps to reproduce the problem

I'm not sure how you'd reproduce it, but for me I just:
1. Run webui.sh with:
```
export CUDA_VISIBLE_DEVICES=1,2
./webui.sh \
	--allow-code \
	--medvram \
	--enable-console-prompts \
	--api \
	--enable-insecure-extension-access \
	--listen
```
2. Wait for model to load and webui to come up
3. Type any prompt and click Generate


### What should have happened?

Fulfillment should have spread throughout the world and all humanity's problems should have dissolved.

### Commit where the problem happens

22bcc7be428c94e9408f589966c2040187245d81

### What platforms do you use to access the UI ?

Linux

### What browsers do you use to access the UI ?

Mozilla Firefox

### Command Line Arguments

```Shell
./webui.sh \
	--allow-code \
	--medvram \
	--enable-console-prompts \
	--api \
	--enable-insecure-extension-access \
	--listen
```


### List of extensions

I've tested with all disabled; same error.
( "Disable all extensions" was set, change it to "none" to load all extensions again  )

### Console logs

```Shell
################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye)
################################################################

################################################################
Running on jaggz user
################################################################

################################################################
Repo already cloned, using it as install directory
################################################################

################################################################
Create and activate python venv
################################################################

################################################################
Launching launch.py...
################################################################
WARNING:root:Pytorch pre-release version 1.14.0a0+git0e7c100 - assuming intent to test it
WARNING:root:Pytorch pre-release version 1.14.0a0+git0e7c100 - assuming intent to test it
Python 3.9.2 (default, Feb 28 2021, 17:03:44) 
[GCC 10.2.1 20210110]
Commit hash: 84c6b566afe270c1edb0e5b1c16386edb451a76d
Installing requirements for Web UI

Launching Web UI with arguments: --allow-code --medvram --enable-console-prompts --api --enable-insecure-extension-access --listen
No module 'xformers'. Proceeding without it.
Loading weights [fe4efff1e1] from /home/jaggz/sd-web/models/Stable-diffusion/sd-v1-4.ckpt
Creating model from config: /home/jaggz/sd-web/configs/v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Applying cross attention optimization (Doggettx).
Textual inversion embeddings loaded(0): 
Model loaded in 2.4s (load weights from disk: 1.0s, create model: 0.3s, apply weights to model: 0.6s, apply half(): 0.4s).
Running on local URL:  http://0.0.0.0:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 7.4s (import torch: 0.7s, import gradio: 0.5s, import ldm: 0.2s, other imports: 1.1s, load scripts: 0.6s, load SD checkpoint: 2.4s, create ui: 1.6s, gradio launch: 0.1s).

txt2img: hi

  0%|          | 0/20 [00:00<?, ?it/s]
  0%|          | 0/20 [00:00<?, ?it/s]
Error completing request
Arguments: ('task(72jzkvxs2ylsveq)', 'hi', '', [], 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, <scripts.external_code.ControlNetUnit object at 0x7fdc999a54c0>, '', False, False, 'positive', 'comma', 0, False, False, '', 1, '', 0, '', 0, '', True, False, False, False, 0, None, False, 50, 1.0, 2.0, 'a painting in', 'style', 'picture frame, portrait photo', None) {}
Traceback (most recent call last):
  File "/home/jaggz/sd-web/modules/call_queue.py", line 56, in f
    res = list(func(*args, **kwargs))
  File "/home/jaggz/sd-web/modules/call_queue.py", line 37, in f
    res = func(*args, **kwargs)
  File "/home/jaggz/sd-web/modules/txt2img.py", line 56, in txt2img
    processed = process_images(p)
  File "/home/jaggz/sd-web/modules/processing.py", line 503, in process_images
    res = process_images_inner(p)
  File "/home/jaggz/sd-web/modules/processing.py", line 653, 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 "/home/jaggz/sd-web/modules/processing.py", line 869, in sample
    samples = self.sampler.sample(self, x, conditioning, unconditional_conditioning, image_conditioning=self.txt2img_image_conditioning(x))
  File "/home/jaggz/sd-web/modules/sd_samplers_kdiffusion.py", line 358, in sample
    samples = self.launch_sampling(steps, lambda: self.func(self.model_wrap_cfg, x, extra_args={
  File "/home/jaggz/sd-web/modules/sd_samplers_kdiffusion.py", line 234, in launch_sampling
    return func()
  File "/home/jaggz/sd-web/modules/sd_samplers_kdiffusion.py", line 358, in <lambda>
    samples = self.launch_sampling(steps, lambda: self.func(self.model_wrap_cfg, x, extra_args={
  File "/home/jaggz/sd-web/venv/lib/python3.9/site-packages/torch/autograd/grad_mode.py", line 34, in decorate_context
    return func(*args, **kwargs)
  File "/home/jaggz/sd-web/repositories/k-diffusion/k_diffusion/sampling.py", line 145, in sample_euler_ancestral
    denoised = model(x, sigmas[i] * s_in, **extra_args)
  File "/home/jaggz/sd-web/venv/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1480, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/jaggz/sd-web/modules/sd_samplers_kdiffusion.py", line 132, in forward
    x_out[a:b] = self.inner_model(x_in[a:b], sigma_in[a:b], cond=make_condition_dict([cond_in[a:b]], image_cond_in[a:b]))
  File "/home/jaggz/sd-web/venv/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1480, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/jaggz/sd-web/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 "/home/jaggz/sd-web/repositories/k-diffusion/k_diffusion/external.py", line 138, in get_eps
    return self.inner_model.apply_model(*args, **kwargs)
  File "/home/jaggz/sd-web/modules/sd_hijack_utils.py", line 17, in <lambda>
    setattr(resolved_obj, func_path[-1], lambda *args, **kwargs: self(*args, **kwargs))
  File "/home/jaggz/sd-web/modules/sd_hijack_utils.py", line 28, in __call__
    return self.__orig_func(*args, **kwargs)
  File "/home/jaggz/sd-web/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/jaggz/sd-web/venv/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1517, in _call_impl
    result = forward_call(*args, **kwargs)
  File "/home/jaggz/sd-web/repositories/stable-diffusion-stability-ai/ldm/models/diffusion/ddpm.py", line 1335, in forward
    out = self.diffusion_model(x, t, context=cc)
  File "/home/jaggz/sd-web/venv/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1480, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/jaggz/sd-web/repositories/stable-diffusion-stability-ai/ldm/modules/diffusionmodules/openaimodel.py", line 797, in forward
    h = module(h, emb, context)
  File "/home/jaggz/sd-web/venv/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1480, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/jaggz/sd-web/repositories/stable-diffusion-stability-ai/ldm/modules/diffusionmodules/openaimodel.py", line 86, in forward
    x = layer(x)
  File "/home/jaggz/sd-web/venv/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1480, in _call_impl
    return forward_call(*args, **kwargs)
  File "/home/jaggz/sd-web/extensions-builtin/Lora/lora.py", line 319, in lora_Conv2d_forward
    return torch.nn.Conv2d_forward_before_lora(self, input)
  File "/home/jaggz/sd-web/venv/lib/python3.9/site-packages/torch/nn/modules/conv.py", line 463, in forward
    return self._conv_forward(input, self.weight, self.bias)
  File "/home/jaggz/sd-web/venv/lib/python3.9/site-packages/torch/nn/modules/conv.py", line 459, in _conv_forward
    return F.conv2d(input, weight, bias, self.stride,
RuntimeError: cuDNN error: CUDNN_STATUS_NOT_INITIALIZED
```


### Additional information

I'm using a Nvidia K80, which requires older drivers/cuda.
NVIDIA-SMI 470.161.03 Driver Version: 470.161.03 CUDA Version: 11.4