remove: 移除 image-01-live 模型及相关代码

This commit is contained in:
zwbcc
2026-03-28 21:07:29 +08:00
parent e20f53e253
commit 04068da6b0
4 changed files with 6 additions and 78 deletions

41
ui.js
View File

@@ -31,10 +31,6 @@ const nPlus = $('nPlus');
const seedInput = $('seedInput');
const widthInput = $('widthInput');
const heightInput = $('heightInput');
const styleGroup = $('styleGroup');
const styleType = $('styleType');
const styleWeight = $('styleWeight');
const weightHint = $('weightHint');
const promptOptimizer= $('promptOptimizer');
const watermark = $('watermark');
const settingsModal = $('settingsModal');
@@ -46,30 +42,6 @@ const apiKeyInput = $('apiKeyInput');
const toggleKey = $('toggleKey');
const baseUrlInput = $('baseUrlInput');
// ── Model tabs ─────────────────────────────────────────────────
document.querySelectorAll('.model-tab').forEach(tab => {
tab.addEventListener('click', () => {
const model = tab.dataset.model;
setModel(model);
});
});
function setModel(model) {
currentModel = model;
document.querySelectorAll('.model-tab').forEach(t =>
t.classList.toggle('active', t.dataset.model === model)
);
const isLive = model === 'image-01-live';
styleGroup.style.display = isLive ? '' : 'none';
// 21:9 only for image-01
const opt21_9 = aspectRatio.querySelector('option[value="21:9"]');
if (opt21_9) opt21_9.disabled = isLive;
if (isLive && aspectRatio.value === '21:9') aspectRatio.value = '16:9';
}
// ── Stepper (n) ────────────────────────────────────────────────
nMinus.addEventListener('click', () => {
@@ -82,12 +54,6 @@ nPlus.addEventListener('click', () => {
if (v <= 9) nInput.value = v;
});
// ── Weight slider ──────────────────────────────────────────────
styleWeight.addEventListener('input', () => {
weightHint.textContent = (styleWeight.value / 10).toFixed(1);
});
// ── Helpers ────────────────────────────────────────────────────
function setLoading(on) {
@@ -135,13 +101,6 @@ function buildPayload() {
if (promptOptimizer.checked) payload.prompt_optimizer = true;
if (watermark.checked) payload.aigc_watermark = true;
if (currentModel === 'image-01-live') {
payload.style = {
style_type: styleType.value,
style_weight: parseFloat((styleWeight.value / 10).toFixed(1)),
};
}
return payload;
}