Generate the highest quality photorealistic images using Stability AI's Stable Image Ultra and Stable Diffusion 3.5 Large models via AWS Bedrock. The most po...
Generate the highest quality images on AWS Bedrock via Stability AI models.
ModelIDStrengthPriceStable Image Ultra 1.1stability.stable-image-ultra-v1:1Photorealism, luxury, fine detail, skin texture~$0.08/imgSD 3.5 Largestability.sd3-5-large-v1:0Creative diversity, prompt adherence, typography~$0.06/img
Default: Stable Image Ultra(最高画质)。
所有生图任务默认最高画质,不限成本。
MethodHow to UseBearer tokenAWS_BEARER_TOKEN_BEDROCK env var or --bearer-tokenEnvironment variablesSet AWS_ACCESS_KEY_ID + AWS_SECRET_ACCESS_KEYCredentials fileConfigure ~/.aws/credentialsNamed profile--profile my-profile or AWS_PROFILE env varDirect keys--access-key AKIA... --secret-key ...Temporary credentialsAdd --session-token with direct keysIAM instance roleAuto-detected on EC2/ECS/LambdaAWS SSORun aws sso login first
Auto-detection order: direct keys → profile → bearer token → env vars → credentials file → instance role → SSO.
bash
# 最高画质(默认)
python3 {baseDir}/scripts/generate.py "detailed English prompt" -o output.png --negative "blurry, low quality, artifacts"
# 指定比例
python3 {baseDir}/scripts/generate.py "prompt" -o output.png --aspect-ratio 16:9 --negative "blurry, low quality"
# SD 3.5 Large(创意多样性)
python3 {baseDir}/scripts/generate.py "prompt" -o output.png --model sd35 --negative "blurry, low quality"
FlagDefaultDescriptionprompt—Text description of the image (max 10,000 chars)-o, --outputoutput.pngOutput file path-m, --model``ultraModel: ultra or sd35``-n, --count1Number of images (1-5)--negative—Negative prompt (what to avoid) — 必填--aspect-ratio1:1Aspect ratio: 1:1, 16:9, 21:9, 2:3, 3:2, 4:5, 5:4, 9:16, 9:21--seedrandomSeed for reproducibility--regionus-west-2AWS region (Stability AI models require us-west-2)
text
blurry, low quality, watermark, text, logo, artifacts, noise, grain, pixelated, distorted, oversaturated, cartoon, anime, illustration, ugly, deformed
text
Ultra-sharp professional corporate headshot portrait photograph of a [年龄 性别 种族] [职业],
wearing [服装细节:面料、颜色、配饰],
[表情:warm confident smile / serious determined look],
photographed with 85mm f/1.4 portrait lens creating beautiful bokeh,
three-point studio lighting setup with key light at 45 degrees,
clean [背景颜色] studio backdrop,
shot from [构图:chest up / full body / three-quarter],
ultra high resolution 8K quality, skin detail like a magazine cover,
Hasselblad medium format camera quality
负面: cartoon, anime, illustration, painting, blurry, soft focus, distorted face, extra fingers, low quality, watermark, text, noise, grain, oversaturated, plastic skin, uncanny valley, artificial looking
text
Breathtaking [视角:aerial view / panoramic / eye-level] of [具体场景],
[季节/时间:autumn forest, morning fog, golden hour sunlight],
[天气/氛围:dramatic clouds, mist in valleys, sun rays breaking through],
ultra detailed landscape photography, shot with [镜头:wide angle 14mm / telephoto 200mm],
National Geographic quality, vibrant natural colors, sharp focus throughout,
[画面层次:foreground detail, middle ground subject, background depth]
负面: blurry, low quality, watermark, text, artificial, oversaturated, flat lighting, dull colors, haze, smog
text
Professional product photography of [产品],
[材质细节:brushed aluminum, matte ceramic, polished wood grain],
on [表面:marble countertop / dark slate / white seamless],
[光线:soft diffused studio lighting with subtle reflections],
sharp focus on product, shallow depth of field background blur,
commercial advertising quality, 8K resolution,
shot with Phase One IQ4 150MP medium format camera
负面: blurry, low quality, watermark, text, cheap looking, plastic, artificial, flat lighting, harsh shadows
text
[具体场景描述,用隐喻和具象化],
[艺术风格:watercolor / isometric / flat illustration / pop art / paper craft],
[配色方案:warm earth tones / pastel palette / vibrant saturated],
[细节:intricate details, fine textures, visible brushstrokes],
professional digital art, trending on ArtStation,
cinematic composition, dramatic lighting
负面: blurry, low quality, watermark, text, ugly, amateur, generic, stock photo, clipart
场景推荐比例头像/头图1:1博客配图/Banner16:9电影级场景21:9手机壁纸/海报9:16证件照/肖像2:3 或 4:5风景/横幅3:2 或 16:9
生图过程耗时较长(15-60s),必须用 subagent 异步执行,避免阻塞主对话。
javascript
sessions_spawn({
task: `使用 stable-image-ultra 生图:
## 要求
- Prompt: "<英文 prompt>"
- Negative: "<negative prompt>"
- Output: <输出路径>
- Aspect Ratio: <比例>
## 完成后
生成完毕后,报告文件路径、分辨率和文件大小。`,
label: "生图-<简述>",
runTimeoutSeconds: 180
})
// 派发后必须 yield 等待结果
sessions_yield({ message: "等待生图完成" })
subagent 返回后,由调用方负责将图片发送给用户(根据当前 channel 选择合适方式)。
generate.py(runTimeoutSeconds=180)us-west-2 (Oregon) 可用--force-document 避免压缩,其他渠道按需处理)