【Stable Diffusion】Stable Diffusion免安装在线部署教程

一、开启Google Colab网址

官网:https://colab.research.google.com/

【Stable Diffusion】Stable Diffusion免安装在线部署教程_第1张图片
点击添加代码:
【Stable Diffusion】Stable Diffusion免安装在线部署教程_第2张图片

二、执行如下代码指令

!pip install --upgrade fastapi==0.90.1
!git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui
!git clone https://github.com/yfszzx/stable-diffusion-webui-images-browser /content/stable-diffusion-webui/extensions/stable-diffusion-webui-images-browser
!curl -Lo chilloutmixni.safetensors https://huggingface.co/nolanaatama/chomni/resolve/main/chomni.safetensors
!curl -Lo ulzzang-6500.pt https://huggingface.co/nolanaatama/chomni/resolve/main/ulzzang-6500.pt
!mv "/content/chilloutmixni.safetensors" "/content/stable-diffusion-webui/models/Stable-diffusion"
!mv "/content/ulzzang-6500.pt" "/content/stable-diffusion-webui/embeddings"
%cd /content/stable-diffusion-webui
!COMMANDLINE_ARGS="--share --disable-safe-unpickle --skip-torch-cuda-test --no-half-vae --xformers --reinstall-xformers --enable-insecure-extension-access" REQS_FILE="requirements.txt" python launch.py

点击执行按钮
【Stable Diffusion】Stable Diffusion免安装在线部署教程_第3张图片

会自动安装相关的套件、模型,然后等待运行完
【Stable Diffusion】Stable Diffusion免安装在线部署教程_第4张图片

注意:如果发生如下错误,该如何解决 RuntimeError:No CUDA GPUs are available
【Stable Diffusion】Stable Diffusion免安装在线部署教程_第5张图片

解决办法:
1、点击右上角点选硬件资源
【Stable Diffusion】Stable Diffusion免安装在线部署教程_第6张图片
2、打开后,只有两栏,没有GPU的资源 ,请点击下方更改运行时类型
【Stable Diffusion】Stable Diffusion免安装在线部署教程_第7张图片
3、选择硬件加速器GPU
【Stable Diffusion】Stable Diffusion免安装在线部署教程_第8张图片
4、点击保存
【Stable Diffusion】Stable Diffusion免安装在线部署教程_第9张图片
5、资源中即可显示出GPU RAM
【Stable Diffusion】Stable Diffusion免安装在线部署教程_第10张图片
6、重新运行,就能看到运行成功所提供的网址链接
【Stable Diffusion】Stable Diffusion免安装在线部署教程_第11张图片

三、进入Stable Diffusion的管理网页

点击网址后就能看见Stable Diffusion的管理界面
【Stable Diffusion】Stable Diffusion免安装在线部署教程_第12张图片

四、案例测试

【Stable Diffusion】Stable Diffusion免安装在线部署教程_第13张图片
算图参数(上面的框)

(8k, RAW photo, best quality, masterpiece:1.2), (realistic, photo-realistic:1.37), ultra-detailed,full body,1 girl, solo,beautiful detailed sky,detailed tokyo street,night,beautiful detailed eyes,beautiful detailed lips,professional lighting, photon mapping, radiosity, physically-based rendering,extremely detailed eyes and face, beautiful detailed eyes,light on face,cinematic lighting, short jacket,hoodie,school uniform,1girl,full body,full-body shot,see-through,looking at viewer,outdoors,((white hair)),

算图参数(下面的框)

EasyNegative, paintings, sketches, (worst quality:2), (low quality:2), (normal quality:2), lowres, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, age spot, glans,extra fingers,fewer fingers,strange fingers,bad hand,signature, watermark, username, blurry, bad feet,bad leg, duplicate, extra limb, ugly, disgusting, poorly drawn hands, missing limb, floating limbs, disconnected limbs, malformed hands, blurry,mutated hands and fingers, EasyNegative, paintings, sketches, (worst quality:2), (low quality:2), (normal quality:2), lowres, ((monochrome)), ((grayscale)), skin spots, acnes, skin blemishes, age spot, glans,extra fingers,fewer fingers,strange fingers,bad hand,signature, watermark, username, blurry, bad feet,bad leg

调整其他参数,然后点击运行
【Stable Diffusion】Stable Diffusion免安装在线部署教程_第14张图片
等待计算完毕
【Stable Diffusion】Stable Diffusion免安装在线部署教程_第15张图片
最后效果:

五、其他在线使用

如果只是想玩玩,也可以去网站中直接使用:

Hugging Face:https://huggingface.co/spaces/stabilityai/stable-diffusion 这个要稍微排队一下
【Stable Diffusion】Stable Diffusion免安装在线部署教程_第16张图片

DreamStudio:https://beta.dreamstudio.ai/dream 这个DreamStudio测试版需要注册,支持一些参数,但不用排队
【Stable Diffusion】Stable Diffusion免安装在线部署教程_第17张图片

你可能感兴趣的:(AI,stable,diffusion,AI绘画)