Rename sampler to sampler_name in the API

This commit is contained in:
cmdr2 2022-12-12 15:21:02 +05:30
parent ac0961d7d4
commit fb32a38d96
3 changed files with 7 additions and 7 deletions

View File

@ -137,8 +137,8 @@
</select> </select>
</td></tr> </td></tr>
<tr id="hypernetwork_strength_container" class="pl-5"><td><label for="hypernetwork_strength_slider">Hypernetwork Strength:</label></td><td> <input id="hypernetwork_strength_slider" name="hypernetwork_strength_slider" class="editor-slider" value="100" type="range" min="0" max="100"> <input id="hypernetwork_strength" name="hypernetwork_strength" size="4" pattern="^[0-9\.]+$" onkeypress="preventNonNumericalInput(event)"><br/></td></tr></span> <tr id="hypernetwork_strength_container" class="pl-5"><td><label for="hypernetwork_strength_slider">Hypernetwork Strength:</label></td><td> <input id="hypernetwork_strength_slider" name="hypernetwork_strength_slider" class="editor-slider" value="100" type="range" min="0" max="100"> <input id="hypernetwork_strength" name="hypernetwork_strength" size="4" pattern="^[0-9\.]+$" onkeypress="preventNonNumericalInput(event)"><br/></td></tr></span>
<tr id="samplerSelection" class="pl-5"><td><label for="sampler">Sampler:</label></td><td> <tr id="samplerSelection" class="pl-5"><td><label for="sampler_name">Sampler:</label></td><td>
<select id="sampler" name="sampler"> <select id="sampler_name" name="sampler_name">
<option value="plms">plms</option> <option value="plms">plms</option>
<option value="ddim">ddim</option> <option value="ddim">ddim</option>
<option value="heun">heun</option> <option value="heun">heun</option>

View File

@ -15,7 +15,7 @@ const SETTINGS_IDS_LIST = [
"stable_diffusion_model", "stable_diffusion_model",
"vae_model", "vae_model",
"hypernetwork_model", "hypernetwork_model",
"sampler", "sampler_name",
"width", "width",
"height", "height",
"num_inference_steps", "num_inference_steps",

View File

@ -30,7 +30,7 @@ let applyColorCorrectionField = document.querySelector('#apply_color_correction'
let colorCorrectionSetting = document.querySelector('#apply_color_correction_setting') let colorCorrectionSetting = document.querySelector('#apply_color_correction_setting')
let promptStrengthSlider = document.querySelector('#prompt_strength_slider') let promptStrengthSlider = document.querySelector('#prompt_strength_slider')
let promptStrengthField = document.querySelector('#prompt_strength') let promptStrengthField = document.querySelector('#prompt_strength')
let samplerField = document.querySelector('#sampler') let samplerField = document.querySelector('#sampler_name')
let samplerSelectionContainer = document.querySelector("#samplerSelection") let samplerSelectionContainer = document.querySelector("#samplerSelection")
let useFaceCorrectionField = document.querySelector("#use_face_correction") let useFaceCorrectionField = document.querySelector("#use_face_correction")
let useUpscalingField = document.querySelector("#use_upscale") let useUpscalingField = document.querySelector("#use_upscale")
@ -741,7 +741,7 @@ function onTaskStart(task) {
} }
function createTask(task) { function createTask(task) {
let taskConfig = `<b>Seed:</b> ${task.seed}, <b>Sampler:</b> ${task.reqBody.sampler}, <b>Inference Steps:</b> ${task.reqBody.num_inference_steps}, <b>Guidance Scale:</b> ${task.reqBody.guidance_scale}, <b>Model:</b> ${task.reqBody.use_stable_diffusion_model}` let taskConfig = `<b>Seed:</b> ${task.seed}, <b>Sampler:</b> ${task.reqBody.sampler_name}, <b>Inference Steps:</b> ${task.reqBody.num_inference_steps}, <b>Guidance Scale:</b> ${task.reqBody.guidance_scale}, <b>Model:</b> ${task.reqBody.use_stable_diffusion_model}`
if (task.reqBody.use_vae_model.trim() !== '') { if (task.reqBody.use_vae_model.trim() !== '') {
taskConfig += `, <b>VAE:</b> ${task.reqBody.use_vae_model}` taskConfig += `, <b>VAE:</b> ${task.reqBody.use_vae_model}`
} }
@ -872,9 +872,9 @@ function getCurrentUserRequest() {
newTask.reqBody.mask = imageInpainter.getImg() newTask.reqBody.mask = imageInpainter.getImg()
} }
newTask.reqBody.preserve_init_image_color_profile = applyColorCorrectionField.checked newTask.reqBody.preserve_init_image_color_profile = applyColorCorrectionField.checked
newTask.reqBody.sampler = 'ddim' newTask.reqBody.sampler_name = 'ddim'
} else { } else {
newTask.reqBody.sampler = samplerField.value newTask.reqBody.sampler_name = samplerField.value
} }
if (saveToDiskField.checked && diskPathField.value.trim() !== '') { if (saveToDiskField.checked && diskPathField.value.trim() !== '') {
newTask.reqBody.save_to_disk_path = diskPathField.value.trim() newTask.reqBody.save_to_disk_path = diskPathField.value.trim()