File size: 749 Bytes
c31821c | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | import { ControlNetUnit } from "./controlnet_unit.mjs";
import { initControlNetModals } from "./modal.mjs";
import { OpenposeEditor } from "./openpose_editor.mjs";
import { loadPhotopea } from "./photopea.mjs";
(function () {
const cnetAllAccordions = new Set();
onUiUpdate(() => {
gradioApp().querySelectorAll('#controlnet').forEach(accordion => {
if (cnetAllAccordions.has(accordion)) return;
accordion.querySelectorAll('.cnet-unit-tab')
.forEach(tab => {
const unit = new ControlNetUnit(tab, accordion);
const openposeEditor = new OpenposeEditor(unit);
});
initControlNetModals(accordion);
loadPhotopea(accordion);
cnetAllAccordions.add(accordion);
});
});
})(); |