fix control input media with non-english locales

Signed-off-by: vladmandic <mandic00@live.com>
This commit is contained in:
vladmandic
2025-12-21 14:44:35 +01:00
parent e698441d35
commit 0e24b7701d
2 changed files with 7 additions and 2 deletions
+2 -1
View File
@@ -1,6 +1,6 @@
# Change Log for SD.Next
## Update for 2025-12-18
## Update for 2025-12-21
- **Models**
- [LongCat Image](https://github.com/meituan-longcat/LongCat-Image) in *Image* and *Image Edit* variants
@@ -27,6 +27,7 @@
- tokenizer expclit use for flux2, thanks @CalamitousFelicitousness
- torch.compile skip offloading steps
- kanvas css with standardui
- control input media with non-english locales
## Update for 2025-12-11
+5 -1
View File
@@ -3,7 +3,11 @@ function controlInputMode(inputMode, ...args) {
if (updateEl) updateEl.click();
const tab = gradioApp().querySelector('#control-tab-input button.selected');
if (!tab) return ['Image', ...args];
let inputTab = tab.innerText;
// let inputTab = tab.innerText;
const tabs = Array.from(gradioApp().querySelectorAll('#control-tab-input button'));
const tabIdx = tabs.findIndex((btn) => btn.classList.contains('selected'))
const tabNames = ['Image', 'Video', 'Batch', 'Folder'];
let inputTab = tabNames[tabIdx] || 'Image';
log('controlInputMode', { mode: inputMode, tab: inputTab, kanvas: typeof Kanvas });
if ((inputTab === 'Image') && (typeof 'Kanvas' !== 'undefined')) {
inputTab = 'Kanvas';