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