Skip to content

Commit eba68aa

Browse files
committed
added support for amazon.nova-canvas
1 parent 83e98d8 commit eba68aa

8 files changed

+72
-63
lines changed

docs/CHANGELOG.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.2.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8-
## [0.48.0] - **BREAKING CHANGES**
8+
## [0.50.0] - **BREAKING CHANGES**
99

1010
- Module changes:
1111
- Added two new properties to all model documentation objects:
@@ -18,6 +18,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1818
- `Reset-ModelContext` - fixed issue where certain models were missing from validation.
1919
- Amazon
2020
- `Invoke-AmazonNovaTextModel` - added support for new Nova Text models: `amazon.nova-pro-v1:0`, `amazon.nova-lite-v1:0`, `amazon.nova-micro-v1:0`
21+
- `Invoke-AmazonImageModel`
22+
- added support for new Nova image model: `amazon.nova-canvas-v1:0`
23+
- fixed bug where files would not always save to drive
24+
- `CfgScale` parameter maximum adjusted from 10 to 9.9
2125
- Meta
2226
- Removed `meta.llama2-13b-chat-v1` and `meta.llama2-70b-chat-v1` from all functions as Bedrock has EOL these two models. - ***Breaking Change***
2327

docs/Invoke-AmazonImageModel.md

+2
Original file line numberDiff line numberDiff line change
@@ -883,4 +883,6 @@ Image generation and variation seem to work well.
883883
884884
[https://docs.aws.amazon.com/bedrock/latest/userguide/titan-image-models.html](https://docs.aws.amazon.com/bedrock/latest/userguide/titan-image-models.html)
885885
886+
[https://docs.aws.amazon.com/nova/latest/userguide/image-gen-req-resp-structure.html](https://docs.aws.amazon.com/nova/latest/userguide/image-gen-req-resp-structure.html)
887+
886888
[https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-titan-image.html](https://docs.aws.amazon.com/bedrock/latest/userguide/model-parameters-titan-image.html)

docs/pwshBedrock.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Module Name: pwshBedrock
33
Module Guid: b4f9e4dc-0229-44ef-99a1-08be4c5e81f2
44
Download Help Link: NA
5-
Help Version: 0.48.0
5+
Help Version: 0.50.0
66
Locale: en-US
77
---
88

src/Tests/Integration/Amazon.Tests.ps1

+27-27
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ InModuleScope 'pwshBedrock' {
5050
ModelID = $ModelID
5151
MaxTokens = 10
5252
Credential = $awsCredential
53-
Region = 'us-west-2'
53+
Region = 'us-east-1'
5454
NoContextPersist = $true
5555
Verbose = $false
5656
}
@@ -67,7 +67,7 @@ InModuleScope 'pwshBedrock' {
6767
ModelID = $ModelID
6868
MaxTokens = 10
6969
Credential = $awsCredential
70-
Region = 'us-west-2'
70+
Region = 'us-east-1'
7171
NoContextPersist = $true
7272
ReturnFullObject = $true
7373
Verbose = $false
@@ -100,7 +100,7 @@ User: Say the exact same thing you just said.
100100
CustomConversation = $customConversation
101101
ModelID = $ModelID
102102
Credential = $awsCredential
103-
Region = 'us-west-2'
103+
Region = 'us-east-1'
104104
Verbose = $false
105105
}
106106
$eval = Invoke-AmazonTextModel @invokeAmazonTextModelSplat
@@ -144,7 +144,7 @@ User: Say the exact same thing you just said.
144144
ModelID = $ModelID
145145
ReturnFullObject = $true
146146
Credential = $awsCredential
147-
Region = 'us-west-2'
147+
Region = 'us-east-1'
148148
Verbose = $false
149149
}
150150
$eval = Invoke-AmazonImageModel @invokeAmazonImageSplat
@@ -163,7 +163,7 @@ User: Say the exact same thing you just said.
163163
# ModelID = $ModelID
164164
# ReturnFullObject = $true
165165
# Credential = $awsCredential
166-
# Region = 'us-west-2'
166+
# Region = 'us-east-1'
167167
# Verbose = $false
168168
# }
169169
# $eval = Invoke-AmazonImageModel @invokeAmazonImageSplat
@@ -181,7 +181,7 @@ User: Say the exact same thing you just said.
181181
# ModelID = $ModelID
182182
# ReturnFullObject = $true
183183
# Credential = $awsCredential
184-
# Region = 'us-west-2'
184+
# Region = 'us-east-1'
185185
# Verbose = $false
186186
# }
187187
# $eval = Invoke-AmazonImageModel @invokeAmazonImageSplat
@@ -199,7 +199,7 @@ User: Say the exact same thing you just said.
199199
# ModelID = $ModelID
200200
# ReturnFullObject = $true
201201
# Credential = $awsCredential
202-
# Region = 'us-west-2'
202+
# Region = 'us-east-1'
203203
# Verbose = $false
204204
# }
205205
# $eval = Invoke-AmazonImageModel @invokeAmazonImageSplat
@@ -217,7 +217,7 @@ User: Say the exact same thing you just said.
217217
# ModelID = $ModelID
218218
# ReturnFullObject = $true
219219
# Credential = $awsCredential
220-
# Region = 'us-west-2'
220+
# Region = 'us-east-1'
221221
# Verbose = $false
222222
# }
223223
# $eval = Invoke-AmazonImageModel @invokeAmazonImageSplat
@@ -234,7 +234,7 @@ User: Say the exact same thing you just said.
234234
ModelID = $ModelID
235235
ReturnFullObject = $true
236236
Credential = $awsCredential
237-
Region = 'us-west-2'
237+
Region = 'us-east-1'
238238
Verbose = $false
239239
}
240240
$eval = Invoke-AmazonImageModel @invokeAmazonImageSplat
@@ -254,7 +254,7 @@ User: Say the exact same thing you just said.
254254
Start-Sleep -Milliseconds 5500
255255
}
256256

257-
It 'should return an image when using TEXT_IMAGE generation for <_.ModelId>' -Foreach ($script:amazonModelInfo | Where-Object { $_.ModelId -eq 'amazon.titan-image-generator-v2:0' }) {
257+
It 'should return an image when using TEXT_IMAGE generation for <_.ModelId>' -Foreach ($script:amazonModelInfo | Where-Object { $_.Image -eq $true -and $_.ModelId -ne 'amazon.titan-image-generator-v1'}) {
258258
$ModelID = $_.ModelID
259259
$invokeAmazonImageSplat = @{
260260
ImagesSavePath = $outFile
@@ -268,15 +268,15 @@ User: Say the exact same thing you just said.
268268
ModelID = $ModelID
269269
ReturnFullObject = $true
270270
Credential = $awsCredential
271-
Region = 'us-west-2'
271+
Region = 'us-east-1'
272272
Verbose = $false
273273
}
274274
$eval = Invoke-AmazonImageModel @invokeAmazonImageSplat
275275
$eval | Should -Not -BeNullOrEmpty
276276
$eval.images.Count | Should -Be 1
277277
} #it
278278

279-
It 'should return an image when using INPAINTING with a mask image for <_.ModelId>' -Foreach ($script:amazonModelInfo | Where-Object { $_.ModelId -eq 'amazon.titan-image-generator-v2:0' }) {
279+
It 'should return an image when using INPAINTING with a mask image for <_.ModelId>' -Foreach ($script:amazonModelInfo | Where-Object { $_.Image -eq $true -and $_.ModelId -ne 'amazon.titan-image-generator-v1'}) {
280280
$ModelID = $_.ModelID
281281
$invokeAmazonImageSplat = @{
282282
ImagesSavePath = $outFile
@@ -286,15 +286,15 @@ User: Say the exact same thing you just said.
286286
ModelID = $ModelID
287287
ReturnFullObject = $true
288288
Credential = $awsCredential
289-
Region = 'us-west-2'
289+
Region = 'us-east-1'
290290
Verbose = $false
291291
}
292292
$eval = Invoke-AmazonImageModel @invokeAmazonImageSplat
293293
$eval | Should -Not -BeNullOrEmpty
294294
$eval.images.Count | Should -Be 1
295295
} #it
296296

297-
It 'should return an image when using INPAINTING with a mask prompt for <_.ModelId>' -Foreach ($script:amazonModelInfo | Where-Object { $_.ModelId -eq 'amazon.titan-image-generator-v2:0' }) {
297+
It 'should return an image when using INPAINTING with a mask prompt for <_.ModelId>' -Foreach ($script:amazonModelInfo | Where-Object { $_.Image -eq $true -and $_.ModelId -ne 'amazon.titan-image-generator-v1'}) {
298298
$ModelID = $_.ModelID
299299
$invokeAmazonImageSplat = @{
300300
ImagesSavePath = $outFile
@@ -304,15 +304,15 @@ User: Say the exact same thing you just said.
304304
ModelID = $ModelID
305305
ReturnFullObject = $true
306306
Credential = $awsCredential
307-
Region = 'us-west-2'
307+
Region = 'us-east-1'
308308
Verbose = $false
309309
}
310310
$eval = Invoke-AmazonImageModel @invokeAmazonImageSplat
311311
$eval | Should -Not -BeNullOrEmpty
312312
$eval.images.Count | Should -Be 1
313313
} #it
314314

315-
It 'should return an image when using OUTPAINTING with a mask image for <_.ModelId>' -Foreach ($script:amazonModelInfo | Where-Object { $_.ModelId -eq 'amazon.titan-image-generator-v2:0' }) {
315+
It 'should return an image when using OUTPAINTING with a mask image for <_.ModelId>' -Foreach ($script:amazonModelInfo | Where-Object { $_.Image -eq $true -and $_.ModelId -ne 'amazon.titan-image-generator-v1'}) {
316316
$ModelID = $_.ModelID
317317
$invokeAmazonImageSplat = @{
318318
ImagesSavePath = $outFile
@@ -322,15 +322,15 @@ User: Say the exact same thing you just said.
322322
ModelID = $ModelID
323323
ReturnFullObject = $true
324324
Credential = $awsCredential
325-
Region = 'us-west-2'
325+
Region = 'us-east-1'
326326
Verbose = $false
327327
}
328328
$eval = Invoke-AmazonImageModel @invokeAmazonImageSplat
329329
$eval | Should -Not -BeNullOrEmpty
330330
$eval.images.Count | Should -Be 1
331331
} #it
332332

333-
It 'should return an image when using OUTPAINTING with a mask prompt for <_.ModelId>' -Foreach ($script:amazonModelInfo | Where-Object { $_.ModelId -eq 'amazon.titan-image-generator-v2:0' }) {
333+
It 'should return an image when using OUTPAINTING with a mask prompt for <_.ModelId>' -Foreach ($script:amazonModelInfo | Where-Object { $_.Image -eq $true -and $_.ModelId -ne 'amazon.titan-image-generator-v1'}) {
334334
$ModelID = $_.ModelID
335335
$invokeAmazonImageSplat = @{
336336
ImagesSavePath = $outFile
@@ -340,15 +340,15 @@ User: Say the exact same thing you just said.
340340
ModelID = $ModelID
341341
ReturnFullObject = $true
342342
Credential = $awsCredential
343-
Region = 'us-west-2'
343+
Region = 'us-east-1'
344344
Verbose = $false
345345
}
346346
$eval = Invoke-AmazonImageModel @invokeAmazonImageSplat
347347
$eval | Should -Not -BeNullOrEmpty
348348
$eval.images.Count | Should -Be 1
349349
} #it
350350

351-
It 'should return an image when using IMAGE_VARIATION for <_.ModelId>' -Foreach ($script:amazonModelInfo | Where-Object { $_.ModelId -eq 'amazon.titan-image-generator-v2:0' }) {
351+
It 'should return an image when using IMAGE_VARIATION for <_.ModelId>' -Foreach ($script:amazonModelInfo | Where-Object { $_.Image -eq $true -and $_.ModelId -ne 'amazon.titan-image-generator-v1'}) {
352352
$ModelID = $_.ModelID
353353
$invokeAmazonImageSplat = @{
354354
ImagesSavePath = $outFile
@@ -357,15 +357,15 @@ User: Say the exact same thing you just said.
357357
ModelID = $ModelID
358358
ReturnFullObject = $true
359359
Credential = $awsCredential
360-
Region = 'us-west-2'
360+
Region = 'us-east-1'
361361
Verbose = $false
362362
}
363363
$eval = Invoke-AmazonImageModel @invokeAmazonImageSplat
364364
$eval | Should -Not -BeNullOrEmpty
365365
$eval.images.Count | Should -Be 1
366366
} #it
367367

368-
It 'should return an image when using CONDITIONING for <_.ModelId>' -Foreach ($script:amazonModelInfo | Where-Object { $_.ModelId -eq 'amazon.titan-image-generator-v2:0' }) {
368+
It 'should return an image when using CONDITIONING for <_.ModelId>' -Foreach ($script:amazonModelInfo | Where-Object { $_.Image -eq $true -and $_.ModelId -ne 'amazon.titan-image-generator-v1'}) {
369369
$ModelID = $_.ModelID
370370
$invokeAmazonImageSplat = @{
371371
ImagesSavePath = $outFile
@@ -374,15 +374,15 @@ User: Say the exact same thing you just said.
374374
ModelID = $ModelID
375375
ReturnFullObject = $true
376376
Credential = $awsCredential
377-
Region = 'us-west-2'
377+
Region = 'us-east-1'
378378
Verbose = $false
379379
}
380380
$eval = Invoke-AmazonImageModel @invokeAmazonImageSplat
381381
$eval | Should -Not -BeNullOrEmpty
382382
$eval.images.Count | Should -Be 1
383383
} #it
384384

385-
It 'should return an image when providing specified colors for <_.ModelId>' -Foreach ($script:amazonModelInfo | Where-Object { $_.ModelId -eq 'amazon.titan-image-generator-v2:0' }) {
385+
It 'should return an image when providing specified colors for <_.ModelId>' -Foreach ($script:amazonModelInfo | Where-Object { $_.Image -eq $true -and $_.ModelId -ne 'amazon.titan-image-generator-v1'}) {
386386
$ModelID = $_.ModelID
387387
$invokeAmazonImageSplat = @{
388388
ImagesSavePath = $outFile
@@ -392,23 +392,23 @@ User: Say the exact same thing you just said.
392392
ModelID = $ModelID
393393
ReturnFullObject = $true
394394
Credential = $awsCredential
395-
Region = 'us-west-2'
395+
Region = 'us-east-1'
396396
Verbose = $false
397397
}
398398
$eval = Invoke-AmazonImageModel @invokeAmazonImageSplat
399399
$eval | Should -Not -BeNullOrEmpty
400400
$eval.images.Count | Should -Be 1
401401
} #it
402402

403-
It 'should return an image when using background removal for <_.ModelId>' -Foreach ($script:amazonModelInfo | Where-Object { $_.ModelId -eq 'amazon.titan-image-generator-v2:0' }) {
403+
It 'should return an image when using background removal for <_.ModelId>' -Foreach ($script:amazonModelInfo | Where-Object { $_.Image -eq $true -and $_.ModelId -ne 'amazon.titan-image-generator-v1'}) {
404404
$ModelID = $_.ModelID
405405
$invokeAmazonImageSplat = @{
406406
ImagesSavePath = $outFile
407407
BackgroundRemovalImagePath = $variationMainImage
408408
ModelID = $ModelID
409409
ReturnFullObject = $true
410410
Credential = $awsCredential
411-
Region = 'us-west-2'
411+
Region = 'us-east-1'
412412
Verbose = $false
413413
}
414414
$eval = Invoke-AmazonImageModel @invokeAmazonImageSplat

0 commit comments

Comments
 (0)