mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 01:04:32 +02:00
controlnet with non-english ui locales
Signed-off-by: vladmandic <mandic00@live.com>
This commit is contained in:
@@ -3,7 +3,6 @@ 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;
|
||||
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'];
|
||||
|
||||
+6
-1
@@ -254,7 +254,12 @@ function submit_control(...args) {
|
||||
const res = create_submit_args(args);
|
||||
res[0] = id;
|
||||
res[1] = window.submit_state;
|
||||
res[2] = gradioApp().querySelector('#control-tabs > .tab-nav > .selected')?.innerText.toLowerCase() || ''; // selected tab name
|
||||
|
||||
const tabs = Array.from(gradioApp().querySelectorAll('#control-tabs > .tab-nav > button'));
|
||||
const tabIdx = tabs.findIndex((btn) => btn.classList.contains('selected'));
|
||||
const tabNames = ['ControlNet', 'T2I Adapter', 'XS', 'Lite', 'Reference'];
|
||||
const selectedTab = tabNames[tabIdx] || 'ControlNet';
|
||||
res[2] = selectedTab.toLowerCase();
|
||||
window.submit_state = '';
|
||||
return res;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user