@@ -6282,6 +6282,19 @@ class _UpscaleImageAPIConfig(_common.BaseModel):
6282
6282
description = """The level of compression if the ``output_mime_type`` is
6283
6283
``image/jpeg``.""" ,
6284
6284
)
6285
+ enhance_input_image : Optional [bool ] = Field (
6286
+ default = None ,
6287
+ description = """Whether to add an image enhancing step before upscaling.
6288
+ It is expected to suppress the noise and JPEG compression artifacts
6289
+ from the input image.""" ,
6290
+ )
6291
+ image_preservation_factor : Optional [float ] = Field (
6292
+ default = None ,
6293
+ description = """With a higher image preservation factor, the original image
6294
+ pixels are more respected. With a lower image preservation factor, the
6295
+ output image will have be more different from the input image, but
6296
+ with finer details and less noise.""" ,
6297
+ )
6285
6298
number_of_images : Optional [int ] = Field (default = None , description = """""" )
6286
6299
mode : Optional [str ] = Field (default = None , description = """""" )
6287
6300
@@ -6307,6 +6320,17 @@ class _UpscaleImageAPIConfigDict(TypedDict, total=False):
6307
6320
"""The level of compression if the ``output_mime_type`` is
6308
6321
``image/jpeg``."""
6309
6322
6323
+ enhance_input_image : Optional [bool ]
6324
+ """Whether to add an image enhancing step before upscaling.
6325
+ It is expected to suppress the noise and JPEG compression artifacts
6326
+ from the input image."""
6327
+
6328
+ image_preservation_factor : Optional [float ]
6329
+ """With a higher image preservation factor, the original image
6330
+ pixels are more respected. With a lower image preservation factor, the
6331
+ output image will have be more different from the input image, but
6332
+ with finer details and less noise."""
6333
+
6310
6334
number_of_images : Optional [int ]
6311
6335
""""""
6312
6336
@@ -10518,6 +10542,19 @@ class UpscaleImageConfig(_common.BaseModel):
10518
10542
description = """The level of compression if the ``output_mime_type`` is
10519
10543
``image/jpeg``.""" ,
10520
10544
)
10545
+ enhance_input_image : Optional [bool ] = Field (
10546
+ default = None ,
10547
+ description = """Whether to add an image enhancing step before upscaling.
10548
+ It is expected to suppress the noise and JPEG compression artifacts
10549
+ from the input image.""" ,
10550
+ )
10551
+ image_preservation_factor : Optional [float ] = Field (
10552
+ default = None ,
10553
+ description = """With a higher image preservation factor, the original image
10554
+ pixels are more respected. With a lower image preservation factor, the
10555
+ output image will have be more different from the input image, but
10556
+ with finer details and less noise.""" ,
10557
+ )
10521
10558
10522
10559
10523
10560
class UpscaleImageConfigDict (TypedDict , total = False ):
@@ -10542,6 +10579,17 @@ class UpscaleImageConfigDict(TypedDict, total=False):
10542
10579
"""The level of compression if the ``output_mime_type`` is
10543
10580
``image/jpeg``."""
10544
10581
10582
+ enhance_input_image : Optional [bool ]
10583
+ """Whether to add an image enhancing step before upscaling.
10584
+ It is expected to suppress the noise and JPEG compression artifacts
10585
+ from the input image."""
10586
+
10587
+ image_preservation_factor : Optional [float ]
10588
+ """With a higher image preservation factor, the original image
10589
+ pixels are more respected. With a lower image preservation factor, the
10590
+ output image will have be more different from the input image, but
10591
+ with finer details and less noise."""
10592
+
10545
10593
10546
10594
UpscaleImageConfigOrDict = Union [UpscaleImageConfig , UpscaleImageConfigDict ]
10547
10595
0 commit comments