当前位置: 首页 > news >正文

MAC缓解WebUI提示词反推

当前环境信息:

在mac上安装好stable diffusion后,能做图片生成了之后,遇到一些图片需要做提示词反推,这个时候需要下载一个插件,参考:

https://gitcode.net/ranting8323/stable-diffusion-webui-wd14-tagger

安装完成后,可以在这个位置使用,这里是给了一个图片来反推提示词。

使用过程中遇到了一些错误记录如下:

Loading wd14-vit-v2-git model file from SmilingWolf/wd-v1-4-vit-tagger-v2

'(MaxRetryError("HTTPSConnectionPool(host='huggingface.co', port=443): Max retries exceeded with url: /SmilingWolf/wd-v1-4-vit-tagger-v2/resolve/main/model.onnx (Caused by ConnectTimeoutError(<urllib3.connection.HTTPSConnection object at 0x1622bcc40>, 'Connection to huggingface.co timed out. (connect timeout=10)'))"), '(Request ID: 008f823b-7a19-4899-bbed-3bacbe0bfee2)')' thrown while requesting HEAD https://huggingface.co/SmilingWolf/wd-v1-4-vit-tagger-v2/resolve/main/model.onnx

这个错误是访问huggingface被拦截,需要科学上网。

还有一个错误,安装onnxruntime失败:

    RuntimeError: Couldn't install onnxruntime.

    Command: "/Users/xxxx/aigc/stable-diffusion-webui/venv/bin/python3" -m pip install onnxruntime-gpu --prefer-binary

    Error code: 1

    stdout: Looking in indexes: https://mirrors.aliyun.com/pypi/simple/

我这台电脑的解决方案是,修改webui的代码,如下:

文件名:interrogator.py

    def load(self) -> None:model_path, tags_path = self.download()# only one of these packages should be installed at a time in any one environment# https://onnxruntime.ai/docs/get-started/with-python.html#install-onnx-runtime# TODO: remove old package when the environment changes?from launch import is_installed, run_pipif not is_installed('onnxruntime'):package = os.environ.get('ONNXRUNTIME_PACKAGE',
#                 'onnxruntime-gpu''onnxruntime')

修改代码后重新启动 webui,就能正常的反推提示词了;

将反推的提示词重新生成图片,效果如下: 

http://www.lryc.cn/news/211311.html

相关文章:

  • 【设计模式之原型模式 】– C++
  • Flask路由机制分析之二
  • vue中如何获取当时时间时分秒
  • matlab simulink 直线一级倒立摆控制(自起摆和稳态控制)
  • Transformers实战(二)快速入门文本相似度、检索式对话机器人
  • 【错误解决方案】ModuleNotFoundError: No module named ‘PeptideBuilder‘
  • 汇编学习(1)
  • C#,数值计算——分类与推理Svmlinkernel的计算方法与源程序
  • 【鸿蒙软件开发】ArkTS容器组件之Badge
  • H5游戏源码分享-命悬一线
  • 【电路笔记】-交流电阻和阻抗
  • android开发使用OkHttp自带的WebSocket实现IM功能
  • 前端小技巧: TS实现柯里化函数
  • 【算法-数组2】有序数组的平方 和 长度最小的子数组
  • H5游戏源码分享-接苹果游戏拼手速
  • 详解类生到死的来龙去脉
  • 寻找倒数第K个节点
  • [ROS系列]ubuntu 20.04 从零配置orbslam3(无坑版)
  • 网络协议--TCP的保活定时器
  • leetcode 1353. 最多可以参加的会议数目
  • hadoop权威指南第四版
  • LeetCode75——Day20
  • 搭建微信小程序环境及项目结构介绍
  • Python通过pyecharts对爬虫房地产数据进行数据可视化分析(一)
  • 关于测试组件junit切换testng的示例以及切换方式分享
  • nginx 内存管理(二)
  • 【DevChat】智能编程助手 - 使用评测
  • Geek challenge 2023 EzHttp
  • matlabR2021a正版免费使用
  • 天气数据可视化平台-计算机毕业设计vue