1 Star 1 Fork 0

ZheGuangLi/sd-webui-controlnet

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
install.py 954 Bytes
一键复制 编辑 原始数据 按行查看 历史
import launch
import os
import pkg_resources
req_file = os.path.join(os.path.dirname(os.path.realpath(__file__)), "requirements.txt")
with open(req_file) as file:
for package in file:
try:
package = package.strip()
if '==' in package:
package_name, package_version = package.split('==')
installed_version = pkg_resources.get_distribution(package_name).version
if installed_version != package_version:
launch.run_pip(f"install {package}", f"sd-webui-controlnet requirement: changing {package_name} version from {installed_version} to {package_version}")
elif not launch.is_installed(package):
launch.run_pip(f"install {package}", f"sd-webui-controlnet requirement: {package}")
except Exception as e:
print(e)
print(f'Warning: Failed to install {package}, some preprocessors may not work.')
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zhaiguang/sd-webui-controlnet.git
[email protected]:zhaiguang/sd-webui-controlnet.git
zhaiguang
sd-webui-controlnet
sd-webui-controlnet
main

搜索帮助

0d507c66 1850385 C8b1a773 1850385