首页 > 其他分享 >SD 手动安装-conda版本

SD 手动安装-conda版本

时间:2023-08-03 12:33:57浏览次数:33  
标签:opt -- 手动 optimization conda memory VRAM .-- SD

git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
  1. 使用git克隆项目
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
  1. 切换到克隆目录
cd stable-diffusion-webui
  1. 再目录中初始化conda环境
# Create environment
conda create -n StableDiffusion python=3.10.6
# Activate environment
conda activate StableDiffusion
  1. 查看环境列表,确认创建成功
# Validate environment is selected
conda env list
  1. 启动webui
webui-user.bat
# Wait for "Running on local URL:  http://127.0.0.1:7860" and open that URI.
  1. 效果图

SD 手动安装-conda版本_github

SD 手动安装-conda版本_ci_02

  1. 附录

commandline argument

explanation

--opt-sdp-attention

May results in faster speeds than using xFormers on some systems but requires more VRAM. (non-deterministic)

--opt-sdp-no-mem-attention

May results in faster speeds than using xFormers on some systems but requires more VRAM. (deterministic, slightly slower than --opt-sdp-attention and uses more VRAM)

--xformers

Use xFormers library. Great improvement to memory consumption and speed. Nvidia GPUs only. (non-deterministic)

--force-enable-xformers

Enables xFormers regardless of whether the program thinks you can run it or not. Do not report bugs you get running this.

--opt-split-attention

Cross attention layer optimization significantly reducing memory use for almost no cost (some report improved performance with it). Black magic.

On by default for torch.cuda, which includes both NVidia and AMD cards.

--disable-opt-split-attention

Disables the optimization above.

--opt-sub-quad-attention

Sub-quadratic attention, a memory efficient Cross Attention layer optimization that can significantly reduce required memory, sometimes at a slight performance cost. Recommended if getting poor performance or failed generations with a hardware/software configuration that xFormers doesn't work for. On macOS, this will also allow for generation of larger images.

--opt-split-attention-v1

Uses an older version of the optimization above that is not as memory hungry (it will use less VRAM, but will be more limiting in the maximum size of pictures you can make).

--medvram

Makes the Stable Diffusion model consume less VRAM by splitting it into three parts - cond (for transforming text into numerical representation), first_stage (for converting a picture into latent space and back), and unet (for actual denoising of latent space) and making it so that only one is in VRAM at all times, sending others to CPU RAM. Lowers performance, but only by a bit - except if live previews are enabled.

--lowvram

An even more thorough optimization of the above, splitting unet into many modules, and only one module is kept in VRAM. Devastating for performance.

*do-not-batch-cond-uncond

Prevents batching of positive and negative prompts during sampling, which essentially lets you run at 0.5 batch size, saving a lot of memory. Decreases performance. Not a command line option, but an optimization implicitly enabled by using --medvram or --lowvram.

--always-batch-cond-uncond

Disables the optimization above. Only makes sense together with --medvram or --lowvram

--opt-channelslast

Changes torch memory type for stable diffusion to channels last. Effects not closely studied.

--upcast-sampling

For Nvidia and AMD cards normally forced to run with --no-halfshould improve generation speed.

标签:opt,--,手动,optimization,conda,memory,VRAM,.--,SD
From: https://blog.51cto.com/u_7531292/6947999

相关文章

  • 手动封装callES6
     目录前言导语 代码部分总结前言我是歌谣我有个兄弟巅峰的时候排名c站总榜19叫前端小歌谣曾经我花了三年的时间创作了他现在我要用五年的时间超越他今天又是接近兄弟的一天人生难免坎坷大不了从头再来歌谣的意志是永恒的放弃很容易但是坚持一定很酷导语手动封装callES6......
  • LinphoneSDK v 5.2.94 使用方法
    前提vs2022 wpfLinphoneSDK的获取途径有两种1 下载 linphonesdk.5.2.94.nupkghttps://gitlab.linphone.org/BC/public/linphone-sdk/-/packages/然后引用 这里是没有dll的,只是引用了LinphoneWrapper.cs2 下载zip包https://download.linphone.org/releases/windows/sd......
  • 问chatgpt:java或者三方jar包,bean属性复制的,但是两个字段的名称不一致,有没有这样的方
    是的,Java中有一些库和框架可以实现对象属性的复制和映射,而无需手动编写getter和setter方法。其中比较常用的是ApacheCommonsBeanUtils和SpringFramework的BeanUtils。使用ApacheCommonsBeanUtils,你可以使用copyProperties方法来复制对象属性。示例代码如下:点击查......
  • SD-WebUI安装的时候的小波折
    1.外面与里面不一样 小小的眼睛大大的疑惑.jpg进到stable-diffusion-webui选中venv点击Delete后运行webui.bat就会重新创建了(没有这个文件夹就是没有虚拟环境,要还有错就继续找么(;´д`)ゞ)配置:SD-WebUI的.bat脚本报版本不对,外部查看是对的这种情况是因为python有个东西:venv......
  • 当编译器没有SetProcessDpiAwareness()这个函数时...
    #include<Shlobj.h>intsetdpi(){//定义一个函数指针类型typedefHRESULT(WINAPI*SetProcessDpiAwarenessFunc)(intvalue);//加载Shcore.dllHMODULEhModule=LoadLibrary("Shcore.dll");if(hModule==NULL){//加载失败......
  • 音视频SDK对比|在线K歌APP技术正版曲库技术选型
    摘要在线K歌软件的开发有许多技术难点,需考虑到音频录制和处理、实时音频传输和同步、音频压缩和解压缩、设备兼容性问题等技术难点外,此外,开发者还应关注音乐版权问题,确保开发的应用合规合法。前言前面写了几期关于直播SDK技术选型的文章,主要是从RTC实时音视频、超低延迟直播、CDN......
  • 音视频SDK对比|K歌App中的实时合唱功能如何进行技术选型
    摘要在线K歌软件的开发有许多技术难点,需考虑到音频录制和处理、实时音频传输和同步、音频压缩和解压缩、设备兼容性问题等技术难点外,此外,开发者还应关注音乐版权问题,确保开发的应用合规合法。前言前面写了几期关于直播SDK技术选型的文章,主要是从RTC实时音视频、超低延迟直播......
  • 高通SDM450核心板4G安卓智能模块_高通开发板方案定制
    高通SDM450安卓核心板是工业级高性能,可运行android9.0操作系统的4G智能模块。高通SDM4504G核心板采用台积电14nmFinFET制程工艺,8*Cortex-A53架构,搭载Android9.0操作系统,主频最高达1.8GHz。高通SDM450安卓核心板基本概述:高通SDM450安卓核心板是一款基于高通平台、工业级......
  • GaussDB技术解读系列之SQL Audit,面向应用开发的SQL审核工具
    本文分享自华为云社区《​​GaussDB技术解读系列之SQLAudit,面向应用开发的SQL审核工具》​​,作者:华为云数据库和应用迁移专家。前言我们先从一个SQL语句说起(以某传统单机数据库为例)。也许这就是我们业务代码中潜藏的一个SQL语句,对于一个普通开发者来说,这个语句编写工整,逻辑清......
  • dnsdomainname
    dnsdomainname定义DNS系统中FQDN名称的域名补充说明dnsdomainname命令用于定义DNS系统中FQDN名称中的域名。语法dnsdomainname(选项)选项-v:详细信息模式,输出指令执行的详细信息。实例[root@AY1307311912260196fcZ~]#dnsdomainname-vgethostname()=`AY130731191226......