1 Star 1 Fork 0

peaking/Fooocus

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build_launcher.py 838 Bytes
一键复制 编辑 原始数据 按行查看 历史
import os
win32_root = os.path.dirname(os.path.dirname(__file__))
python_embeded_path = os.path.join(win32_root, 'python_embeded')
is_win32_standalone_build = os.path.exists(python_embeded_path) and os.path.isdir(python_embeded_path)
win32_cmd = '''
.\python_embeded\python.exe -s Fooocus\entry_with_update.py {cmds} %*
pause
'''
def build_launcher():
if not is_win32_standalone_build:
return
presets = [None, 'anime', 'realistic']
for preset in presets:
win32_cmd_preset = win32_cmd.replace('{cmds}', '' if preset is None else f'--preset {preset}')
bat_path = os.path.join(win32_root, 'run.bat' if preset is None else f'run_{preset}.bat')
if not os.path.exists(bat_path):
with open(bat_path, "w", encoding="utf-8") as f:
f.write(win32_cmd_preset)
return
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/peaklee1134/Fooocus.git
git@gitee.com:peaklee1134/Fooocus.git
peaklee1134
Fooocus
Fooocus
main

搜索帮助