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
相关推荐
小北的AI科技分享2 天前
人工智能大模型:从技术突破到人机交互重塑
架构·模型·训练
迈火3 天前
Facerestore CF (Code Former):ComfyUI人脸修复的卓越解决方案
人工智能·gpt·计算机视觉·stable diffusion·aigc·语音识别·midjourney
杀生丸学AI3 天前
【三维生成】ShapeR:单目视频的条件三维形状生成
aigc·三维重建·扩散模型·图像生成·视觉大模型·lora微调·空间智能
重启编程之路4 天前
Stable Diffusion 参数记录
stable diffusion
SmartRadio5 天前
基于泰山派PiKVM的多电脑KVM共享方案(HDMI采集+虚拟USB键鼠+无缝切换+剪贴板/文件共享)
网络·lora·计算机外设·电脑
勇气要爆发6 天前
Docker+Ollama+LangChain:从零搭建企业级“隐私优先”本地 RAG 知识库 (附源码)
docker·容器·langchain·lora·rag·ollama·llama 3
dxz_tust6 天前
flow match简单直观理解
开发语言·python·深度学习·扩散模型·流匹配·flow match
孤狼warrior7 天前
图像生成 Stable Diffusion模型架构介绍及使用代码 附数据集批量获取
人工智能·python·深度学习·stable diffusion·cnn·transformer·stablediffusion
SmartRadio8 天前
LLCC68 L型与π型匹配网络的调试方法
网络·lora·阻抗匹配·匹配·射频·llcc68
bleuesprit9 天前
LLM语言模型Lora微调
人工智能·语言模型·lora