refiner is go
This commit is contained in:
parent
45a3ce1de6
commit
126923ea83
2 changed files with 15 additions and 5 deletions
|
@ -167,7 +167,7 @@
|
||||||
alt="refresh refiner models"
|
alt="refresh refiner models"
|
||||||
title="refresh refiner models" />
|
title="refresh refiner models" />
|
||||||
</button> -->
|
</button> -->
|
||||||
<div id="refinerChangeAt" class="refiner"></div>
|
<div id="refinerSwitchAt" class="refiner"></div>
|
||||||
<input type="checkbox" id="cbxHRFix" onchange="changeHiResFix()" />
|
<input type="checkbox" id="cbxHRFix" onchange="changeHiResFix()" />
|
||||||
<label for="cbxHRFix">Apply Txt2Img HRfix</label>
|
<label for="cbxHRFix">Apply Txt2Img HRfix</label>
|
||||||
<br />
|
<br />
|
||||||
|
|
18
js/index.js
18
js/index.js
|
@ -659,6 +659,9 @@ let refinerAutoComplete = createAutoComplete(
|
||||||
"Refiner",
|
"Refiner",
|
||||||
document.getElementById("refiner-ac-select")
|
document.getElementById("refiner-ac-select")
|
||||||
);
|
);
|
||||||
|
refinerAutoComplete.onchange.on(({value}) => {
|
||||||
|
stableDiffusionData.refiner_checkpoint = value;
|
||||||
|
});
|
||||||
|
|
||||||
let loraAutoComplete = createAutoComplete(
|
let loraAutoComplete = createAutoComplete(
|
||||||
"LoRa",
|
"LoRa",
|
||||||
|
@ -743,14 +746,17 @@ const resSlider = makeSlider(
|
||||||
);
|
);
|
||||||
|
|
||||||
const refinerSlider = makeSlider(
|
const refinerSlider = makeSlider(
|
||||||
"Refiner Change At",
|
"Refiner Switch At",
|
||||||
document.getElementById("refinerChangeAt"),
|
document.getElementById("refinerSwitchAt"),
|
||||||
"refiner_change_at",
|
"refiner_switch_at",
|
||||||
0.0,
|
0.0,
|
||||||
1.0,
|
1.0,
|
||||||
0.1,
|
0.1,
|
||||||
0.8,
|
0.8,
|
||||||
0.01
|
0.01,
|
||||||
|
(v) => {
|
||||||
|
stableDiffusionData.refiner_switch_at = v;
|
||||||
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
const refSlider = makeSlider(
|
const refSlider = makeSlider(
|
||||||
|
@ -935,10 +941,14 @@ function changeRefinerEnabled() {
|
||||||
document
|
document
|
||||||
.querySelectorAll(".refiner")
|
.querySelectorAll(".refiner")
|
||||||
.forEach((el) => el.classList.remove("invisible"));
|
.forEach((el) => el.classList.remove("invisible"));
|
||||||
|
stableDiffusionData.refiner_checkpoint = refinerAutoComplete.value;
|
||||||
|
stableDiffusionData.refiner_switch_at = refinerSlider.value;
|
||||||
} else {
|
} else {
|
||||||
document
|
document
|
||||||
.querySelectorAll(".refiner")
|
.querySelectorAll(".refiner")
|
||||||
.forEach((el) => el.classList.add("invisible"));
|
.forEach((el) => el.classList.add("invisible"));
|
||||||
|
delete stableDiffusionData.refiner_checkpoint;
|
||||||
|
delete stableDiffusionData.refiner_switch_at;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue