Skip to content

1.12.0

Choose a tag to compare

@sebsto sebsto released this 23 May 19:14
· 13 commits to main since this release
383f188

What's New

Stability AI image generation — Three new text-to-image models on Amazon Bedrock are now first-class BedrockModel constants:

  • BedrockModel.stable_image_corestability.stable-image-core-v1:1
  • BedrockModel.stable_image_ultrastability.stable-image-ultra-v1:1
  • BedrockModel.sd3_5_largestability.sd3-5-large-v1:0

All three are available in us-west-2. They slot into the existing BedrockService.generateImage(...) API without any signature changes — ImageResolution is mapped internally to the closest supported aspect_ratio (16:9, 1:1, 21:9, 2:3, 3:2, 4:5, 5:4, 9:16, 9:21).

let bedrock = try await BedrockService(region: .uswest2)
let output = try await bedrock.generateImage(
    "A serene landscape with mountains at sunset",
    with: .stable_image_core,
    seed: 42,
    resolution: ImageResolution(width: 1920, height: 1080)
)
try output.images.first?.write(to: URL(fileURLWithPath: "out.png"))

Stability-specific constraints surface as clear BedrockLibraryError.notSupported errors rather than silent ignores: Stability returns exactly one image per call (nrOfImages must be nil or 1), cfgScale and quality are not accepted, and negativePrompt is supported only by sd3_5_large. Image-to-image for sd3_5_large is intentionally deferred.

A new DocC article (Stability AI Image Generation) and a new Examples/stability-image/ standalone example are included.

Fixes

  • Removed a broken check-foundation CI job that has been a false pass since #22 — the script targeted the wrong binary path, so ldd never actually ran. Tracking the correct foundation-free goal in #84 and upstream at awslabs/aws-sdk-swift#2171.

What's Changed

  • Add support for Stability AI text-to-image models by @sebsto in #82
  • Remove broken check-foundation CI job by @sebsto in #83

Full Changelog: 1.11.0...1.12.0