在linux系统上运行Stable Diffusion web UI

在linux系统上运行Stable Diffusion web UI

    正在检查是否收录...

stable-diffusion-webui项目地址

该项目是一个针对Stable Diffusion模型的浏览器操作界面,基于Gradio。

环境: 在恒源云上租的服务器,操作系统:Ubuntu、显卡:A4000-16G。恒源云官网链接

项目的Readme.md让我们用webui.sh配置项目,但是各种Bug。。。只能自己弄了。

# 更新一下pip pip install --upgrade pip # 克隆项目 git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git # 从huggingface官网里下载别人训练好的ckpt模型,放到models/Stable-diffusion目录下面 # 推荐模型: https://huggingface.co/Envvi/Inkpunk-Diffusion # https://huggingface.co/elontrump/nice/tree/main # 在"恒源云"中,模型上传建议使用oss命令工具,具体操作参考官方文档 # 接着, 进入项目 cd stable-diffusion-webui/ # 直接运行launch.py文件,各种依赖包会自动安装 # --share参数表示Gradio会提供的一个公网地址用来访问,--xformers用来显存优化、加速推理 # 可以用python launch.py -h查看参数 python launch.py --share --xformers

报错 

  File "/usr/local/lib/python3.8/dist-packages/cv2/gapi/__init__.py", line 301, in <module>
    cv.gapi.wip.GStreamerPipeline = cv.gapi_wip_gst_GStreamerPipeline
AttributeError: partially initialized module 'cv2' has no attribute 'gapi_wip_gst_GStreamerPipeline' (most likely due to a circular import)

解决:直接修改/usr/local/lib/python3.8/dist-packages/cv2/gapi/__init__.py文件,把cv.gapi.wip.GStreamerPipeline = cv.gapi_wip_gst_GStreamerPipeline 这行注释掉。

# 重新运行,效果如下图 python launch.py --share --xformers

 访问上面的public URL 

stable diffusion免费尝试网站

Stable Diffusion 2-1 - a Hugging Face Space by stabilityai

diffusionapicodepythonerpgstreamerwebwebuistable diffusiongitsharehuggingfacegradiourlelo浏览器hugging face服务器githubclone操作系统
  • 本文作者:李琛
  • 本文链接: https://wapzz.net/post-1878.html
  • 版权声明:本博客所有文章除特别声明外,均默认采用 CC BY-NC-SA 4.0 许可协议。
本站部分内容来源于网络转载,仅供学习交流使用。如涉及版权问题,请及时联系我们,我们将第一时间处理。
文章很赞!支持一下吧 还没有人为TA充电
为TA充电
还没有人为TA充电
0
  • 支付宝打赏
    支付宝扫一扫
  • 微信打赏
    微信扫一扫
感谢支持
文章很赞!支持一下吧
关于作者
2.3W+
5
0
1
WAP站长官方

AIGC零基础30天学习——CLIP模型

上一篇

Visual chatgpt多模态大模型的前菜

下一篇
  • 复制图片
按住ctrl可打开默认菜单