image 4.x
This commit is contained in:
parent
6654a0e076
commit
e54a9b6f70
@ -75,7 +75,7 @@ export default {
|
|||||||
// 随机挑选一个refresh_token
|
// 随机挑选一个refresh_token
|
||||||
const token = _.sample(tokens);
|
const token = _.sample(tokens);
|
||||||
const {
|
const {
|
||||||
// model,
|
model,
|
||||||
task_id,
|
task_id,
|
||||||
prompt,
|
prompt,
|
||||||
// negative_prompt: negativePrompt,
|
// negative_prompt: negativePrompt,
|
||||||
@ -88,7 +88,7 @@ export default {
|
|||||||
|
|
||||||
if (USE_DATABASE_MODE) {
|
if (USE_DATABASE_MODE) {
|
||||||
// 使用新的数据库方法
|
// 使用新的数据库方法
|
||||||
await DatabaseGenerationService.generateImagesV2('jimeng-3.0', task_id, prompt, {
|
await DatabaseGenerationService.generateImagesV2(model || 'jimeng-3.0', task_id, prompt, {
|
||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
sampleStrength: 0.5,
|
sampleStrength: 0.5,
|
||||||
@ -97,7 +97,7 @@ export default {
|
|||||||
}, token);
|
}, token);
|
||||||
} else {
|
} else {
|
||||||
// 使用原有方法(不等待结果)
|
// 使用原有方法(不等待结果)
|
||||||
generateImages('jimeng-3.0', task_id, prompt, {
|
generateImages(model || 'jimeng-3.0', task_id, prompt, {
|
||||||
width,
|
width,
|
||||||
height,
|
height,
|
||||||
sampleStrength: 0.5,
|
sampleStrength: 0.5,
|
||||||
|
|||||||
@ -771,6 +771,9 @@ export class TaskPollingService {
|
|||||||
|
|
||||||
// 映射模型
|
// 映射模型
|
||||||
const MODEL_MAP = {
|
const MODEL_MAP = {
|
||||||
|
"jimeng-4.5": "high_aes_general_v40l",
|
||||||
|
"jimeng-4.1": "high_aes_general_v41",
|
||||||
|
"jimeng-4.0": "high_aes_general_v40",
|
||||||
"jimeng-3.1": "high_aes_general_v30l_art_fangzhou:general_v3.0_18b",
|
"jimeng-3.1": "high_aes_general_v30l_art_fangzhou:general_v3.0_18b",
|
||||||
"jimeng-3.0": "high_aes_general_v30l:general_v3.0_18b",
|
"jimeng-3.0": "high_aes_general_v30l:general_v3.0_18b",
|
||||||
"jimeng-2.1": "high_aes_general_v21_L:general_v2.1_L",
|
"jimeng-2.1": "high_aes_general_v21_L:general_v2.1_L",
|
||||||
@ -781,6 +784,11 @@ export class TaskPollingService {
|
|||||||
};
|
};
|
||||||
const mappedModel = MODEL_MAP[model] || MODEL_MAP["jimeng-3.0"];
|
const mappedModel = MODEL_MAP[model] || MODEL_MAP["jimeng-3.0"];
|
||||||
|
|
||||||
|
// 4.x 模型特殊参数
|
||||||
|
const isV4 = model.startsWith('jimeng-4');
|
||||||
|
const currentVersion = isV4 ? '3.3.7' : "3.0.2";
|
||||||
|
const resolutionType = isV4 ? '2k' : '1k';
|
||||||
|
|
||||||
const componentId = this.generateUUID();
|
const componentId = this.generateUUID();
|
||||||
const submitId = this.generateUUID();
|
const submitId = this.generateUUID();
|
||||||
|
|
||||||
@ -818,7 +826,7 @@ export class TaskPollingService {
|
|||||||
id: this.generateUUID(),
|
id: this.generateUUID(),
|
||||||
min_version: "3.0.2",
|
min_version: "3.0.2",
|
||||||
is_from_tsn: true,
|
is_from_tsn: true,
|
||||||
version: "3.0.2",
|
version: currentVersion,
|
||||||
main_component_id: componentId,
|
main_component_id: componentId,
|
||||||
component_list: [
|
component_list: [
|
||||||
{
|
{
|
||||||
@ -847,7 +855,7 @@ export class TaskPollingService {
|
|||||||
id: this.generateUUID(),
|
id: this.generateUUID(),
|
||||||
height,
|
height,
|
||||||
width,
|
width,
|
||||||
resolution_type: "1k",
|
resolution_type: resolutionType,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
history_option: {
|
history_option: {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user