【stable-diffusion】4090显卡下dreambooth、lora、sd模型微调的GUI环境安装(cuda驱动、pytorch、xformer)

这篇具有很好参考价值的文章主要介绍了【stable-diffusion】4090显卡下dreambooth、lora、sd模型微调的GUI环境安装(cuda驱动、pytorch、xformer)。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

相关博文

  1. stable-diffusion-webui的基础功能手动安装,了解代码结构、依赖、模型出处

安装成功结果

【stable-diffusion】4090显卡下dreambooth、lora、sd模型微调的GUI环境安装(cuda驱动、pytorch、xformer)

主要参考

  • cuda11.7下载-https://developer.nvidia.com/cuda-toolkit-archive
  • cudnn8.6 for 11.x : https://developer.nvidia.com/rdp/cudnn-archive
  • dreambooth\lora 训练环境:
    • 最原始的命令端 https://github.com/kohya-ss/sd-scripts
    • GUI端口 https://github.com/bmaltais/kohya_ss
  • 环境安装参考:win11 系统 GPU版本pytorch、CUDA、anaconda 、pycharm详细安装教程

一、显卡驱动相关

驱动版本自带cuda 12.0 与pytorch不兼容

驱动要安装官网4090自带的:528.02 cuda12.0 (运维安装跳过)
【stable-diffusion】4090显卡下dreambooth、lora、sd模型微调的GUI环境安装(cuda驱动、pytorch、xformer)

pytorch 需要cuda12.0以下

自定义安装
【stable-diffusion】4090显卡下dreambooth、lora、sd模型微调的GUI环境安装(cuda驱动、pytorch、xformer)

取消安装驱动

【stable-diffusion】4090显卡下dreambooth、lora、sd模型微调的GUI环境安装(cuda驱动、pytorch、xformer)
明确安装位置,好添加到系统路径
【stable-diffusion】4090显卡下dreambooth、lora、sd模型微调的GUI环境安装(cuda驱动、pytorch、xformer)
安装成功和失败的
【stable-diffusion】4090显卡下dreambooth、lora、sd模型微调的GUI环境安装(cuda驱动、pytorch、xformer)

cudnn 下载与安装

  • https://developer.nvidia.com/rdp/cudnn-archive

改名放到cuda安装目录下,并添加到环境变量

根目录

C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\

结果
【stable-diffusion】4090显卡下dreambooth、lora、sd模型微调的GUI环境安装(cuda驱动、pytorch、xformer)

最终环境变量

肯定有些冗余
【stable-diffusion】4090显卡下dreambooth、lora、sd模型微调的GUI环境安装(cuda驱动、pytorch、xformer)

二、安装 python3.10 + pytorch

下载安装miniconda (python 3.10.9)

官网直接选择最新版本 : https://docs.conda.io/en/latest/miniconda.html
【stable-diffusion】4090显卡下dreambooth、lora、sd模型微调的GUI环境安装(cuda驱动、pytorch、xformer)

添加到系统环境

计算机—》属性—》高级系统设置----》环境变量—》系统变量—》path

根据自己位置改

D:\miniconda310\Scripts
D:\miniconda310

安装pytorch

  • https://pytorch.org/

配置pip的国内源并升级

pip config set global.index-url  https://mirror.baidu.com/pypi/simple
pip config set global.trusted-host mirror.baidu.com
python -m pip install --upgrade pip

查找对应的pytorch

lora dreambooth推荐的环境:https://github.com/bmaltais/kohya_ss/blob/master/setup.bat
【stable-diffusion】4090显卡下dreambooth、lora、sd模型微调的GUI环境安装(cuda驱动、pytorch、xformer)

pip install torch==1.13.1+cu117 torchvision==0.14.1+cu117 --extra-index-url https://download.pytorch.org/whl/cu117

需要15分钟左右时间
【stable-diffusion】4090显卡下dreambooth、lora、sd模型微调的GUI环境安装(cuda驱动、pytorch、xformer)

三、其他python依赖包

安装requirements

–upgrade使用最新版本的pip
进入 kohya_ss-master的位置

pip install --upgrade -r requirements.txt

【stable-diffusion】4090显卡下dreambooth、lora、sd模型微调的GUI环境安装(cuda驱动、pytorch、xformer)

ERROR: Cannot find command ‘git’ - do you have ‘git’ installed and in your PATH?

https://gitforwindows.org/

conda install git
git不是内部外部命令,添加到系统环境
  • https://www.cnblogs.com/ldq678/p/13287924.html
    找到自己的路径
    【stable-diffusion】4090显卡下dreambooth、lora、sd模型微调的GUI环境安装(cuda驱动、pytorch、xformer)

安装过程截图

开始安装
【stable-diffusion】4090显卡下dreambooth、lora、sd模型微调的GUI环境安装(cuda驱动、pytorch、xformer)
成功
【stable-diffusion】4090显卡下dreambooth、lora、sd模型微调的GUI环境安装(cuda驱动、pytorch、xformer)

安装 xformer

  • https://github.com/facebookresearch/xformers
conda install xformers -c xformers
or
pip install -U xformers

本项目特定环境安装(不然训练报错,必须装)

copy /y .\bitsandbytes_windows\*.dll D:\miniconda310\Lib\site-packages\bitsandbytes\
copy /y .\bitsandbytes_windows\cextension.py D:\miniconda310\Lib\site-packages\bitsandbytes\cextension.py
copy /y .\bitsandbytes_windows\main.py D:\miniconda310\Lib\site-packages\bitsandbytes\cuda_setup\main.py

accelerate config  

配置
【stable-diffusion】4090显卡下dreambooth、lora、sd模型微调的GUI环境安装(cuda驱动、pytorch、xformer)

erro 训练时报错 No model named ‘triton’

链接:https://pan.baidu.com/s/1shX-cU-R-0_gKhiTM0VXSw
提取码:6666

pip install triton-2.0.0-cp310-cp310-win_amd64.whl

四、启动训练界面

python D:\kohya_ss-master\kohya_gui.py

附录

本项目cudnn8.6 特殊安装

4090使用cudnn8.6能加速50%
【stable-diffusion】4090显卡下dreambooth、lora、sd模型微调的GUI环境安装(cuda驱动、pytorch、xformer)
下载后解压,放入文件夹
【stable-diffusion】4090显卡下dreambooth、lora、sd模型微调的GUI环境安装(cuda驱动、pytorch、xformer)

将cudnn保存到虚拟环境中

python D:\kohya_ss-master\tools\cudann_1.8_install.py

【stable-diffusion】4090显卡下dreambooth、lora、sd模型微调的GUI环境安装(cuda驱动、pytorch、xformer)文章来源地址https://www.toymoban.com/news/detail-464021.html

到了这里,关于【stable-diffusion】4090显卡下dreambooth、lora、sd模型微调的GUI环境安装(cuda驱动、pytorch、xformer)的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

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

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

相关文章

  • Stable-Diffusion|文生图 拍立得纪实风格的Lora 图例(三)

    最开始 Stable-Diffusion|window10安装GPU版本的 Stable-Diffusion-WebUI遇到的一些问题(一) 上篇【Stable-Diffusion|入门怎么下载与使用civitai网站的模型(二)】介绍了如何使用c站进行文生图,尤其一些Lora可能随时会下架,所以及时测试,及时保存很关键,更新一些笔者目前尝试比较有意

    2024年02月09日
    浏览(35)
  • AI 绘画Stable Diffusion 研究(十七)SD lora 详解(上)

    大家好,我是风雨无阻。 本期内容: Lora的原理是什么? Lora如何下载安装? Lora如何使用? 大家还记得 AI 绘画Stable Diffusion 研究(三)sd模型种类介绍及安装使用详解 这篇文章中,曾简单介绍了Lora的安装和使用吗 ? 但是我们并不清楚LORA 的原理是什么?以及使用过程中有什

    2024年02月10日
    浏览(27)
  • Stable-diffusion支持Intel和AMD显卡加速出图的操作方法

       英伟达的显卡有CUDA加持Stable diffusion出图很快,但我无奈家徒四壁,只有AMD老显卡苦苦支撑着本不富裕的家庭,但是生活还是继续不是。来吧!兄弟,看看老显卡能不能加速出图就完事了。    说明,我在MacOs上操作成功,同时我也加了windows上操作步骤 目录 第一步,安装

    2024年02月13日
    浏览(41)
  • Stable-diffusion支持Inter和AMD显卡加速出图的操作方法

       英伟达的显卡有CUDA加持Stable diffusion出图很快,但我无奈家徒四壁,只有AMD老显卡苦苦支撑着本不富裕的家庭,但是生活还是继续不是。来吧!兄弟,看看老显卡能不能加速出图就完事了。    说明,我在MacOs上操作成功,同时我也加了windows上操作步骤 目录 第一步,安装

    2024年02月08日
    浏览(68)
  • 关于Photoshop中的【Stable-Diffusion WEBUI】插件:Auto.Photoshop.SD.plugin

    本篇主要提到Photoshop中的Stable-Diffusion WEBUI插件,相对WEBUI并不算好用,但省得来回切换。 更多不断丰富的内容参考:🔗 《继续Stable-Diffusion WEBUI方方面面研究(内容索引)》 参考:https://github.com/AbdullahAlfaraj/Auto-Photoshop-StableDiffusion-Plugin 不能从WEBUI中直接安装,请选择从url安装吧

    2024年02月07日
    浏览(36)
  • 最详细的Ubuntu服务器搭建Stable-Diffusion教程(无显卡,仅用CPU)

    若已经安装过请忽略 下载最新的安装包 执行安装 一路回车,遇到选择就yes(切记要yes,不然要手动添加环境变量) 刷新环境 此时命令行输入python,看到是3.10版本的就对了 后续步骤可以用conda新建一个虚拟环境进行,我的服务器是临时的,所以就直接在base环境下进行了 执

    2023年04月24日
    浏览(28)
  • [Stable Diffusion]:WEBUI(SD)安装、常用模型(checkpoint、embedding、LORA)、提示词具、常用插件

    1. 安装Stable Diffusion Stable Diffusion的安装可能是第一步,但它绝对是重要的一步。以下是一些安装方式: ● AutoDL: AutoD镜像版本,现在维护到V16。镜像地址:AUTOMATIC1111/stable-diffusion-webui/tzwm_sd_webui_A1111。webui 1.6.0 整合版,支持 SDXL,一键启动,带视频教程。预置 ControlNet v1

    2024年02月04日
    浏览(36)
  • (十六) AIGC、AI绘画、SD-WebUI、本地部署、Stable-Diffusion本地模型、最新Controlnet扩展

    1、简介 AI绘画的工具网站很多,大部分收费/限制数量,而且速度很慢,如果部署本地的模型,不仅免费无限制、还可以提高出图效率,随意生成自己想象中的图,部署中发现有各种各样的环境配置问题,无法正确运行。 本博整理了SD-WebUI的整合包(Windows环境下),包括启动器

    2024年02月13日
    浏览(45)
  • [Stable Diffusion]ip-adapter:SD也可以垫图了,一张图复刻lora效果

    Controlnet更新的v1.1.4版本新预处理ip-adapter,这项新能力简直让stablediffusion的实用性再上一个台阶。这些更新将改变sd的使用流程。   ip-adapter是腾讯Ai工作室发布的一个controlnet模型,可以通过stable diffusion的webui使用,这个新的功能简单来说,他可以识别参考图的艺术风格和内容

    2024年02月04日
    浏览(32)
  • 【stable diffusion】图片批量自动打标签、标签批量修改(BLIP、wd14)用于训练SD或者LORA模型

    B站教学视频【:AI绘画】新手向!Lora训练!训练集准备、tag心得、批量编辑、正则化准备】 官方教程:https://github.com/darkstorm2150/sd-scripts/blob/main/docs/train_README-en.md#automatic-captioning 1.1 打标界面 根据需求,选择通用打标模型(BLIP)还是动漫打标模型(deepbooru) 设置好后,选择

    2024年02月12日
    浏览(44)

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

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

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

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

二维码1

领取红包

二维码2

领红包