dsh-lovart-mcp 0.15.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +8 -2
- package/lib/pricing.mjs +64 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -65,8 +65,14 @@ dsh plugin install dsh-lovart-mcp
|
|
|
65
65
|
| --- | --- |
|
|
66
66
|
| Nano Banana 2 1K 图(Relax 通道) | 0 |
|
|
67
67
|
| GPT Image 2 2048×2048 | 12 |
|
|
68
|
-
|
|
|
69
|
-
|
|
|
68
|
+
| Wan 2.5 5 秒 720p | 25 |
|
|
69
|
+
| Kling 4.0 Flash 5 秒 720p | 45 |
|
|
70
|
+
| Seedance 2.0 Mini 5 秒 720p | 50 |
|
|
71
|
+
| Seedance 2.0 Fast 5 秒 720p | 70 |
|
|
72
|
+
| Seedance 2.0 5 秒 720p / 1080p | 90 / 250 |
|
|
73
|
+
| Seedance 2.5 Flash 5 秒 720p(含音频) | 101 |
|
|
74
|
+
| Hailuo 02 6 秒 768P(文生视频) | 12 |
|
|
75
|
+
| Vidu Q1 5 秒 1080p(参考图生视频,需 `images`) | 28 |
|
|
70
76
|
| 放大 / 矢量化 / 分层 / 改图 | 4 / 9 / 5 / 17 |
|
|
71
77
|
|
|
72
78
|
按 Pro 月付折算,1 积分约 $0.0082。其他模型的价格 Lovart 没有公开,插件会在花分前把估算和「需要确认」一起给你。
|
package/lib/pricing.mjs
CHANGED
|
@@ -58,6 +58,56 @@ export const VIDEO_MODELS = {
|
|
|
58
58
|
label: 'Seedance 2.0',
|
|
59
59
|
defaultResolution: '720p',
|
|
60
60
|
per5s: { '720p': 90, '1080p': 250 },
|
|
61
|
+
perSecond: { '720p': 18, '1080p': 50 },
|
|
62
|
+
measured: true,
|
|
63
|
+
},
|
|
64
|
+
'seedance/seedance-2-0-fast': {
|
|
65
|
+
label: 'Seedance 2.0 Fast',
|
|
66
|
+
defaultResolution: '720p',
|
|
67
|
+
per5s: { '720p': 70 },
|
|
68
|
+
perSecond: { '720p': 14 },
|
|
69
|
+
measured: true,
|
|
70
|
+
},
|
|
71
|
+
'seedance/seedance-2-0-mini': {
|
|
72
|
+
label: 'Seedance 2.0 Mini',
|
|
73
|
+
defaultResolution: '720p',
|
|
74
|
+
per5s: { '720p': 50 },
|
|
75
|
+
perSecond: { '720p': 10 },
|
|
76
|
+
measured: true,
|
|
77
|
+
},
|
|
78
|
+
'seedance/seedance-2-5-flash': {
|
|
79
|
+
label: 'Seedance 2.5 Flash',
|
|
80
|
+
defaultResolution: '720p',
|
|
81
|
+
per5s: { '720p': 101 },
|
|
82
|
+
perSecond: { '720p': 20.2 },
|
|
83
|
+
measured: true,
|
|
84
|
+
},
|
|
85
|
+
'kling/kling-v4-flash': {
|
|
86
|
+
label: 'Kling 4.0 Flash',
|
|
87
|
+
defaultResolution: '720p',
|
|
88
|
+
per5s: { '720p': 45 },
|
|
89
|
+
perSecond: { '720p': 9 },
|
|
90
|
+
measured: true,
|
|
91
|
+
},
|
|
92
|
+
'wan/wan-2-5-preview': {
|
|
93
|
+
label: 'Wan 2.5',
|
|
94
|
+
defaultResolution: '720p',
|
|
95
|
+
per5s: { '720p': 25 },
|
|
96
|
+
perSecond: { '720p': 5 },
|
|
97
|
+
measured: true,
|
|
98
|
+
},
|
|
99
|
+
'minimax/minimax-hailuo-02': {
|
|
100
|
+
label: 'Hailuo 02',
|
|
101
|
+
defaultResolution: '768p',
|
|
102
|
+
per5s: { '768p': 12 },
|
|
103
|
+
perSecond: { '768p': 2 },
|
|
104
|
+
measured: true,
|
|
105
|
+
},
|
|
106
|
+
'vidu/vidu-q1': {
|
|
107
|
+
label: 'Vidu Q1',
|
|
108
|
+
defaultResolution: '1080p',
|
|
109
|
+
per5s: { '1080p': 28 },
|
|
110
|
+
perSecond: { '1080p': 5.6 },
|
|
61
111
|
measured: true,
|
|
62
112
|
},
|
|
63
113
|
}
|
|
@@ -168,16 +218,26 @@ export function estimateVideo({ model, resolution, duration, count = 1 }) {
|
|
|
168
218
|
const res = resolution === undefined || String(resolution).trim() === '' || /K$/ui.test(String(resolution))
|
|
169
219
|
? entry.defaultResolution
|
|
170
220
|
: String(resolution).toLowerCase()
|
|
171
|
-
const
|
|
221
|
+
const pickRate = (table) => {
|
|
222
|
+
if (table === undefined) return undefined
|
|
223
|
+
const key = Object.keys(table).find((candidate) => candidate.toLowerCase() === res.toLowerCase())
|
|
224
|
+
return key === undefined ? undefined : table[key]
|
|
225
|
+
}
|
|
226
|
+
const per5s = pickRate(entry.per5s)
|
|
227
|
+
const perSecond = pickRate(entry.perSecond)
|
|
172
228
|
const seconds = Math.max(1, Number(duration) || 5)
|
|
173
|
-
const units = Math.max(1, Math.ceil(seconds / 5))
|
|
174
229
|
const countUnits = Math.max(1, Number(count) || 1)
|
|
175
|
-
const
|
|
230
|
+
const perOutput = typeof perSecond === 'number'
|
|
231
|
+
? Math.round(perSecond * seconds)
|
|
232
|
+
: typeof per5s === 'number'
|
|
233
|
+
? per5s * Math.max(1, Math.ceil(seconds / 5))
|
|
234
|
+
: null
|
|
235
|
+
const credits = perOutput === null ? null : perOutput * countUnits
|
|
176
236
|
return {
|
|
177
237
|
model: chosen,
|
|
178
238
|
label: entry.label,
|
|
179
239
|
credits,
|
|
180
|
-
perOutput
|
|
240
|
+
perOutput,
|
|
181
241
|
resolution: res,
|
|
182
242
|
seconds,
|
|
183
243
|
count: countUnits,
|