fix: 修复bug
This commit is contained in:
245
src/api/services/ImageGenerateService.ts
Normal file
245
src/api/services/ImageGenerateService.ts
Normal file
@@ -0,0 +1,245 @@
|
||||
/* generated using openapi-typescript-codegen -- do no edit */
|
||||
/* istanbul ignore file */
|
||||
/* tslint:disable */
|
||||
/* eslint-disable */
|
||||
import type { Body_async_change_bg_v3_api_v3_local_batch_change_bg_post } from '../models/Body_async_change_bg_v3_api_v3_local_batch_change_bg_post';
|
||||
import type { Body_async_cloud_change_bg_v3_api_v3_cloud_batch_change_bg_post } from '../models/Body_async_cloud_change_bg_v3_api_v3_cloud_batch_change_bg_post';
|
||||
import type { Body_async_cloud_gen_images_v3_api_v3_cloud_batch_edit_images_post } from '../models/Body_async_cloud_gen_images_v3_api_v3_cloud_batch_edit_images_post';
|
||||
import type { Body_local_async_change_bg_api_v2_local_batch_change_bg_post } from '../models/Body_local_async_change_bg_api_v2_local_batch_change_bg_post';
|
||||
import type { Body_local_async_gen_images_api_v2_local_batch_edit_images_post } from '../models/Body_local_async_gen_images_api_v2_local_batch_edit_images_post';
|
||||
import type { Body_local_cloud_async_change_bg_api_v2_cloud_batch_change_bg_post } from '../models/Body_local_cloud_async_change_bg_api_v2_cloud_batch_change_bg_post';
|
||||
import type { Body_local_cloud_async_gen_images_api_v2_cloud_batch_edit_images_post } from '../models/Body_local_cloud_async_gen_images_api_v2_cloud_batch_edit_images_post';
|
||||
import type { Body_local_gen_images_v3_api_v3_local_batch_edit_images_post } from '../models/Body_local_gen_images_v3_api_v3_local_batch_edit_images_post';
|
||||
import type { CancelablePromise } from '../core/CancelablePromise';
|
||||
import { OpenAPI } from '../core/OpenAPI';
|
||||
import { request as __request } from '../core/request';
|
||||
export class ImageGenerateService {
|
||||
/**
|
||||
* 本地新版异步图片生成接口
|
||||
* 本地新版异步图片生成接口
|
||||
*
|
||||
* Args:
|
||||
* clothing_images: 服装图片文件列表
|
||||
* tag_list: 标签列表JSON字符串,格式:["男_上衣_长款_牛仔_红", "xxxx"] 注意tag_list 与 clothing_images 长度一致
|
||||
* scenes_list: 场景标签JSON字符串,格式:[{"title": "客厅1","prompt": "室内场景..."}]
|
||||
* mode: 操作模式(both/edit_only/bg_only)
|
||||
* db: 数据库会话
|
||||
*
|
||||
* Returns:
|
||||
* dict: 异步任务提交结果
|
||||
* @returns any Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static localAsyncGenImagesApiV2LocalBatchEditImagesPost({
|
||||
formData,
|
||||
}: {
|
||||
formData: Body_local_async_gen_images_api_v2_local_batch_edit_images_post,
|
||||
}): CancelablePromise<any> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/api/v2/local/batch/edit/images',
|
||||
formData: formData,
|
||||
mediaType: 'multipart/form-data',
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 本地新版异步图片生成接口,支持垫图
|
||||
* 本地新版异步图片生成接口,支持垫图
|
||||
*
|
||||
* Args:
|
||||
* clothing_images: 服装图片文件列表
|
||||
* tag_list: 标签列表JSON字符串,格式:["男_上衣_长款_牛仔_红", "xxxx"]
|
||||
* padding_clothes: 垫图列表,用作模特图片,文件名格式:前缀_背景描述.jpg (如:model_室内客厅.jpg)
|
||||
* db: 数据库会话
|
||||
*
|
||||
* Returns:
|
||||
* dict: 异步任务提交结果
|
||||
* @returns any Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static localGenImagesV3ApiV3LocalBatchEditImagesPost({
|
||||
formData,
|
||||
}: {
|
||||
formData: Body_local_gen_images_v3_api_v3_local_batch_edit_images_post,
|
||||
}): CancelablePromise<any> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/api/v3/local/batch/edit/images',
|
||||
formData: formData,
|
||||
mediaType: 'multipart/form-data',
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 云端V3智能负载均衡异步图片生成接口,支持垫图
|
||||
* 云端V3智能负载均衡异步图片生成接口,支持垫图
|
||||
* 🧠 与V3本地版本逻辑完全相同,但使用智能负载均衡选择最优ComfyUI节点
|
||||
*
|
||||
* Args:
|
||||
* clothing_images: 服装图片文件列表
|
||||
* tag_list: 标签列表,用||分隔多个标签,格式:女_下衣_长款_牛仔_白||xxxx
|
||||
* padding_clothes: 垫图列表,用作模特图片,文件名格式:前缀_背景描述.jpg (如:model_室内客厅.jpg)
|
||||
* bg_prompts: 背景提示词,用 || 分隔多个提示词
|
||||
* db: 数据库会话
|
||||
*
|
||||
* Returns:
|
||||
* dict: 异步任务提交结果
|
||||
* @returns any Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static asyncCloudGenImagesV3ApiV3CloudBatchEditImagesPost({
|
||||
formData,
|
||||
}: {
|
||||
formData: Body_async_cloud_gen_images_v3_api_v3_cloud_batch_edit_images_post,
|
||||
}): CancelablePromise<any> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/api/v3/cloud/batch/edit/images',
|
||||
formData: formData,
|
||||
mediaType: 'multipart/form-data',
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 本地新版异步换背景接口
|
||||
* @returns any Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static localAsyncChangeBgApiV2LocalBatchChangeBgPost({
|
||||
formData,
|
||||
}: {
|
||||
formData: Body_local_async_change_bg_api_v2_local_batch_change_bg_post,
|
||||
}): CancelablePromise<any> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/api/v2/local/batch/change/bg',
|
||||
formData: formData,
|
||||
mediaType: 'multipart/form-data',
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 带垫图的换背景
|
||||
* 带垫图的换背景接口(简化版)
|
||||
* @returns any Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static asyncChangeBgV3ApiV3LocalBatchChangeBgPost({
|
||||
formData,
|
||||
}: {
|
||||
formData: Body_async_change_bg_v3_api_v3_local_batch_change_bg_post,
|
||||
}): CancelablePromise<any> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/api/v3/local/batch/change/bg',
|
||||
formData: formData,
|
||||
mediaType: 'multipart/form-data',
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* V3智能负载均衡带垫图的换背景
|
||||
* 智能负载均衡版本:带垫图的换背景接口
|
||||
* 🧠 与V3本地版本逻辑完全相同,但使用智能负载均衡选择最优ComfyUI节点
|
||||
* @returns any Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static asyncCloudChangeBgV3ApiV3CloudBatchChangeBgPost({
|
||||
formData,
|
||||
}: {
|
||||
formData: Body_async_cloud_change_bg_v3_api_v3_cloud_batch_change_bg_post,
|
||||
}): CancelablePromise<any> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/api/v3/cloud/batch/change/bg',
|
||||
formData: formData,
|
||||
mediaType: 'multipart/form-data',
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 本地V2云端智能负载均衡异步图片生成接口
|
||||
* 本地V2云端智能负载均衡异步图片生成接口
|
||||
*
|
||||
* 🚀 新功能:
|
||||
* - 智能负载均衡:自动选择最优ComfyUI节点
|
||||
* - 实时节点健康检测:避免任务分配到故障节点
|
||||
* - 性能优化:响应时间优化分配算法
|
||||
* - 内部统计监控:记录执行统计信息到日志
|
||||
*
|
||||
* Args:
|
||||
* clothing_images: 服装图片文件列表
|
||||
* tag_list: 标签列表JSON字符串,格式:["男_上衣_长款_牛仔_红", "xxxx"] 注意tag_list 与 clothing_images 长度一致
|
||||
* scenes_list: 场景标签JSON字符串,格式:[{"title": "客厅1","prompt": "室内场景..."}]
|
||||
* mode: 操作模式(both/edit_only/bg_only)
|
||||
* db: 数据库会话
|
||||
*
|
||||
* Returns:
|
||||
* dict: 异步任务提交结果(格式与V2版本完全一致)
|
||||
* @returns any Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static localCloudAsyncGenImagesApiV2CloudBatchEditImagesPost({
|
||||
formData,
|
||||
}: {
|
||||
formData: Body_local_cloud_async_gen_images_api_v2_cloud_batch_edit_images_post,
|
||||
}): CancelablePromise<any> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/api/v2/cloud/batch/edit/images',
|
||||
formData: formData,
|
||||
mediaType: 'multipart/form-data',
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 本地V2云端智能负载均衡异步换背景接口
|
||||
* 本地V2云端智能负载均衡异步换背景接口
|
||||
*
|
||||
* 🚀 新功能:
|
||||
* - 智能负载均衡:自动选择最优ComfyUI节点
|
||||
* - 实时节点健康检测:避免任务分配到故障节点
|
||||
* - 性能优化:响应时间优化分配算法
|
||||
* - 内部统计监控:记录执行统计信息到日志
|
||||
*
|
||||
* Args:
|
||||
* clothing_images: 服装图片文件列表
|
||||
* scenes_list: 场景标签集合JSON字符串
|
||||
* db: 数据库会话
|
||||
*
|
||||
* Returns:
|
||||
* dict: 异步任务提交结果(格式与V2版本完全一致)
|
||||
* @returns any Successful Response
|
||||
* @throws ApiError
|
||||
*/
|
||||
public static localCloudAsyncChangeBgApiV2CloudBatchChangeBgPost({
|
||||
formData,
|
||||
}: {
|
||||
formData: Body_local_cloud_async_change_bg_api_v2_cloud_batch_change_bg_post,
|
||||
}): CancelablePromise<any> {
|
||||
return __request(OpenAPI, {
|
||||
method: 'POST',
|
||||
url: '/api/v2/cloud/batch/change/bg',
|
||||
formData: formData,
|
||||
mediaType: 'multipart/form-data',
|
||||
errors: {
|
||||
422: `Validation Error`,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user