LaiTool/src/define/define.js
lq1405 03d3ff7e9d V 3.2.4(2025.02.24)
1. 新增MJ(API,代理模式)国内转发接口(不包括反推),解决部分用户不能访问外部网络
2. 新增 FLUX-API 国内转发接口,解决部分用户不能访问外部网络(可能出现超时报错)
3. 动态设置FLUX模型,统一后台管理
4. 新增图转视频国内(Kling,Luma,Runway)转发接口,解决部分用户不能访问外部网络
5. 新增支持 Luma 慢速模型
6. 优化MJ设置及MJ请求,减少出错
7. MJ代理模式取消账号生图速度校验
注意:本次更新需要重新设置MJ设置(代理账号不用)
2025-02-24 17:25:00 +08:00

164 lines
7.4 KiB
JavaScript

let define = {}
const isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined'
if (!isBrowser) {
const path = require('path')
const { app } = require('electron')
if (!app.isPackaged) {
define = {
discordScript: path.join(__dirname, '../../src/main/discord/discordScript.js'),
zhanwei_image: path.join(__dirname, '../../resources/image/zhanwei.png'),
config_path: path.join(__dirname, '../../resources/config/global_setting.json'),
clip_setting: path.join(__dirname, '../../resources/config/clip_setting.json'),
sd_setting: path.join(__dirname, '../../resources/config/sd_config.json'),
dynamic_setting: path.join(__dirname, '../../resources/config/dynamic_setting.json'),
tag_setting: path.join(__dirname, '../../resources/config/tag_setting.json'),
img_base: path.join(__dirname, '../../resources/config/img_base.json'),
video_config: path.join(__dirname, '../../resources/config/video_config.json'),
system_config: path.join(__dirname, '../../resources/config/system_config.json'),
scripts_path: path.join(__dirname, '../../resources/scripts'),
db_path: path.join(__dirname, '../../resources/scripts/db'),
project_path: path.join(__dirname, '../../project'),
tts_path: path.join(__dirname, '../../tts'),
logger_path: path.join(__dirname, '../../resources/logger'),
package_path: path.join(__dirname, '../../resources/package'),
image_path: path.join(__dirname, '../../resources/image'),
temp_sd_image: path.join(__dirname, '../../resources/image/TempSDImage'),
draft_temp_path: path.join(__dirname, '../../resources/tmp/temp.zip'),
init_config_path: path.join(__dirname, '../../resources/tmp/config'),
clip_speed_temp_path: path.join(__dirname, '../../resources/tmp/Clip/speeds_tmp.json'),
add_canvases_temp_path: path.join(__dirname, '../../resources/tmp/Clip/canvases_tmp.json'),
add_sound_channel_mappings_temp_path: path.join(
__dirname,
'../../resources/tmp/Clip/sound_channel_mappings_tmp.json'
),
add_vocal_separations_temp_path: path.join(
__dirname,
'../../resources/tmp/Clip/vocal_separations_tmp.json'
),
add_material_video_temp_path: path.join(
__dirname,
'../../resources/tmp/Clip/videoMaterialTemp.json'
),
add_tracks_segments_temp_path: path.join(
__dirname,
'../../resources/tmp/Clip/tracks_segments_tmp.json'
),
add_tracks_type_temp_path: path.join(
__dirname,
'../../resources/tmp/Clip/tracks_type_tmp.json'
),
add_material_animations_temp_path: path.join(
__dirname,
'../../resources/tmp/Clip/material_animations_tmp.json'
),
add_material_text_temp_path: path.join(
__dirname,
'../../resources/tmp/Clip/material_text_temp.json'
),
add_track_text_segments_temp_path: path.join(
__dirname,
'../../resources/tmp/Clip/track_text_segments_temp.json'
),
add_materials_beats_tmp_path: path.join(
__dirname,
'../../resources/tmp/Clip/materials_beats_tmp.json'
),
add_materials_audios_tmp_path: path.join(
__dirname,
'../../resources/tmp/Clip/materials_audios_tmp.json'
),
add_tracks_audio_segments_tmp_path: path.join(
__dirname,
'../../resources/tmp/Clip/tracks_audio_segments_tmp.json'
),
add_keyframe_tmp_path: path.join(__dirname, '../../resources/tmp/Clip/keyframe_tmp.json')
}
} else {
define = {
zhanwei_image: path.join(__dirname, '../../../resources/image/zhanwei.png'),
config_path: path.join(__dirname, '../../../resources/config/global_setting.json'),
clip_setting: path.join(__dirname, '../../../resources/config/clip_setting.json'),
sd_setting: path.join(__dirname, '../../../resources/config/sd_config.json'),
dynamic_setting: path.join(__dirname, '../../../resources/config/dynamic_setting.json'),
tag_setting: path.join(__dirname, '../../../resources/config/tag_setting.json'),
video_config: path.join(__dirname, '../../../resources/config/video_config.json'),
system_config: path.join(__dirname, '../../../resources/config/system_config.json'),
img_base: path.join(__dirname, '../../../resources/config/img_base.json'),
scripts_path: path.join(__dirname, '../../../resources/scripts'),
db_path: path.join(__dirname, '../../../resources/scripts/db'),
project_path: path.join(__dirname, '../../../project'),
tts_path: path.join(__dirname, '../../../tts'),
logger_path: path.join(__dirname, '../../../resources/logger'),
package_path: path.join(__dirname, '../../../resources/package'),
discordScript: path.join(__dirname, '../../../resources/scripts/discordScript.js'),
image_path: path.join(__dirname, '../../../resources/image'),
temp_sd_image: path.join(__dirname, '../../../resources/image/TempSDImage'),
draft_temp_path: path.join(__dirname, '../../../resources/tmp/temp.zip'),
init_config_path: path.join(__dirname, '../../../resources/tmp/config'),
clip_speed_temp_path: path.join(__dirname, '../../../resources/tmp/Clip/speeds_tmp.json'),
add_canvases_temp_path: path.join(__dirname, '../../../resources/tmp/Clip/canvases_tmp.json'),
add_sound_channel_mappings_temp_path: path.join(
__dirname,
'../../../resources/tmp/Clip/sound_channel_mappings_tmp.json'
),
add_vocal_separations_temp_path: path.join(
__dirname,
'../../../resources/tmp/Clip/vocal_separations_tmp.json'
),
add_material_video_temp_path: path.join(
__dirname,
'../../../resources/tmp/Clip/videoMaterialTemp.json'
),
add_tracks_segments_temp_path: path.join(
__dirname,
'../../../resources/tmp/Clip/tracks_segments_tmp.json'
),
add_tracks_type_temp_path: path.join(
__dirname,
'../../../resources/tmp/Clip/tracks_type_tmp.json'
),
add_material_animations_temp_path: path.join(
__dirname,
'../../../resources/tmp/Clip/material_animations_tmp.json'
),
add_material_text_temp_path: path.join(
__dirname,
'../../../resources/tmp/Clip/material_text_temp.json'
),
add_track_text_segments_temp_path: path.join(
__dirname,
'../../../resources/tmp/Clip/track_text_segments_temp.json'
),
add_materials_beats_tmp_path: path.join(
__dirname,
'../../../resources/tmp/Clip/materials_beats_tmp.json'
),
add_materials_audios_tmp_path: path.join(
__dirname,
'../../../resources/tmp/Clip/materials_audios_tmp.json'
),
add_tracks_audio_segments_tmp_path: path.join(
__dirname,
'../../../resources/tmp/Clip/tracks_audio_segments_tmp.json'
),
add_keyframe_tmp_path: path.join(__dirname, '../../../resources/tmp/Clip/keyframe_tmp.json')
}
}
}
define['remotemj_api'] = 'https://api.laitool.net/'
define['serverUrl'] = 'http://lms.laitool.cn'
// define['serverUrl'] = 'https://localhost:44362'
define['hkServerUrl'] = 'https://laitool.net/'
define['bakServerUrl'] = 'https://laitool.net/'
define['API'] = 'f85d39ed5a40fd09966f13f12b6cf0f0'
// define['lms'] =
// process.env.NODE_ENV == 'development' ? 'https://localhost:44362' : 'https://lms.laitool.cn'
define['lms'] = 'https://lms.laitool.cn'
export { define }