【AI绘画】云服务器部署stable-diffusion-webui保姆级教程

1.背景

之前给大家写过Mac苹果笔记本上部署stable-diffusion-webui的教程,知乎链接:
【奶奶看了也不会】AI绘画 Mac安装stable-diffusion-webui绘制AI妹子保姆级教程

但是安装过程就花了一天的时间,各种问题处理起来真是苦不堪言。。。而且生成图的速度也很慢,一张512 x 512大小的图片就要10分钟才能生成。但是显卡又太贵了,所以,小卷就搞了下云服务器,直接服务器上运行stable-diffusion-webui,不仅安装简单,生成图的速度也快。老规矩,先贴生成的图片效果

在这里插入图片描述

2.云服务器选择

之前部署ChatGLM-6B模型的时候已经介绍过了各种云服务器厂商,地址:【奶奶看了都会】云服务器部署开源ChatGLM-6B,让你拥有自己的ChatGPT
选便宜能用的就行了。这里我们还是用揽睿星舟这个平台,注册地址:
揽睿星舟官网

安装过程非常简单(5分钟左右搞定)

3.部署stable-diffusion-webui

  1. 点击工作空间创建工作空间,地址选北京1,购买一台3090的机器。

在这里插入图片描述

2.然后我们新建一个服务器实例,镜像选择「公有镜像 - others - sd-webui - output」,挂载网盘,数据集选择「sd-base」

**注意如非必要,不要选择数据盘!会额外计费。**按下图选择即可

在这里插入图片描述

3.实例状态为运行中后,进入Jupyter页面

在这里插入图片描述

4.新建一个 Terminal,然后依次执行下面的命令:

cd /app

bash webui.sh --port 27777 --listen --xformers --enable-insecure-extension-access

在这里插入图片描述

等待几分钟后,出现http://0.0.0.0:27777字样说明启动成功了

然后回到控制台,复制调试地址,在浏览器打开,就能拥有了专属于自己的 SD 服务器,可以开始画画了~

在这里插入图片描述
在这里插入图片描述

4.使用

平台已经安装了一些模型可用,我们需要使用自己的Lora模型时,可以把模型上传到 网盘的/data/sd/models/Lora/ 目录即可,如图所示。

在这里插入图片描述

上传完成后,点一下页面的刷新模型按钮就能直接使用,无需重启应用

5.图片提示语

这里贴一些图片的生成提示语,大家可以直接拷贝使用。生图的提示语玩法比较多样,可自行研究

在这里插入图片描述

masterpiece, best quality, (soft lighting) , absurdres, looking at viewer, solo ,luminous eyes, backlighting, light rays, medium breast, (colorful), kamisato ayaka (flawless radiance), kamisato ayaka, official costume, ponytail, kote, kusazuri, blunt bangs, hair ribbon, red ribbon, japanese armor, grey eyes, light blue hair, mole under eye, looking at viewer , seductive smile, relaxing in house at afternoon , torii , sakura <lora:fashionGirl_v50:0.7> <lora:kamisatoAyakaGenshin_kamisatoAyaka:0.5>
Negative prompt: nsfw, (worst quality, low quality:1.4), monochrome, zombie, (bad proportion), (poorly drawn hands:1.4),(mutated fingers:1.4), (poorly drawn face:1.4), mutation hands, mutation fingers, extra fingers, monochrome, (extra digit and hands and fingers and legs and arms:1.4)
Steps: 30, Sampler: DPM++ SDE Karras, CFG scale: 8, Seed: 369588494, Size: 1024x1024, Model hash: 812cd9f9d9, Model: anythingV3_fp16

在这里插入图片描述

8k UHD,((best illustration)),((masterpiece)), best quality, ((cinematic lighting)), absurdres, looking at viewer, solo, kamisato ayaka (flawless radiance), kamisato ayaka, official costume, ponytail, kote, kusazuri, blunt bangs, hair ribbon, red ribbon, japanese armor, gacha banner, (ice wall background:1.4), upper body, floating, seductive_smile, <lora:kamisatoAyakaSpringbloom_v10:1> <lora:kamisatoAyakaGenshin_ayakav10:0.2>
Negative prompt: (worst quality, low quality:1.4), (normal quality:1.4),lowres, bad anatomy, text, error, extra digit, fewer digits, cropped, jpeg artifacts, signature, username, (blurry:1.2), (grayscale:1.2)
bad_prompt, EasyNegative,bad arms, (malformed hands:1.4),(poorly drawn hands:1.4),(mutated fingers:1.4), (poorly drawn face:1.4), mutation hands, mutation fingers, extra fingers,(animal ears),horor.(extra digit and hands and fingers and legs and arms:1.4)
Steps: 20, Sampler: DPM++ SDE Karras, CFG scale: 6, Seed: 456457, Size: 1024x1080, Model hash: 5493a0ec49, Model: abyssorangemix3AOM3_aom3a1b, Clip skip: 2
### 部署 Stable Diffusion WebUI 到腾讯云 要在腾讯云服务器上成功部署 Stable Diffusion WebUI,可以按照以下方法操作: #### 准备工作 确保已购买并配置好一台腾讯云服务器实例。推荐使用 Ubuntu 或 Debian 系统作为操作系统[^1]。 #### 安装依赖项 登录到腾讯云服务器后,更新系统的包管理器并安装必要的依赖项: ```bash sudo apt update && sudo apt upgrade -y sudo apt install git wget python3-pip ffmpeg libsm6 libxext6 -y ``` 这些命令会安装 Git、Wget 和 Python 的 pip 工具以及其他运行 Stable Diffusion 所需的基础库[^2]。 #### 下载和启动 Stable Diffusion WebUI 执行以下脚本来自动下载和设置 Stable Diffusion WebUI 及其环境: ```bash bash <(wget -qO- https://raw.githubusercontent.com/AUTOMATIC1111/stable-diffusion-webui/master/webui.sh) ``` 此单行命令将完成大部分初始化过程,包括克隆仓库以及准备模型文件夹结构[^3]。 #### 访问界面 一旦上述脚本结束并且显示本地服务地址(通常是 `http://localhost:7860`),可以通过公网 IP 地址加上端口号来访问远程控制面板。例如,在浏览器输入形如 http://your_server_ip:7860 的 URL 即可打开图形化用户界面。 注意:为了安全起见,请考虑启用 SSH 密钥认证代替密码验证,并通过防火墙规则仅允许特定IP范围内的连接尝试。 #### 资源优化建议 由于生成图像可能非常消耗计算资源,因此建议选用配备较高规格CPU与GPU支持的实例类型以获得更佳性能体验。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

卷福同学

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值