stable diffusion model训练遇到的问题【No module named ‘triton‘】

一天早晨过来,发现昨天还能跑的diffusion代码,突然出现了【No module named 'triton'】的问题,导致本就不富裕的显存和优化速度雪上加霜,因此好好探究了解决方案。

首先是原因,由于早晨过来发现【电脑重启】导致了【训练终止】(美好的心情从看到windows更新结束),基本可以判定是由于windows更新,以及所编译的triton的windows版本的原因,最终解决方案如下:

1、第一步,按顺序卸载triton、xformers、torch

bash 复制代码
pip uninstall triton
pip uninstall xformers
pip uninstall torch

2、第二步,利用huggingface上直接下载到本地的triton-2.0.0-cp310-cp310-win_amd64.whl进行pip安装,安装triton。具体的windows下编译好的triton的网址为 https://huggingface.co/datasets/ArrayCats/triton-2.0.0-cp310-cp310-win_amd64/resolve/main/triton-2.0.0-cp310-cp310-win_amd64.whl

bash 复制代码
pip install triton-2.0.0-cp310-cp310-win_amd64.whl

3、第三步,安装xformers

bash 复制代码
pip install xformers

4、第四步,在安装triton时,下载的torch为cpu版本,无法运用cuda和xformers,因此根据卸载前的版本或者xformers的报错,安装对应版本的torch,我个人所需要的是torch==2.0.1+cu118,所以在pytorch官网的安装命令上进行了修改,指定了torch版本

bash 复制代码
pip3 install torch==2.0.1+cu118 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
相关推荐
农夫山泉2号12 小时前
【个人开源】——从零开始在高通手机上部署sd(一)
stable diffusion·智能手机·sd·高通·qnn
AIGC安琪1 天前
【Stable Diffusion】SD迎来动画革命,AnimateDiff快速出图
人工智能·网络协议·tcp/ip·stable diffusion·aigc
Allen-Steven4 天前
《Stable Diffusion绘画完全指南:从入门到精通的Prompt设计艺术》-配套代码示例
人工智能·pytorch·深度学习·stable diffusion·prompt·checkpoint
普通网友4 天前
自动化办公更简单了!新版python-office,有哪些更新?
运维·人工智能·python·stable diffusion·数据挖掘·自动化·midjourney
燃灯工作室5 天前
扩散模型中的马尔可夫链设计演进:从DDPM到Stable Diffusion全解析
stable diffusion
灵魂画师向阳6 天前
万字长文破解 AI 图片生成算法-Stable diffusion
人工智能·算法·计算机视觉·ai作画·stable diffusion·美女
普通网友6 天前
文生图与图生图两款AI工具Midjourney(MJ)和Stable Diffusion(SD)对比
数据库·人工智能·stable diffusion·音视频·midjourney·媒体
AlbertS6 天前
Ubuntu20.04部署stable-diffusion-webui环境小记
python·ai·stable diffusion·nvidia·venv
杀生丸学AI7 天前
【三维重建】FeatureGS:特征值优化的几何精度和伪影减少3DGS的重构
人工智能·3d·aigc·三维重建·扩散模型·高斯泼溅
engchina8 天前
在Autonomous DB中创建训练数据集
数据库·adb·oracle·训练