忿忿的泥巴坨 发表于 3 天前

求救:webui-forge可以正常启动,但是启动后出图提示:RuntimeError: CUDA

webui-forge被本身玩坏了,安装了什么插件后就一直无法出图,提示如下:
RuntimeError: CUDA error: no kernel image is available for execution on the device
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions
在界面做任务操纵都是上面的提示。
这是启动提示:
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49)
Version: f2.0.1v1.10.1-previous-564-g77464215
Commit hash: 77464215c3bb9225deec13a3049a7289e18c5eeb
Launching Web UI with arguments:
Total VRAM 2048 MB, total RAM 12175 MB
pytorch version: 2.3.1+cu121
xformers version: 0.0.27
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce 940MX : native
VAE dtype preferences: -> torch.float32
CUDA Using Stream: False
F:\webui_forge_cu121_torch231\system\python\lib\site-packages\transformers\utils\hub.py:127: FutureWarning: Using `TRANSFORMERS_CACHE` is deprecated and will be removed in v5 of Transformers. Use `HF_HOME` instead.
  warnings.warn(
Using xformers cross attention
Using xformers attention for VAE
ControlNet preprocessor location: F:\webui_forge_cu121_torch231\webui\models\ControlNetPreprocessor
Loading additional modules ... done.
2024-10-18 11:48:57,898 - ControlNet - INFO - ControlNet UI callback registered.
Model selected: {'checkpoint_info': {'filename': 'F:\\webui_forge_cu121_torch231\\webui\\models\\Stable-diffusion\\anything-v5-PrtRE.safetensors', 'hash': '893e49b9'}, 'additional_modules': ['F:\\webui_forge_cu121_torch231\\webui\\models\\VAE\\vae-ft-mse-840000-ema-pruned.safetensors'], 'unet_storage_dtype': None}
Using online LoRAs in FP16: False
Running on local URL:  http://127.0.0.1:7860
出图提示:
To create a public link, set `share=True` in `launch()`.
Startup time: 35.0s (prepare environment: 5.5s, import torch: 11.8s, initialize shared: 0.3s, other imports: 0.7s, list SD models: 0.7s, load scripts: 3.3s, initialize google blockly: 6.8s, create ui: 3.9s, gradio launch: 1.9s).
Environment vars changed: {'stream': False, 'inference_memory': 1024.0, 'pin_shared_memory': False}
You will use 49.98% GPU memory (1023.00 MB) to load weights, and use 50.02% GPU memory (1024.00 MB) to do matrix computation.
Loading Model: {'checkpoint_info': {'filename': 'F:\\webui_forge_cu121_torch231\\webui\\models\\Stable-diffusion\\anything-v5-PrtRE.safetensors', 'hash': '893e49b9'}, 'additional_modules': ['F:\\webui_forge_cu121_torch231\\webui\\models\\VAE\\vae-ft-mse-840000-ema-pruned.safetensors'], 'unet_storage_dtype': None}
Trying to free all memory for cuda:0 with 0 models keep loaded ... Done.
StateDict Keys: {'unet': 686, 'vae': 250, 'text_encoder': 197, 'ignore': 0}
F:\webui_forge_cu121_torch231\system\python\lib\site-packages\transformers\tokenization_utils_base.py:1601: FutureWarning: `clean_up_tokenization_spaces` was not set. It will be set to `True` by default. This behavior will be depracted in transformers v4.45, and will be then set to `False` by default. For more details check this issue: https://github.com/huggingface/transformers/issues/31884
  warnings.warn(
Working with z of shape (1, 4, 32, 32) = 4096 dimensions.
IntegratedAutoencoderKL Unexpected: ['model_ema.decay', 'model_ema.num_updates']
K-Model Created: {'storage_dtype': torch.bfloat16, 'computation_dtype': torch.float32}
Model loaded in 4.3s (unload existing model: 0.2s, forge model load: 4.1s).
All loaded to GPU.
Moving model(s) has taken 0.01 seconds
Trying to free 3155.23 MB for cuda:0 with 0 models keep loaded ... Current free memory is 1667.18 MB ... Done.
Target: KModel, Free GPU: 1667.18 MB, Model Require: 1639.41 MB, Previously Loaded: 0.00 MB, Inference Require: 1024.00 MB, Remaining: -996.23 MB, CPU Swap Loaded (blocked method): 1147.66 MB, GPU Loaded: 491.75 MB
Moving model(s) has taken 0.71 seconds
  0%|                                                                                           | 0/20
----------------------
Your current GPU free memory is 1172.73 MB for this diffusion iteration.
This number is lower than the safe value of 1536.00 MB.
If you continue, you may cause NVIDIA GPU performance degradation for this diffusion process, and the speed may be extremely slow (about 10x slower).
To solve the problem, you can set the 'GPU Weights' (on the top of page) to a lower value.
If you cannot find 'GPU Weights', you can click the 'all' option in the 'UI' area on the left-top corner of the webpage.
If you want to take the risk of NVIDIA GPU fallback and test the 10x slower speed, you can (but are highly not recommended to) add '--disable-gpu-warning' to CMD flags to remove this warning.
----------------------

  0%|                                                                                           | 0/20
Traceback (most recent call last):
  File "F:\webui_forge_cu121_torch231\webui\modules_forge\main_thread.py", line 30, in work
    self.result = self.func(*self.args, **self.kwargs)
  File "F:\webui_forge_cu121_torch231\webui\modules\txt2img.py", line 123, in txt2img_function
    processed = processing.process_images(p)
  File "F:\webui_forge_cu121_torch231\webui\modules\processing.py", line 850, in process_images
    res = process_images_inner(p)
  File "F:\webui_forge_cu121_torch231\webui\modules\processing.py", line 1007, 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 "F:\webui_forge_cu121_torch231\webui\modules\processing.py", line 1384, in sample
    samples = self.sampler.sample(self, x, conditioning, unconditional_conditioning, image_conditioning=self.txt2img_image_conditioning(x))
  File "F:\webui_forge_cu121_torch231\webui\modules\sd_samplers_kdiffusion.py", line 238, 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 "F:\webui_forge_cu121_torch231\webui\modules\sd_samplers_common.py", line 272, in launch_sampling
    return func()
  File "F:\webui_forge_cu121_torch231\webui\modules\sd_samplers_kdiffusion.py", line 238, 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 "F:\webui_forge_cu121_torch231\system\python\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
    return func(*args, **kwargs)
  File "F:\webui_forge_cu121_torch231\webui\k_diffusion\sampling.py", line 146, in sample_euler_ancestral
    denoised = model(x, sigmas * s_in, **extra_args)
  File "F:\webui_forge_cu121_torch231\system\python\lib\site-packages\torch\nn\modules\module.py", line 1532, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "F:\webui_forge_cu121_torch231\system\python\lib\site-packages\torch\nn\modules\module.py", line 1541, in _call_impl
    return forward_call(*args, **kwargs)
  File "F:\webui_forge_cu121_torch231\webui\modules\sd_samplers_cfg_denoiser.py", line 199, in forward
    denoised, cond_pred, uncond_pred = sampling_function(self, denoiser_params=denoiser_params, cond_scale=cond_scale, cond_composition=cond_composition)
  File "F:\webui_forge_cu121_torch231\webui\backend\sampling\sampling_function.py", line 362, in sampling_function
    denoised, cond_pred, uncond_pred = sampling_function_inner(model, x, timestep, uncond, cond, cond_scale, model_options, seed, return_full=True)
  File "F:\webui_forge_cu121_torch231\webui\backend\sampling\sampling_function.py", line 303, in sampling_function_inner
    cond_pred, uncond_pred = calc_cond_uncond_batch(model, cond, uncond_, x, timestep, model_options)
  File "F:\webui_forge_cu121_torch231\webui\backend\sampling\sampling_function.py", line 273, in calc_cond_uncond_batch
    output = model.apply_model(input_x, timestep_, **c).chunk(batch_chunks)
  File "F:\webui_forge_cu121_torch231\webui\backend\modules\k_model.py", line 45, in apply_model
    model_output = self.diffusion_model(xc, t, context=context, control=control, transformer_options=transformer_options, **extra_conds).float()
  File "F:\webui_forge_cu121_torch231\system\python\lib\site-packages\torch\nn\modules\module.py", line 1532, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "F:\webui_forge_cu121_torch231\system\python\lib\site-packages\torch\nn\modules\module.py", line 1541, in _call_impl
    return forward_call(*args, **kwargs)
  File "F:\webui_forge_cu121_torch231\webui\backend\nn\unet.py", line 713, in forward
    h = module(h, emb, context, transformer_options)
  File "F:\webui_forge_cu121_torch231\system\python\lib\site-packages\torch\nn\modules\module.py", line 1532, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "F:\webui_forge_cu121_torch231\system\python\lib\site-packages\torch\nn\modules\module.py", line 1541, in _call_impl
    return forward_call(*args, **kwargs)
  File "F:\webui_forge_cu121_torch231\webui\backend\nn\unet.py", line 83, in forward
    x = layer(x, context, transformer_options)
  File "F:\webui_forge_cu121_torch231\system\python\lib\site-packages\torch\nn\modules\module.py", line 1532, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "F:\webui_forge_cu121_torch231\system\python\lib\site-packages\torch\nn\modules\module.py", line 1541, in _call_impl
    return forward_call(*args, **kwargs)
  File "F:\webui_forge_cu121_torch231\webui\backend\nn\unet.py", line 321, in forward
    x = block(x, context=context, transformer_options=transformer_options)
  File "F:\webui_forge_cu121_torch231\system\python\lib\site-packages\torch\nn\modules\module.py", line 1532, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "F:\webui_forge_cu121_torch231\system\python\lib\site-packages\torch\nn\modules\module.py", line 1541, in _call_impl
    return forward_call(*args, **kwargs)
  File "F:\webui_forge_cu121_torch231\webui\backend\nn\unet.py", line 181, in forward
    return checkpoint(self._forward, (x, context, transformer_options), None, self.checkpoint)
  File "F:\webui_forge_cu121_torch231\webui\backend\nn\unet.py", line 12, in checkpoint
    return f(*args)
  File "F:\webui_forge_cu121_torch231\webui\backend\nn\unet.py", line 235, in _forward
    n = self.attn1(n, context=context_attn1, value=value_attn1, transformer_options=extra_options)
  File "F:\webui_forge_cu121_torch231\system\python\lib\site-packages\torch\nn\modules\module.py", line 1532, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
  File "F:\webui_forge_cu121_torch231\system\python\lib\site-packages\torch\nn\modules\module.py", line 1541, in _call_impl
    return forward_call(*args, **kwargs)
  File "F:\webui_forge_cu121_torch231\webui\backend\nn\unet.py", line 154, in forward
    out = attention_function(q, k, v, self.heads, mask)
  File "F:\webui_forge_cu121_torch231\webui\backend\attention.py", line 307, in attention_xformers
    out = xformers.ops.memory_efficient_attention(q, k, v, attn_bias=mask)
  File "F:\webui_forge_cu121_torch231\system\python\lib\site-packages\xformers\ops\fmha\__init__.py", line 276, in memory_efficient_attention
    return _memory_efficient_attention(
  File "F:\webui_forge_cu121_torch231\system\python\lib\site-packages\xformers\ops\fmha\__init__.py", line 395, in _memory_efficient_attention
    return _memory_efficient_attention_forward(
  File "F:\webui_forge_cu121_torch231\system\python\lib\site-packages\xformers\ops\fmha\__init__.py", line 418, in _memory_efficient_attention_forward
    out, *_ = op.apply(inp, needs_gradient=False)
  File "F:\webui_forge_cu121_torch231\system\python\lib\site-packages\xformers\ops\fmha\cutlass.py", line 217, in apply
    return cls.apply_bmhk(inp, needs_gradient=needs_gradient)
  File "F:\webui_forge_cu121_torch231\system\python\lib\site-packages\xformers\ops\fmha\cutlass.py", line 281, in apply_bmhk
    out, lse, rng_seed, rng_offset, _, _ = cls.OPERATOR(
  File "F:\webui_forge_cu121_torch231\system\python\lib\site-packages\torch\_ops.py", line 854, in __call__
    return self_._op(*args, **(kwargs or {}))
RuntimeError: CUDA error: no kernel image is available for execution on the device
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.
CUDA error: no kernel image is available for execution on the device
CUDA kernel errors might be asynchronously reported at some other API call, so the stacktrace below might be incorrect.
For debugging consider passing CUDA_LAUNCH_BLOCKING=1.
Compile with `TORCH_USE_CUDA_DSA` to enable device-side assertions.

免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
页: [1]
查看完整版本: 求救:webui-forge可以正常启动,但是启动后出图提示:RuntimeError: CUDA