当前位置:   article > 正文

【Stable Diffusion】通过pyinstaller制作自己的ComfyUI EXE启动器_python flask comfyui

python flask comfyui

0、前言

独乐乐不如众乐乐,现在打包部署好的环境作为启动器来普惠大众。

1、Python环境搭建

GitHub下载好ComfyUI源码后,创建并激活conda环境

  1. conda create -n comfy python=3.9
  2. conda activate comfy
  3. pip install -r requirements.txt

pip 安装速度慢加清华源,requirements.txt内容如下:

  1. addict==2.4.0
  2. aiohttp==3.9.3
  3. aiosignal==1.3.1
  4. albumentations==1.4.1
  5. altgraph==0.17.4
  6. antlr4-python3-runtime==4.9.3
  7. anyio==4.3.0
  8. astunparse==1.6.3
  9. async-timeout==4.0.3
  10. asyncio==3.4.3
  11. attrs==23.2.0
  12. blinker==1.7.0
  13. certifi==2024.2.2
  14. chardet==5.2.0
  15. charset-normalizer==3.3.2
  16. click==8.1.7
  17. colorama==0.4.6
  18. coloredlogs==15.0.1
  19. colorlog==6.8.2
  20. contourpy==1.1.1
  21. cssselect2==0.7.0
  22. cycler==0.12.1
  23. Cython==3.0.8
  24. einops==0.7.0
  25. embreex==2.17.7.post4
  26. et-xmlfile==1.1.0
  27. exceptiongroup==1.2.0
  28. filelock==3.13.1
  29. Flask==3.0.2
  30. flatbuffers==23.5.26
  31. fonttools==4.49.0
  32. frozenlist==1.4.1
  33. fsspec==2024.2.0
  34. ftfy==6.1.3
  35. fvcore==0.1.5.post20221221
  36. gast==0.5.4
  37. gitdb==4.0.11
  38. GitPython==3.1.42
  39. google-pasta==0.2.0
  40. h11==0.14.0
  41. h5py==3.10.0
  42. httpcore==1.0.4
  43. httpx==0.27.0
  44. huggingface-hub==0.20.3
  45. humanfriendly==10.0
  46. idna==3.6
  47. imageio==2.34.0
  48. importlib-metadata==7.0.1
  49. importlib-resources==6.1.1
  50. iopath==0.1.10
  51. itsdangerous==2.1.2
  52. Jinja2==3.1.3
  53. joblib==1.3.2
  54. jsonschema==4.21.1
  55. jsonschema-specifications==2023.12.1
  56. keras==2.15.0
  57. kiwisolver==1.4.5
  58. lazy_loader==0.3
  59. libclang==16.0.6
  60. lightning-utilities==0.10.1
  61. lxml==5.1.0
  62. mapbox-earcut==1.0.1
  63. MarkupSafe==2.1.5
  64. matplotlib==3.7.5
  65. matrix-client==0.4.0
  66. mdurl==0.1.2
  67. ml-dtypes==0.2.0
  68. mpmath==1.3.0
  69. multidict==6.0.5
  70. networkx==3.1
  71. numpy==1.24.4
  72. omegaconf==2.3.0
  73. onnx==1.14.0
  74. onnx-simplifier==0.4.33
  75. onnxruntime==1.15.1
  76. opencv-python==4.9.0.80
  77. opencv-python-headless==4.9.0.80
  78. openpyxl==3.1.2
  79. opt-einsum==3.3.0
  80. packaging==23.2
  81. pandas==2.0.3
  82. pefile==2023.2.7
  83. piexif==1.1.3
  84. pillow==10.2.0
  85. platformdirs==4.2.0
  86. portalocker==2.8.2
  87. protobuf==3.20.3
  88. psutil==5.9.8
  89. py-cpuinfo==9.0.0
  90. pyarmor==8.4.7
  91. pyarmor.cli.core==5.4.3
  92. pycollada==0.8
  93. pycparser==2.21
  94. pyinstaller==6.4.0
  95. pyinstaller-hooks-contrib==2024.1
  96. pyparsing==3.1.1
  97. pyreadline3==3.4.1
  98. python-dateutil==2.8.2
  99. pytorch-lightning==2.2.0.post0
  100. pytz==2024.1
  101. PyWavelets==1.4.1
  102. pywin32==306
  103. pywin32-ctypes==0.2.2
  104. PyYAML==6.0.1
  105. referencing==0.33.0
  106. regex==2023.12.25
  107. reportlab==4.1.0
  108. requests==2.31.0
  109. rich==13.5.2
  110. rpds-py==0.18.0
  111. Rtree==1.2.0
  112. safetensors==0.4.2
  113. scikit-image==0.21.0
  114. scikit-learn==1.4.1.post1
  115. scipy==1.10.1
  116. seaborn==0.13.2
  117. segment-anything==1.0
  118. shapely==2.0.3
  119. six==1.16.0
  120. smmap==5.0.1
  121. sniffio==1.3.1
  122. svg.path==6.3
  123. svglib==1.5.1
  124. sympy==1.12
  125. tabulate==0.9.0
  126. tensorboard==2.15.1
  127. tensorboardX==2.6.2.2
  128. tensorflow==2.15.0
  129. tensorflow-estimator==2.15.0
  130. tensorflow-intel==2.15.0
  131. tensorflow-io-gcs-filesystem==0.31.0
  132. termcolor==2.4.0
  133. thop==0.1.1.post2209072238
  134. threadpoolctl==3.3.0
  135. tifffile==2023.7.10
  136. tinycss2==1.2.1
  137. tokenizers==0.15.2
  138. tomli==2.0.1
  139. torch==1.13.0+cu116
  140. torchaudio==0.13.0+cu116
  141. torchmetrics==1.3.1
  142. torchsde==0.2.6
  143. torchvision==0.14.0+cu116
  144. tqdm==4.66.2
  145. trampoline==0.1.2
  146. transformers==4.38.1
  147. trimesh==4.2.0
  148. typing_extensions==4.9.0
  149. tzdata==2024.1
  150. ultralytics==8.1.18
  151. urllib3==1.26.18
  152. vhacdx==0.0.6
  153. waitress==3.0.0
  154. wcwidth==0.2.13
  155. webencodings==0.5.1
  156. Werkzeug==3.0.1
  157. wrapt==1.14.1
  158. x2paddle==1.4.1
  159. xatlas==0.0.9
  160. xxhash==3.4.1
  161. yacs==0.1.8
  162. yapf==0.40.2
  163. yarl==1.9.4
  164. zipp==3.17.0

2、pyinstaller制作启动器

pyinstaller  -D  .\main.py

终端执行以上命令等待几分钟,会在目录下生成一个dist文件夹:

复制ComfyUI下的文件夹 comfy、comfy_extras、custom_nodes、web、models 到 dist/main/_internal 下,最后双击main.exe即可启动ComfyUI,享受AI绘画乐趣~

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/702063
推荐阅读
相关标签
  

闽ICP备14008679号