在 Windows 上安装 SwarmUI

人工智能 2024-08-02 127 次浏览 0 条评论 次点赞

Stable Diffusion 是一种生成人工智能模型,可以根据文本和图像提示生成独特的逼真图像。Stable Diffusion和ChatGPT、Midjourney是AIGC应用快速体验推荐的应用,也与 Meta Llama 3 一起作为开源人工智能模型的代表。

SwarmUI

SwarmUI(以前称为 StableSwarmUI)是Stable Diffusion官方推出的一款WebUI框架,致力于易于访问、高性能和可扩展性,可以在Windows、Linux及Mac 电脑及 Docker 上运行(《AIGC应用快速体验》一文中有更多Stable Diffusion用户界面的介绍)。

以在 Windows 上安装及运行为例。


安装 SwarmUI


在 Windows 上安装 SwarmUI 需要注意:

  1. 您最好拥有NVIDIA或者AMD显卡,否则极可能出现运行错误,即使能够运行,推理效果也不如意。
  2. 如果您使用的是 Windows 10,则可能需要先手动安装gitDotNET 8(Windows 11 是自动安装的)。

1、下载 Install-Windows.bat 文件,将其存储在您想要安装的地方(一定不是 Program Files,最好是一个全新无空格字符的目录中),然后运行Install-Windows.bat

2024-09-13-232440.jpg
Install-Windows.bat窗口

安装程序应该打开命令提示符并自行安装。如果它关闭或者出现错误提示,请尝试重新运行它,直到没有错误提示并完成。

安装程序完成后,它将自动启动 SwarmUI 服务器,并打开浏览器窗口进入,进入继续安装界面。

2024-09-13-232629.jpg
浏览器中的SwarmUI Installer

2、按照页面上的安装说明进行操作。由于需要下载选择的ComfyUI(Local)引擎和模型较大,请耐心等待。如果在命令行窗口中出现错误提示,通常是远程服务器存在问题(就是一个与互联网相关的常见问题),可以重置计算机、重置联网然,甚至删除已生成的文件夹后重新启动安装。

2024-09-13-232954.jpg
示例安装选项:• Theme: modern_light • UI Is For: just_self • Backend: comfyui • Model: sdxl1


运行 SwarmUI


3、安装完成后,运行安装目录中的launch-windows.bat

2024-09-13-233613.jpg
launch-windows.bat窗口

弹出ComfyUI浏览器窗口,这里就是生成图像的界面。

2024-09-13-234104.jpg
ComfyUI

4、进阶

SwarmUI有许多的参数调整,在此仅展示在Utilities > Model Downloader下载和换用其他模型。下面是使用stable-diffusion-xl-base-1.0模型和stable-diffusion-3-medium模型的两张生成图片。

0022-An-image-of-a-woman-standing-straight-on-OfficialStableDiffusionsd_xl_base_10-1453910635.jpg
stable-diffusion-xl-base-1.0模型

0016-An-image-of-a-woman-standing-straight-on-sd3_medium-1453910635.jpg
stable-diffusion-3-medium模型

prompt: An image of a woman standing straight on, head turned slightly to her left, looking directly into the camera with a confident yet curious expression. She has dark brown, wavy hair and fair skin with noticeable freckles. Her eyes are amber brown with a warm light reflecting in them. She wears a tartan plaid garment in navy blue and red with white lines, and the neckline is slightly off her right shoulder. The setting is brightly lit with natural light.

视频教程:Zero to HeroSwarmUI 大师教程:包含视频中提到的资源链接。

👍

本文由 cds 整理发布,参考 CC-BY-SA 3.0 协议共享,欢迎转载、引用或改编。
感谢您的支持,以共同推动STEM公益教育!

楼主残忍的关闭了评论