首页
学习
活动
专区
圈层
工具
发布
社区首页 >专栏 >使用腾讯云HAI开箱即用StableDiffusion助力AIGC生图

使用腾讯云HAI开箱即用StableDiffusion助力AIGC生图

原创
作者头像
星哥玩云
修改2025-03-21 15:28:13
修改2025-03-21 15:28:13
4270
举报
文章被收录于专栏:星哥的AI自留地星哥的AI自留地

最近,设计部的小李妹子找到了星哥,脸上带着些许焦虑。原来,她在本地的电脑上,用着3060显卡跑Stable Diffusion时,卡得不行。每次生成图像的时间越来越长,效率也越来越低,设计的进度因此拖慢了。

星哥听了她的困扰,微微一笑,轻松地拿出了一张解决方案:“你试试腾讯云的高性能应用服务吧,它专门针对这种高负载的计算任务优化过,稳定又高效。”于是,星哥帮小李妹子在云端部署了一个新的环境,不仅性能大幅提升,甚至在生成图像的过程中还没有任何卡顿的现象。

使用HAI

进入腾讯云官网,如果没有账号注册、并且实名,如果有请忽略

进入高性能应用服务(HAI)控制台:https://console.cloud.tencent.com/hai/

HAI环境优势

智能匹配算力,多种算力套餐满足不同需求的绘图性能。 预置主流AI作画模型及常用插件,无需手动部署,支持即开即用。 动态更新模型版本,确保模型版本与时俱进,无需频繁操作。

新建

image-20250320200312256
image-20250320200312256

选择HAI配置

1.选择应用

这里我选择Stable Diffusion WebUI。

Stable Diffusion 是一种由 Stability AI 开发的文本到图像生成模型(Text-to-Image Model),于2022年公开发布。它基于扩散模型(Diffusion Model)技术,能够根据用户输入的文本描述(prompt)生成高质量的图像,同时支持图像编辑、风格迁移等多种功能。其开源性和高效性使其成为当前最流行的生成式AI工具之一。

2.计费模式

计费模式选择按量计算,比较灵活,用多少花多少,花多少用多少。

包年包月适用于长期稳定的项目

3.地域

这个国内外都行,我这里选择离使用人最近的,广州。

image-20250320200430649
image-20250320200430649

4.实例名称

我这里随便填写了一个test-SD

5.云硬盘

其他就默认即可

image-20250320200811717
image-20250320200811717

创建实例

应用创建约需2-5分钟,请您耐心等候。

创建成功后会有一个公网IP,例如:43.138.XX.XX

image-20250320200924297
image-20250320200924297

启动WebUI

点击算力连接的三角,选择最后一个 “Gradio WebUI”

image-20250320201333223
image-20250320201333223

浏览器会弹出一个地址IP+端口,打开如下图

image-20250320201519785
image-20250320201519785

那么环境有了,应用部署好了,该怎么玩?

利用deepseek生成提示词

打开deepseek官网提问

帮我生成 Stable Diffusion提示词 1.人物:哪吒、敖丙 2.背景:东海龙宫 3.故事:随便讲一个

得到的回答

正向提示词: (((best quality))), ((masterpiece)), (ultra-detailed:1.3), (dynamic angle), two Chinese mythological figures fighting underwater:1.2, Ne Zha wearing red silk cosmic wind scarf, golden arm rings, flaming spear, lotus flower motifs, (glowing golden aura:1.1), Ao Bing with dragon scale armor, ice crystal spear, (frost effects:1.2), flowing silver hair, (water vortex swirling around legs), intricate East Sea Dragon Palace background:1.3, glowing coral reefs, jade pillars carved with dragon patterns, bioluminescent jellyfish schools, treasure chests spilling pearls, (clashing energy waves:1.2), (water droplets suspended in motion:1.1), (dramatic blue-green lighting:1.3), traditional Chinese ink painting style blended with modern cinematic rendering, (underwater caustic light effects:1.2), dynamic combat poses, (splashing water elements:1.1), mythical atmosphere 负向提示词: lowres, bad anatomy, extra digits, blurry, mutated hands, distorted architecture, oversaturated, flat lighting, cartoonish style, English letters

image-20250320202114855
image-20250320202114855

生成的图片似乎不是我想要的。

再用deepseek给出提示词

问deepseek

帮我生成 Stable Diffusion提示词 生成一张风景图,要有山有水

deepseek回答:

正向提示词: (((ultra-detailed landscape))), ((masterpiece)), 8k resolution, majestic mountain range with layered peaks:1.3, (snow-capped summit glowing with alpenglow:1.2), serene lake with crystal-clear water:1.2, (perfect mirror reflection of mountains:1.3), ancient pine trees clinging to cliffs, delicate cherry blossom branches framing foreground, cascading waterfall with (mist particles:1.1), floating cloud veil between peaks, flock of cranes flying through golden morning light:1.1, (volumetric atmospheric perspective:1.3), soft dawn lighting with warm/cool contrast, traditional Chinese ink painting texture blended with photorealism, drifting maple leaves over water surface, dewdrops on spider webs in foreground grass 负向提示词: modern buildings, power lines, people, cartoonish style, oversaturation, blurry details, distorted perspective, flat lighting, digital artifacts, text

生成图片:

image-20250320203307854
image-20250320203307854

质量不太行,没关系,下次星哥介绍Stable Diffusion如何修改模型。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 [email protected] 删除。

原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。

如有侵权,请联系 [email protected] 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 使用HAI
    • HAI环境优势
    • 新建
    • 选择HAI配置
      • 1.选择应用
      • 2.计费模式
      • 3.地域
      • 4.实例名称
      • 5.云硬盘
    • 创建实例
    • 启动WebUI
    • 利用deepseek生成提示词
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档