Update index.html
Browse files- index.html +13 -6
index.html
CHANGED
|
@@ -282,10 +282,20 @@
|
|
| 282 |
<div class="settings-group"><label>تعداد خروجی (آهنگ):</label><input type="number" id="batch_size" value="1" min="1" max="4"></div>
|
| 283 |
<div class="settings-group"><label>تعداد گام (Steps):</label><input type="number" id="steps_input" value="20" min="4" max="50"></div>
|
| 284 |
<div class="settings-group"><label>سید (Seed) تصادفی=-1:</label><input type="number" id="seed_input" value="-1"></div>
|
|
|
|
|
|
|
| 285 |
<div class="settings-group"><label>مقیاس هدایت (CFG):</label><input type="number" id="cfg_input" value="7.0" step="0.5"></div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 286 |
</div>
|
| 287 |
|
| 288 |
-
<!-- بخشهای اضافه شده طبق درخواست شما -->
|
| 289 |
<div class="settings-group" style="border-top: 1px solid #e2e8f0; padding-top: 15px; margin-bottom: 10px;">
|
| 290 |
<label>آپلود آهنگ نمونه (Audio Conditioning):</label>
|
| 291 |
<input type="file" id="audio_reference" accept="audio/*" style="padding: 10px; width: 100%; background: #fff;">
|
|
@@ -295,7 +305,6 @@
|
|
| 295 |
<input type="checkbox" id="instrumental_chk">
|
| 296 |
<label for="instrumental_chk" style="font-size: 0.9rem; cursor: pointer;"><b>حالت بیکلام (Instrumental)</b><br><span style="font-size: 0.8rem; color: #666;">بدون خواننده، فقط موسیقی</span></label>
|
| 297 |
</div>
|
| 298 |
-
<!-- پایان بخشهای اضافه شده -->
|
| 299 |
|
| 300 |
<div class="checkbox-wrapper"><input type="checkbox" id="think_checkbox" checked><label for="think_checkbox" style="font-size: 0.9rem; cursor: pointer;"><b>فعالسازی تفکر مدل</b><br><span style="font-size: 0.8rem; color: #666;">افزایش کیفیت آهنگ</span></label></div>
|
| 301 |
</div>
|
|
@@ -500,13 +509,10 @@
|
|
| 500 |
const store = transaction.objectStore("songs");
|
| 501 |
store.add(newItem);
|
| 502 |
|
| 503 |
-
// --- دقیقا همان شرط حذف اضافه (بیشتر از 10) که قبلا بود ---
|
| 504 |
const countReq = store.count();
|
| 505 |
countReq.onsuccess = () => {
|
| 506 |
if (countReq.result > 10) store.openCursor().onsuccess = (e) => { if(e.target.result) e.target.result.delete(); };
|
| 507 |
};
|
| 508 |
-
// --------------------------------------------------------
|
| 509 |
-
|
| 510 |
transaction.oncomplete = () => loadHistory();
|
| 511 |
} catch (error) { console.error("Error saving:", error); }
|
| 512 |
}
|
|
@@ -688,9 +694,10 @@
|
|
| 688 |
const finalLyrics = isInstrumental ? "" : lyrics;
|
| 689 |
|
| 690 |
// ایندکس 2 = فایل صوتی (یا null)
|
|
|
|
| 691 |
// ایندکس 5 = متن ترانه
|
| 692 |
const payload = [
|
| 693 |
-
getVal('model_select'), "custom", uploadedAudioObj,
|
| 694 |
getNum('steps_input'), getNum('cfg_input'), true, getNum('seed_input'), null, -1,
|
| 695 |
getNum('batch_size'), null, null, 0, -1, "Fill the audio semantic mask based on the given conditions:",
|
| 696 |
1, "text2music", false, 0, 1, 3, "ode", "", "mp3", 0.85,
|
|
|
|
| 282 |
<div class="settings-group"><label>تعداد خروجی (آهنگ):</label><input type="number" id="batch_size" value="1" min="1" max="4"></div>
|
| 283 |
<div class="settings-group"><label>تعداد گام (Steps):</label><input type="number" id="steps_input" value="20" min="4" max="50"></div>
|
| 284 |
<div class="settings-group"><label>سید (Seed) تصادفی=-1:</label><input type="number" id="seed_input" value="-1"></div>
|
| 285 |
+
|
| 286 |
+
<!-- اصلاح: اضافه شدن مدت زمان در کنار CFG -->
|
| 287 |
<div class="settings-group"><label>مقیاس هدایت (CFG):</label><input type="number" id="cfg_input" value="7.0" step="0.5"></div>
|
| 288 |
+
<div class="settings-group">
|
| 289 |
+
<label>مدت زمان (Duration):</label>
|
| 290 |
+
<select id="duration_select">
|
| 291 |
+
<option value="unknown" selected>خودکار (پیشفرض)</option>
|
| 292 |
+
<option value="short">کوتاه</option>
|
| 293 |
+
<option value="medium">متوسط</option>
|
| 294 |
+
<option value="long">طولانی</option>
|
| 295 |
+
</select>
|
| 296 |
+
</div>
|
| 297 |
</div>
|
| 298 |
|
|
|
|
| 299 |
<div class="settings-group" style="border-top: 1px solid #e2e8f0; padding-top: 15px; margin-bottom: 10px;">
|
| 300 |
<label>آپلود آهنگ نمونه (Audio Conditioning):</label>
|
| 301 |
<input type="file" id="audio_reference" accept="audio/*" style="padding: 10px; width: 100%; background: #fff;">
|
|
|
|
| 305 |
<input type="checkbox" id="instrumental_chk">
|
| 306 |
<label for="instrumental_chk" style="font-size: 0.9rem; cursor: pointer;"><b>حالت بیکلام (Instrumental)</b><br><span style="font-size: 0.8rem; color: #666;">بدون خواننده، فقط موسیقی</span></label>
|
| 307 |
</div>
|
|
|
|
| 308 |
|
| 309 |
<div class="checkbox-wrapper"><input type="checkbox" id="think_checkbox" checked><label for="think_checkbox" style="font-size: 0.9rem; cursor: pointer;"><b>فعالسازی تفکر مدل</b><br><span style="font-size: 0.8rem; color: #666;">افزایش کیفیت آهنگ</span></label></div>
|
| 310 |
</div>
|
|
|
|
| 509 |
const store = transaction.objectStore("songs");
|
| 510 |
store.add(newItem);
|
| 511 |
|
|
|
|
| 512 |
const countReq = store.count();
|
| 513 |
countReq.onsuccess = () => {
|
| 514 |
if (countReq.result > 10) store.openCursor().onsuccess = (e) => { if(e.target.result) e.target.result.delete(); };
|
| 515 |
};
|
|
|
|
|
|
|
| 516 |
transaction.oncomplete = () => loadHistory();
|
| 517 |
} catch (error) { console.error("Error saving:", error); }
|
| 518 |
}
|
|
|
|
| 694 |
const finalLyrics = isInstrumental ? "" : lyrics;
|
| 695 |
|
| 696 |
// ایندکس 2 = فایل صوتی (یا null)
|
| 697 |
+
// ایندکس 3 = مدت زمان (پیشفرض unknown)
|
| 698 |
// ایندکس 5 = متن ترانه
|
| 699 |
const payload = [
|
| 700 |
+
getVal('model_select'), "custom", uploadedAudioObj, getVal('duration_select'), musicPrompt, finalLyrics, 0, "", "", "unknown",
|
| 701 |
getNum('steps_input'), getNum('cfg_input'), true, getNum('seed_input'), null, -1,
|
| 702 |
getNum('batch_size'), null, null, 0, -1, "Fill the audio semantic mask based on the given conditions:",
|
| 703 |
1, "text2music", false, 0, 1, 3, "ode", "", "mp3", 0.85,
|