tencentcloud-sdk-aiart 3.0.955 → 3.0.957

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a42084dcf99e691e42f149eca490d30f14fa93d5
4
- data.tar.gz: 3540526cc52a61b9329b6f11acd05246e3d232ba
3
+ metadata.gz: c029671ec9283dcd735853700c53fe704af05e65
4
+ data.tar.gz: c696d6b0ca3012b7601b7317a1c626096d455c56
5
5
  SHA512:
6
- metadata.gz: 63fe3bc7133f9ba18fd721f65a26f2a29e9e66a4b71962f271b5edb33442e44937b5518ea9faf8f9ec9bb9e53790db4f4f2a8634070aab30643af3905f38fbbd
7
- data.tar.gz: ef807cd3894f75945dbe74e646c1ad4c0384f74a13d12c073a47277b294c414c62b5559ef15172174e27fa6564f4690c10df3fba52f140804220aab736cb0943
6
+ metadata.gz: 3e1ed628fbe3b50ffc7ab298b4adac0d727c043c95eda48388afd980760fc8268fcf462dd1d8e75095c2df1c29aa517e154918abe6b0b35f8988e340d6725c63
7
+ data.tar.gz: 3024cf9b57e6689095f660c32409eda398e2a3f588945d77ba10436bd4402ba55faef75fa0f3250a6cb3e558f328b617f1f4369b870d613f7ee8f8aab9badf5f
data/lib/VERSION CHANGED
@@ -1 +1 @@
1
- 3.0.955
1
+ 3.0.957
@@ -80,6 +80,31 @@ module TencentCloud
80
80
  raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
81
81
  end
82
82
 
83
+ # 扩图接口支持对输入图像按指定宽高比实现智能扩图。
84
+ # 默认提供1个并发,代表最多能同时处理1个已提交的任务。
85
+
86
+ # @param request: Request instance for ImageOutpainting.
87
+ # @type request: :class:`Tencentcloud::aiart::V20221229::ImageOutpaintingRequest`
88
+ # @rtype: :class:`Tencentcloud::aiart::V20221229::ImageOutpaintingResponse`
89
+ def ImageOutpainting(request)
90
+ body = send_request('ImageOutpainting', request.serialize)
91
+ response = JSON.parse(body)
92
+ if response['Response'].key?('Error') == false
93
+ model = ImageOutpaintingResponse.new
94
+ model.deserialize(response['Response'])
95
+ model
96
+ else
97
+ code = response['Response']['Error']['Code']
98
+ message = response['Response']['Error']['Message']
99
+ reqid = response['Response']['RequestId']
100
+ raise TencentCloud::Common::TencentCloudSDKException.new(code, message, reqid)
101
+ end
102
+ rescue TencentCloud::Common::TencentCloudSDKException => e
103
+ raise e
104
+ rescue StandardError => e
105
+ raise TencentCloud::Common::TencentCloudSDKException.new(nil, e.inspect)
106
+ end
107
+
83
108
  # 图像风格化(图生图)接口提供生成式的图生图风格转化能力,将根据输入的图像及文本描述,智能生成风格转化后的图像。建议避免输入人像过小、姿势复杂、人数较多的人像图片。
84
109
  # 图像风格化(图生图)默认提供3个并发任务数,代表最多能同时处理3个已提交的任务,上一个任务处理完毕后才能开始处理下一个任务。
85
110
 
@@ -135,8 +135,13 @@ module TencentCloud
135
135
 
136
136
  # GenerateAvatar请求参数结构体
137
137
  class GenerateAvatarRequest < TencentCloud::Common::AbstractModel
138
- # @param Style: 头像风格。
139
- # 请在 [百变头像风格列表](https://cloud.tencent.com/document/product/1668/107741) 中选择期望的风格,必须传入风格编号。
138
+ # @param Type: 图像类型,默认为人像。
139
+ # human:人像头像,仅支持人像图片输入,建议避免上传无人、多人、人像过小的图片。
140
+ # pet:萌宠贴纸,仅支持动物图片输入,建议避免上传无动物、多动物、动物过小的图片。
141
+ # @type Type: String
142
+ # @param Style: 头像风格,仅在人像模式下生效。
143
+ # 若使用人像模式,请在 [百变头像风格列表](https://cloud.tencent.com/document/product/1668/107741) 中选择期望的风格,传入风格编号,不传默认使用 flower 风格。
144
+ # 若使用萌宠贴纸模式,无需选择风格,该参数不生效。
140
145
  # @type Style: String
141
146
  # @param InputImage: 输入图 Base64 数据。
142
147
  # Base64 和 Url 必须提供一个,如果都提供以 Url 为准。
@@ -146,7 +151,7 @@ module TencentCloud
146
151
  # Base64 和 Url 必须提供一个,如果都提供以 Url 为准。
147
152
  # 图片限制:单边分辨率小于5000,转成 Base64 字符串后小于 6MB,格式支持 jpg、jpeg、png、bmp、tiff、webp。
148
153
  # @type InputUrl: String
149
- # @param Filter: 输入图像质量检测开关,默认开启。
154
+ # @param Filter: 输入人像图的质量检测开关,默认开启,仅在人像模式下生效。
150
155
  # 1:开启
151
156
  # 0:关闭
152
157
  # 建议开启检测,可提升生成效果,关闭检测可能因输入图像质量较差导致生成效果受损。
@@ -165,9 +170,10 @@ module TencentCloud
165
170
  # @param RspImgType: 返回图像方式(base64 或 url) ,二选一,默认为 base64。url 有效期为1小时。
166
171
  # @type RspImgType: String
167
172
 
168
- attr_accessor :Style, :InputImage, :InputUrl, :Filter, :LogoAdd, :LogoParam, :RspImgType
173
+ attr_accessor :Type, :Style, :InputImage, :InputUrl, :Filter, :LogoAdd, :LogoParam, :RspImgType
169
174
 
170
- def initialize(style=nil, inputimage=nil, inputurl=nil, filter=nil, logoadd=nil, logoparam=nil, rspimgtype=nil)
175
+ def initialize(type=nil, style=nil, inputimage=nil, inputurl=nil, filter=nil, logoadd=nil, logoparam=nil, rspimgtype=nil)
176
+ @Type = type
171
177
  @Style = style
172
178
  @InputImage = inputimage
173
179
  @InputUrl = inputurl
@@ -178,6 +184,7 @@ module TencentCloud
178
184
  end
179
185
 
180
186
  def deserialize(params)
187
+ @Type = params['Type']
181
188
  @Style = params['Style']
182
189
  @InputImage = params['InputImage']
183
190
  @InputUrl = params['InputUrl']
@@ -213,6 +220,77 @@ module TencentCloud
213
220
  end
214
221
  end
215
222
 
223
+ # ImageOutpainting请求参数结构体
224
+ class ImageOutpaintingRequest < TencentCloud::Common::AbstractModel
225
+ # @param Ratio: 扩展后的比例(宽:高),需要不等于原图比例。
226
+ # 支持:1:1、4:3、3:4、16:9、9:16
227
+ # @type Ratio: String
228
+ # @param InputImage: 输入图 Base64 数据。
229
+ # Base64 和 Url 必须提供一个,如果都提供以 Url 为准。
230
+ # 图片限制:单边分辨率小于5000,转成 Base64 字符串后小于 6MB,格式支持 jpg、jpeg、png、bmp、tiff、webp。
231
+ # @type InputImage: String
232
+ # @param InputUrl: 输入图 Url。
233
+ # Base64 和 Url 必须提供一个,如果都提供以 Url 为准。
234
+ # 图片限制:单边分辨率小于5000,转成 Base64 字符串后小于 6MB,格式支持 jpg、jpeg、png、bmp、tiff、webp。
235
+ # @type InputUrl: String
236
+ # @param RspImgType: 返回图像方式(base64 或 url) ,二选一,默认为 base64。url 有效期为1小时。
237
+ # @type RspImgType: String
238
+ # @param LogoAdd: 为生成结果图添加标识的开关,默认为1。
239
+ # 1:添加标识。
240
+ # 0:不添加标识。
241
+ # 其他数值:默认按1处理。
242
+ # 建议您使用显著标识来提示结果图使用了 AI 绘画技术,是 AI 生成的图片。
243
+ # @type LogoAdd: Integer
244
+ # @param LogoParam: 标识内容设置。
245
+ # 默认在生成结果图右下角添加“图片由 AI 生成”字样,您可根据自身需要替换为其他的标识图片。
246
+ # @type LogoParam: :class:`Tencentcloud::Aiart.v20221229.models.LogoParam`
247
+
248
+ attr_accessor :Ratio, :InputImage, :InputUrl, :RspImgType, :LogoAdd, :LogoParam
249
+
250
+ def initialize(ratio=nil, inputimage=nil, inputurl=nil, rspimgtype=nil, logoadd=nil, logoparam=nil)
251
+ @Ratio = ratio
252
+ @InputImage = inputimage
253
+ @InputUrl = inputurl
254
+ @RspImgType = rspimgtype
255
+ @LogoAdd = logoadd
256
+ @LogoParam = logoparam
257
+ end
258
+
259
+ def deserialize(params)
260
+ @Ratio = params['Ratio']
261
+ @InputImage = params['InputImage']
262
+ @InputUrl = params['InputUrl']
263
+ @RspImgType = params['RspImgType']
264
+ @LogoAdd = params['LogoAdd']
265
+ unless params['LogoParam'].nil?
266
+ @LogoParam = LogoParam.new
267
+ @LogoParam.deserialize(params['LogoParam'])
268
+ end
269
+ end
270
+ end
271
+
272
+ # ImageOutpainting返回参数结构体
273
+ class ImageOutpaintingResponse < TencentCloud::Common::AbstractModel
274
+ # @param ResultImage: 根据入参 RspImgType 填入不同,返回不同的内容。
275
+ # 如果传入 base64 则返回生成图 Base64 编码。
276
+ # 如果传入 url 则返回的生成图 URL , 有效期1小时,请及时保存。
277
+ # @type ResultImage: String
278
+ # @param RequestId: 唯一请求 ID,由服务端生成,每次请求都会返回(若请求因其他原因未能抵达服务端,则该次请求不会获得 RequestId)。定位问题时需要提供该次请求的 RequestId。
279
+ # @type RequestId: String
280
+
281
+ attr_accessor :ResultImage, :RequestId
282
+
283
+ def initialize(resultimage=nil, requestid=nil)
284
+ @ResultImage = resultimage
285
+ @RequestId = requestid
286
+ end
287
+
288
+ def deserialize(params)
289
+ @ResultImage = params['ResultImage']
290
+ @RequestId = params['RequestId']
291
+ end
292
+ end
293
+
216
294
  # ImageToImage请求参数结构体
217
295
  class ImageToImageRequest < TencentCloud::Common::AbstractModel
218
296
  # @param InputImage: 输入图 Base64 数据。
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tencentcloud-sdk-aiart
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.955
4
+ version: 3.0.957
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tencent Cloud
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-12-04 00:00:00.000000000 Z
11
+ date: 2024-12-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tencentcloud-sdk-common