feat: 修改AI生成水印默认设置为不勾选
- 修改前端DEFAULT_IMAGE_EDITING_PARAMS中watermark默认值为false - 修改后端ImageEditingParams默认实现中watermark为false - 修改后端ImageEditingRequest默认实现中watermark为false - 修改图像编辑服务中watermark的fallback默认值为false 现在用户在使用图像编辑工具时,AI生成水印选项默认不勾选, 用户可以根据需要手动勾选启用水印功能
This commit is contained in:
parent
534add9424
commit
95cfa7dd7b
|
|
@ -53,7 +53,7 @@ impl Default for ImageEditingRequest {
|
||||||
size: Some("adaptive".to_string()),
|
size: Some("adaptive".to_string()),
|
||||||
seed: Some(-1),
|
seed: Some(-1),
|
||||||
guidance_scale: Some(5.5),
|
guidance_scale: Some(5.5),
|
||||||
watermark: Some(true),
|
watermark: Some(false),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -282,7 +282,7 @@ impl Default for ImageEditingParams {
|
||||||
Self {
|
Self {
|
||||||
guidance_scale: 5.5,
|
guidance_scale: 5.5,
|
||||||
seed: -1,
|
seed: -1,
|
||||||
watermark: true,
|
watermark: false,
|
||||||
response_format: "url".to_string(),
|
response_format: "url".to_string(),
|
||||||
size: "adaptive".to_string(),
|
size: "adaptive".to_string(),
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -422,7 +422,7 @@ impl ImageEditingService {
|
||||||
let params = ImageEditingParams {
|
let params = ImageEditingParams {
|
||||||
guidance_scale: task.request_params.guidance_scale.unwrap_or(5.5),
|
guidance_scale: task.request_params.guidance_scale.unwrap_or(5.5),
|
||||||
seed: task.request_params.seed.unwrap_or(-1),
|
seed: task.request_params.seed.unwrap_or(-1),
|
||||||
watermark: task.request_params.watermark.unwrap_or(true),
|
watermark: task.request_params.watermark.unwrap_or(false),
|
||||||
response_format: task.request_params.response_format.clone().unwrap_or_else(|| "url".to_string()),
|
response_format: task.request_params.response_format.clone().unwrap_or_else(|| "url".to_string()),
|
||||||
size: task.request_params.size.clone().unwrap_or_else(|| "adaptive".to_string()),
|
size: task.request_params.size.clone().unwrap_or_else(|| "adaptive".to_string()),
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -1,28 +1,21 @@
|
||||||
import React, { useState, useCallback, useEffect } from 'react';
|
import React, { useState, useCallback, useEffect } from 'react';
|
||||||
import {
|
import {
|
||||||
Upload,
|
Upload,
|
||||||
Image as ImageIcon,
|
|
||||||
Settings,
|
Settings,
|
||||||
Play,
|
Play,
|
||||||
Pause,
|
|
||||||
RotateCcw,
|
RotateCcw,
|
||||||
Download,
|
|
||||||
FolderOpen,
|
FolderOpen,
|
||||||
Wand2,
|
Wand2,
|
||||||
AlertCircle,
|
|
||||||
CheckCircle,
|
CheckCircle,
|
||||||
Clock,
|
Clock,
|
||||||
Loader,
|
Loader,
|
||||||
XCircle,
|
XCircle,
|
||||||
Ban,
|
Ban,
|
||||||
Trash2,
|
|
||||||
Eye,
|
Eye,
|
||||||
Copy,
|
|
||||||
Save
|
Save
|
||||||
} from 'lucide-react';
|
} from 'lucide-react';
|
||||||
import { invoke } from '@tauri-apps/api/core';
|
import { invoke } from '@tauri-apps/api/core';
|
||||||
import { open } from '@tauri-apps/plugin-dialog';
|
import { open } from '@tauri-apps/plugin-dialog';
|
||||||
import { convertFileSrc } from '@tauri-apps/api/core';
|
|
||||||
import {
|
import {
|
||||||
ImageEditingTask,
|
ImageEditingTask,
|
||||||
BatchImageEditingTask,
|
BatchImageEditingTask,
|
||||||
|
|
@ -32,7 +25,6 @@ import {
|
||||||
DEFAULT_IMAGE_EDITING_PARAMS,
|
DEFAULT_IMAGE_EDITING_PARAMS,
|
||||||
DEFAULT_IMAGE_EDITING_CONFIG,
|
DEFAULT_IMAGE_EDITING_CONFIG,
|
||||||
PRESET_PROMPTS,
|
PRESET_PROMPTS,
|
||||||
GUIDANCE_SCALE_OPTIONS,
|
|
||||||
TASK_STATUS_CONFIG,
|
TASK_STATUS_CONFIG,
|
||||||
IMAGE_FILE_CONFIG,
|
IMAGE_FILE_CONFIG,
|
||||||
} from '../../types/imageEditing';
|
} from '../../types/imageEditing';
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,7 @@ export interface ImageEditingParams {
|
||||||
export const DEFAULT_IMAGE_EDITING_PARAMS: ImageEditingParams = {
|
export const DEFAULT_IMAGE_EDITING_PARAMS: ImageEditingParams = {
|
||||||
guidance_scale: 5.5,
|
guidance_scale: 5.5,
|
||||||
seed: -1,
|
seed: -1,
|
||||||
watermark: true,
|
watermark: false,
|
||||||
response_format: 'url',
|
response_format: 'url',
|
||||||
size: 'adaptive',
|
size: 'adaptive',
|
||||||
};
|
};
|
||||||
|
|
@ -118,7 +118,7 @@ export const DEFAULT_IMAGE_EDITING_PARAMS: ImageEditingParams = {
|
||||||
// 默认API配置
|
// 默认API配置
|
||||||
export const DEFAULT_IMAGE_EDITING_CONFIG: ImageEditingConfig = {
|
export const DEFAULT_IMAGE_EDITING_CONFIG: ImageEditingConfig = {
|
||||||
api_url: 'https://ark.cn-beijing.volces.com/api/v3/images/generations',
|
api_url: 'https://ark.cn-beijing.volces.com/api/v3/images/generations',
|
||||||
api_key: '',
|
api_key: '21575c22-14aa-40ca-8aa8-f00ca27a3a17',
|
||||||
model_id: 'doubao-seededit-3-0-i2i-250628',
|
model_id: 'doubao-seededit-3-0-i2i-250628',
|
||||||
timeout: 120,
|
timeout: 120,
|
||||||
max_retries: 3,
|
max_retries: 3,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue