添加青云AI服务提供商支持,修复火山引擎图片生成问题
- 新增青云(qingyun)provider支持,提供文本/图片/视频AI服务 - 修复火山引擎img2img模式下图片尺寸问题(参考图片时强制使用2K) - 修复火山引擎水印参数(watermark设为必需字段) - 前端添加图片删除功能,支持删除不满意的生成图片 - 优化素材选择器布局样式,提升用户体验 Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -24,7 +24,7 @@ type VolcEngineImageRequest struct {
|
||||
Image []string `json:"image,omitempty"`
|
||||
SequentialImageGeneration string `json:"sequential_image_generation,omitempty"`
|
||||
Size string `json:"size,omitempty"`
|
||||
Watermark bool `json:"watermark,omitempty"`
|
||||
Watermark bool `json:"watermark"`
|
||||
}
|
||||
|
||||
type VolcEngineImageResponse struct {
|
||||
@@ -82,7 +82,11 @@ func (c *VolcEngineImageClient) GenerateImage(prompt string, opts ...ImageOption
|
||||
}
|
||||
|
||||
size := options.Size
|
||||
if size == "" {
|
||||
// 火山引擎 img2img 模式要求图片尺寸至少 3686400 像素(约1920x1920)
|
||||
// 当使用参考图片时,强制使用 2K 尺寸
|
||||
if len(options.ReferenceImages) > 0 {
|
||||
size = "2K"
|
||||
} else if size == "" || size == "1024x1024" {
|
||||
if model == "doubao-seedream-4-5-251128" {
|
||||
size = "2K"
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user