Stable Diffusion WebUI rtx 2060 6G 高清修复 爆显存torch.cuda.OutOfMemoryError: CUDA out of memory.

这篇具有很好参考价值的文章主要介绍了Stable Diffusion WebUI rtx 2060 6G 高清修复 爆显存torch.cuda.OutOfMemoryError: CUDA out of memory.。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

故障日志

*** Arguments: ('task(9bknuv75x8gvtjn)', '1girl,3d,architecture,blurry,blurry background,breasts,brown hair,building,cherry blossoms,city,cityscape,cosplay photo,cowboy shot,day,depth of field,east asian architecture,flower,lips,long hair,looking at viewer,medium breasts,midriff,motion blur,navel,outdoors,photo \\(medium\\),photo background,pink flower,scrunchie,shirt,shorts,skyscraper,solo,street,tree,white shirt,best quality,ultra high res,(photorealistic:1.4),1girl,<lora:styleJelly_v10:1> ', 'paintings,sketches,(worst quality:2),(low quality:2),(normal quality:2),lowres,normal quality,((monochrome)),((grayscale)),skin spots,acnes,skin blemishes,age spot,glans,{{{bad_hands}}},badhand,bad_feet,', [], 30, 17, False, False, 1, 1, 7, -1.0, -1.0, 0, 0, 0, False, 512, 300, True, 0.7, 2, 'Latent', 0, 0, 0, 0, '', '', [], 0, <scripts.controlnet_ui.controlnet_ui_group.UiControlNetUnit object at 0x7fde10debb50>, False, False, 0, None, [], 0, False, [], [], False, 0, 1, False, False, 0, None, [], -2, False, [], False, 0, None, None, False, False, 'positive', 'comma', 0, False, False, '', 1, '', [], 0, '', [], 0, '', [], True, False, False, False, 0, None, None, False, 50) {}
    Traceback (most recent call last):
      File "/home/yeqiang/Downloads/ai/stable-diffusion-webui/modules/call_queue.py", line 55, in f
        res = list(func(*args, **kwargs))
      File "/home/yeqiang/Downloads/ai/stable-diffusion-webui/modules/call_queue.py", line 35, in f
        res = func(*args, **kwargs)
      File "/home/yeqiang/Downloads/ai/stable-diffusion-webui/modules/txt2img.py", line 57, in txt2img
        processed = processing.process_images(p)
      File "/home/yeqiang/Downloads/ai/stable-diffusion-webui/modules/processing.py", line 620, in process_images
        res = process_images_inner(p)
      File "/home/yeqiang/Downloads/ai/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/yeqiang/Downloads/ai/stable-diffusion-webui/modules/processing.py", line 741, in process_images_inner
        x_samples_ddim = [decode_first_stage(p.sd_model, samples_ddim[i:i+1].to(dtype=devices.dtype_vae))[0].cpu() for i in range(samples_ddim.size(0))]
      File "/home/yeqiang/Downloads/ai/stable-diffusion-webui/modules/processing.py", line 741, in <listcomp>
        x_samples_ddim = [decode_first_stage(p.sd_model, samples_ddim[i:i+1].to(dtype=devices.dtype_vae))[0].cpu() for i in range(samples_ddim.size(0))]
      File "/home/yeqiang/Downloads/ai/stable-diffusion-webui/modules/processing.py", line 525, in decode_first_stage
        x = model.decode_first_stage(x)
      File "/home/yeqiang/Downloads/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 "/home/yeqiang/Downloads/ai/stable-diffusion-webui/modules/sd_hijack_utils.py", line 28, in __call__
        return self.__orig_func(*args, **kwargs)
      File "/home/yeqiang/Downloads/ai/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
        return func(*args, **kwargs)
      File "/home/yeqiang/Downloads/ai/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/models/diffusion/ddpm.py", line 826, in decode_first_stage
        return self.first_stage_model.decode(z)
      File "/home/yeqiang/Downloads/ai/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/models/autoencoder.py", line 90, in decode
        dec = self.decoder(z)
      File "/home/yeqiang/Downloads/ai/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/yeqiang/Downloads/ai/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/modules/diffusionmodules/model.py", line 641, in forward
        h = self.up[i_level].upsample(h)
      File "/home/yeqiang/Downloads/ai/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/yeqiang/Downloads/ai/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/modules/diffusionmodules/model.py", line 64, in forward
        x = self.conv(x)
      File "/home/yeqiang/Downloads/ai/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/yeqiang/Downloads/ai/stable-diffusion-webui/extensions-builtin/Lora/lora.py", line 415, in lora_Conv2d_forward
        return torch.nn.Conv2d_forward_before_lora(self, input)
      File "/home/yeqiang/Downloads/ai/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/conv.py", line 463, in forward
        return self._conv_forward(input, self.weight, self.bias)
      File "/home/yeqiang/Downloads/ai/stable-diffusion-webui/venv/lib/python3.10/site-packages/torch/nn/modules/conv.py", line 459, in _conv_forward
        return F.conv2d(input, weight, bias, self.stride,
    torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 150.00 MiB (GPU 0; 5.79 GiB total capacity; 4.14 GiB already allocated; 130.62 MiB free; 4.25 GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid fragmentation.  See documentation for Memory Management and PYTORCH_CUDA_ALLOC_CONF

零食解决办法,重启webui.sh进程,重新执行生成图片

stable diffusion torch.cuda.outofmemoryerror: cuda out of memory.,stable diffusion,ai,stable diffusion,ai

日志

^CInterrupted with signal 2 in <frame at 0x5573c3eeeb50, file '/home/yeqiang/miniconda3/envs/stable-diffusion-webui/lib/python3.10/threading.py', line 324, code wait>
yeqiang@yeqiang-MS-7B23:~/Downloads/ai/stable-diffusion-webui$ ./webui.sh 

################################################################
Install script for stable-diffusion + Web UI
Tested on Debian 11 (Bullseye)
################################################################

################################################################
Running on yeqiang user
################################################################

################################################################
Repo already cloned, using it as install directory
################################################################

################################################################
Create and activate python venv
################################################################

################################################################
Launching launch.py...
################################################################
Using TCMalloc: libtcmalloc_minimal.so.4
Python 3.10.6 | packaged by conda-forge | (main, Aug 22 2022, 20:36:39) [GCC 10.4.0]
Version: v1.4.0
Commit hash: 394ffa7b0a7fff3ec484bcd084e673a8b301ccc8
Installing requirements




Launching Web UI with arguments: 
No module 'xformers'. Proceeding without it.
2023-07-10 08:54:22,210 - ControlNet - INFO - ControlNet v1.1.231
ControlNet preprocessor location: /home/yeqiang/Downloads/ai/stable-diffusion-webui/extensions/sd-webui-controlnet/annotator/downloads
2023-07-10 08:54:22,275 - ControlNet - INFO - ControlNet v1.1.231
sd-webui-prompt-all-in-one background API service started successfully.
Loading weights [7234b76e42] from /home/yeqiang/Downloads/ai/stable-diffusion-webui/models/Stable-diffusion/chilloutmix_Ni.safetensors
preload_extensions_git_metadata for 13 extensions took 0.34s
Creating model from config: /home/yeqiang/Downloads/ai/stable-diffusion-webui/configs/v1-inference.yaml
LatentDiffusion: Running in eps-prediction mode
DiffusionWrapper has 859.52 M params.
Applying attention optimization: Doggettx... done.
Textual inversion embeddings loaded(0): 
Model loaded in 2.2s (load weights from disk: 0.8s, create model: 0.5s, apply weights to model: 0.4s, apply half(): 0.3s, move model to device: 0.2s).
Running on local URL:  http://127.0.0.1:7860

To create a public link, set `share=True` in `launch()`.
Startup time: 8.2s (import torch: 0.8s, import gradio: 0.7s, import ldm: 0.3s, other imports: 0.4s, load scripts: 3.2s, create ui: 0.4s, gradio launch: 2.3s).
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 30/30 [00:09<00:00,  3.22it/s]
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 30/30 [00:38<00:00,  1.29s/it]
Total progress: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 60/60 [00:52<00:00,  1.14it/s]
Total progress: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 60/60 [00:52<00:00,  1.27s/it]

 

确实清晰不少 

stable diffusion torch.cuda.outofmemoryerror: cuda out of memory.,stable diffusion,ai,stable diffusion,ai文章来源地址https://www.toymoban.com/news/detail-764693.html

到了这里,关于Stable Diffusion WebUI rtx 2060 6G 高清修复 爆显存torch.cuda.OutOfMemoryError: CUDA out of memory.的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 【AI】RTX2060 6G Ubuntu 22.04.1 LTS (Jammy Jellyfish) 部署Chinese-LLaMA-Alpaca-2

    下载源码 创建venv 安装依赖 已安装依赖列表 下载编译llama.cpp 编译成功 创建软链接 下载模型 由于只有6G显存,只下载基础的对话模型chinese-alpaca-2-1.3b 浏览器打开地址:hfl/chinese-alpaca-2-1.3b at main 放到~/Downloads/ai 目录下 启动chat报错 继续折腾: 这两个文件需要手动在浏览器内

    2024年01月18日
    浏览(77)
  • 【AI】RTX2060 6G Ubuntu 22.04.1 LTS (Jammy Jellyfish) 部署chatglm2-6b 开源中英双语对话模型

    项目地址 chatglm2-6b 下载模型 创建测试项目 创建虚拟环境安装依赖 完整的venv环境 main.py 执行 python进程cpu使用率100.3%持续了很长时间,没有启用多线程?

    2024年01月20日
    浏览(39)
  • 【AI】RTX2060 6G Ubuntu 22.04.1 LTS (Jammy Jellyfish) 部署Chinese-LLaMA-Alpaca-2 【2】启用GPU支持

    接上篇 【AI】RTX2060 6G Ubuntu 22.04.1 LTS (Jammy Jellyfish) 部署Chinese-LLaMA-Alpaca-2-CSDN博客 前面的实验,chat.sh确认是运行在CPU模式下,未启用GPU支持 重新编译llama.cpp 故障:nvcc fatal   : Value \\\'native\\\' is not defined for option \\\'gpu-architecture\\\' 查看gpu-arch 修改Makefile,调整MK_NVCCFLAGS差异如下  yeqia

    2024年01月23日
    浏览(36)
  • 4G显存玩转AI绘画!Stable Diffusion WebUI Forge来了!

    经常使用Stable Diffusion WebUI的同学可能都被显存的问题困扰过,其运行时需要巨大的显存空间,跑着跑着显存可能就爆了,不得不重新启动。不过现在这个问题解决了,因为Stable Diffusion WebUI Forge来了。 相较于原版的SD WebUI(针对1024像素分辨率下的SDXL图片生成),可以获取以下

    2024年04月29日
    浏览(34)
  • Stable Diffusion高清修复老照片-图生图

    修复老照片的意义就不多说了,相信大家都明白,这里直接开讲方法。 1、原理 这个方法需要一个真实模型,以便让修复的照片看起来比较真实,我这里选择:realisticVisionV20,大家有更好的给我推荐哦。 还需用搭配两个特殊设置: ControlNet Tile:这是一个ControlNet模型,用于放

    2024年02月14日
    浏览(29)
  • AI 绘画 | Stable Diffusion 高清修复、细节优化

    在 Stable Diffusion 想要生成高清分辨率的图片。在文生图的功能里,需要设置更大的宽度和高度。在图生图的功能里,需要设置更大的重绘尺寸或者重绘尺寸。但是设置完更大的图像分辨率,需要更大显存,1024*1024的至少要电脑的空余显存在8G以上。如显存不够,就会爆显存生

    2024年02月05日
    浏览(50)
  • stable diffusion实践操作-宽高设置以及高清修复

    stable diffusion实践操作 主要介绍SD的宽高设置以及高清修复 基础模型都是通过512 512的图像集训练的,所以我们采用SD1.5模型的时候,宽高不要超过512 512,否则,图像就会出现不可以控. 但是在实际工作中,我们需要更加高清图片怎么办,这就是本章的主要内容。 SD生成256 256图

    2024年02月10日
    浏览(33)
  • 〔009〕Stable Diffusion 之 老照片高清修复 篇

    在 AI 绘画出来后,飞兔小哥就一直思考它的商业出路,其中之一应用我觉得就是老照片修复 其实在 stable diffusion 中修复老照片,其实有很好的效果,根据目前其内置的功能,大概有三种可用的高清修复功能 而飞兔小哥也在社区开了相应的 AI 专栏,并将自己平时生成和修复处

    2024年02月11日
    浏览(39)
  • 〔AI 绘画〕Stable Diffusion 之 老照片高清修复 篇

    在 AI 绘画出来后,飞兔小哥就一直思考它的商业出路,其中之一应用我觉得就是老照片修复 其实在 stable diffusion 中修复老照片,其实有很好的效果,根据目前其内置的功能,大概有三种可用的高清修复功能 而飞兔小哥也在社区开了相应的 AI 专栏,并将自己平时生成和修复处

    2024年02月13日
    浏览(87)
  • Stable Diffusion - 真人照片的高清修复 (StableSR + GFPGAN) 最佳实践

    欢迎关注我的CSDN:https://spike.blog.csdn.net/ 本文地址:https://spike.blog.csdn.net/article/details/132032216 GFPGAN (Generative Facial Prior GAN) 算法,用于实现真实世界的盲脸恢复的算法,利用预训练的面部 GAN(如 StyleGAN2 )中封装的丰富和多样的先验信息,来修复低质量、模糊、噪声或者损坏的

    2024年02月14日
    浏览(37)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包