用Colab免费部署自己的AI绘画云平台—— Stable Diffusion

1,847次阅读
没有评论

AI绘画门槛又又又降低了,从最开始需要花半天时间折腾的 Disco-Diffusion ,紧接着 Stable Diffusion  在 github 上开源,各家平台都推出了云平台,让用户通过轻松的点击、选择、输入就能生成一张张AI图。

再到现在!!!使用 webui 在 github 上开源了,不仅有手动教程、docker 教程,还有 Colab 傻瓜式的集成方案。

webui github 地址:https://github.com/sd-webui/stable-diffusion-webui

平台搭建

今天就来交大家如果来搭建和使用这个云平台。

第一步:  打开链接

https://colab.research.google.com/github/altryne/sd-webui-colab/blob/main/Stable_Diffusion_WebUi_Altryne.ipynb

第二步: 连接运行时

打开后,点击右上角的连接

点击确定

等连接上后我们运行第一段脚本,就是查看当前使用的机器。一般是从 K80、T4、P100、V100 中随机分配一个。

第三步: 设置 Token

点击这个 1 – Setup stage 左边的小箭头进行展开

划到 1.4 Connect to Google Drive

勾选 download_if_missing ,然后到  https://huggingface.co/settings/tokens  复制你的 toekn 并填入,关于 huggingface 如何注册,可以看我上一篇文章《AI数字绘画 stable-diffusion 保姆级教程

第四步: 设置密码

划到 2 – Run the Stable Diffusion webui 部分,因为要部署一个服务,当然得设置一个密码,不然人人都可以随意使用你的服务了。

第五步:运行服务

将他们收起来,依次运行以下步骤

第六步:打开 Web 服务

账号为 webui,密码如果设置了就是你设置的密码。

使用教程

打开后就是这样一个界面,主要包含了4块功能,text2img,img2img,人脸修复算法,照片清晰化。

text2img

我们首先来看 text2img,也就是输入一段文字就可以生成一张照片。

然后来看生成的一些案例吧

prompt: a girl with lavender hair and black skirt, fairy tale style background, a beautiful half body illustration, top lighting, perfect shadow, soft painting, reduce saturation, leaning towards watercolor, art by hidari and krenz cushart and wenjun lin and akihiko yoshida

rimuru looking into the camera, beautiful face, ultra realistic, fully clothed, intricate details, highly detailed, 8 k, photorealistic, octane render, unreal engine, photorealistic, portrait

((a point coloration cat by the lakeside)), big face, small ears, play in the snow, sharp focus, illustration, highly detailed, concept art, matte, anime, trending on artstation

prompt:  Cyberpunk, 8k resolution, castle, the rose sea, dream

水墨画风格

prompt: a watercolor ink painting of a fallen angel with a broken halo wielding a jagged broken blade standing on top of a skyscraper in the style of anti – art trending on artstation deviantart pinterest detailed realistic hd 8 k high resolution

img2img

这个功能则是利用图片生成图片的功能。

Untitled

这里需要注意的是,不知道是不是我电脑的分辨率问题,默认宽高为 512 和 256,这个时候会报以下错误,但是将宽度调整成 1024 * 512 就没有问题

RuntimeError: The size of tensor a (128) must match the size of tensor b (32) at non-singleton dimension 3

生成的一些案例:

A fantasy landscape, trending on artstation

A fantasy landscape, trending on artstation

a nike sneakers

人像优化

直接将老照片拖入框框。

案例:

清晰度优化

如果你觉得你生成的图片质量不够,可以使用这个功能进行4倍图进行放大。这个功能生成时间比较久,需要耐心等待, 大约5-10分钟,最终生成的清晰度提升还是蛮大的。

案例:

最后附上一个常见参数说明

更多内容请查看我整理的 Notion 文档 https://qiufeng.notion.site/06fab45ec290447ba41c3fd0f6e78fac, 包含了 10+个 AI 绘画平台,SD 和 DD 使用教程,调参教程以及其他的文档。

如果你有不明白或者是数字绘画爱好者欢迎交流呀。(严禁打广告、发不相关的内容!码过期的话加 qiufengblue)


正文完
可以使用微信扫码关注公众号(ID:xzluomor)
post-qrcode
 0
评论(没有评论)

文心AIGC

2023 年 3 月
 12345
6789101112
13141516171819
20212223242526
2728293031  
文心AIGC
文心AIGC
人工智能ChatGPT,AIGC指利用人工智能技术来生成内容,其中包括文字、语音、代码、图像、视频、机器人动作等等。被认为是继PGC、UGC之后的新型内容创作方式。AIGC作为元宇宙的新方向,近几年迭代速度呈现指数级爆发,谷歌、Meta、百度等平台型巨头持续布局
文章搜索
热门文章
清库存!DeepSeek突然补全R1技术报告,训练路径首次详细公开

清库存!DeepSeek突然补全R1技术报告,训练路径首次详细公开

清库存!DeepSeek突然补全R1技术报告,训练路径首次详细公开 Jay 2026-01-08 20:18:...
训具身模型遇到的很多问题,在数据采集时就已经注定了丨鹿明联席CTO丁琰分享

训具身模型遇到的很多问题,在数据采集时就已经注定了丨鹿明联席CTO丁琰分享

训具身模型遇到的很多问题,在数据采集时就已经注定了丨鹿明联席CTO丁琰分享 衡宇 2026-01-08 20:...
「北京版幻方」冷不丁开源SOTA代码大模型!一张3090就能跑,40B参数掀翻Opus-4.5和GPT-5.2

「北京版幻方」冷不丁开源SOTA代码大模型!一张3090就能跑,40B参数掀翻Opus-4.5和GPT-5.2

「北京版幻方」冷不丁开源SOTA代码大模型!一张3090就能跑,40B参数掀翻Opus-4.5和GPT-5.2...
开源“裸考”真实世界,国产具身智能基座模型拿下全球第二!

开源“裸考”真实世界,国产具身智能基座模型拿下全球第二!

开源“裸考”真实世界,国产具身智能基座模型拿下全球第二! 西风 2026-01-08 19:02:20 来源:...
最新评论
ufabet ufabet มีเกมให้เลือกเล่นมากมาย: เกมเดิมพันหลากหลาย ครบทุกค่ายดัง
tornado crypto mixer tornado crypto mixer Discover the power of privacy with TornadoCash! Learn how this decentralized mixer ensures your transactions remain confidential.
ดูบอลสด ดูบอลสด Very well presented. Every quote was awesome and thanks for sharing the content. Keep sharing and keep motivating others.
ดูบอลสด ดูบอลสด Pretty! This has been a really wonderful post. Many thanks for providing these details.
ดูบอลสด ดูบอลสด Pretty! This has been a really wonderful post. Many thanks for providing these details.
ดูบอลสด ดูบอลสด Hi there to all, for the reason that I am genuinely keen of reading this website’s post to be updated on a regular basis. It carries pleasant stuff.
Obrazy Sztuka Nowoczesna Obrazy Sztuka Nowoczesna Thank you for this wonderful contribution to the topic. Your ability to explain complex ideas simply is admirable.
ufabet ufabet Hi there to all, for the reason that I am genuinely keen of reading this website’s post to be updated on a regular basis. It carries pleasant stuff.
ufabet ufabet You’re so awesome! I don’t believe I have read a single thing like that before. So great to find someone with some original thoughts on this topic. Really.. thank you for starting this up. This website is something that is needed on the internet, someone with a little originality!
ufabet ufabet Very well presented. Every quote was awesome and thanks for sharing the content. Keep sharing and keep motivating others.
热评文章
悲报!Stack Overflow彻底凉了,比18年前上线首月问题数量还少

悲报!Stack Overflow彻底凉了,比18年前上线首月问题数量还少

悲报!Stack Overflow彻底凉了,比18年前上线首月问题数量还少 闻乐 2026-01-05 19:...
全自主、更好用!北京人形 “干活机器人” 惊艳亮相 CES2026

全自主、更好用!北京人形 “干活机器人” 惊艳亮相 CES2026

全自主、更好用!北京人形 “干活机器人” 惊艳亮相 CES2026 量子位的朋友们 2026-01-06 16...
港科大教授实测AI眼镜“作弊”:30分钟碾压95%的学生,把传统教学评估体系整破防了

港科大教授实测AI眼镜“作弊”:30分钟碾压95%的学生,把传统教学评估体系整破防了

港科大教授实测AI眼镜“作弊”:30分钟碾压95%的学生,把传统教学评估体系整破防了 梦瑶 2026-01-0...
海信CES发布全新一代RGB-Mini LED,全球首创玲珑4芯真彩背光

海信CES发布全新一代RGB-Mini LED,全球首创玲珑4芯真彩背光

海信CES发布全新一代RGB-Mini LED,全球首创玲珑4芯真彩背光 量子位的朋友们 2026-01-06...