Show the controlnet buttons only for diffusers

This commit is contained in:
cmdr2 2023-08-03 17:08:21 +05:30
parent 404329f9b5
commit d35a89bb01
2 changed files with 59 additions and 54 deletions

View File

@ -161,60 +161,63 @@
<a href="https://github.com/easydiffusion/easydiffusion/wiki/Clip-Skip" target="_blank"><i class="fa-solid fa-circle-question help-btn"><span class="simple-tooltip top-left">Click to learn more about Clip Skip</span></i></a> <a href="https://github.com/easydiffusion/easydiffusion/wiki/Clip-Skip" target="_blank"><i class="fa-solid fa-circle-question help-btn"><span class="simple-tooltip top-left">Click to learn more about Clip Skip</span></i></a>
</td> </td>
</tr> </tr>
<tr id="controlnet_model_container" class="pl-5"><td><label for="controlnet_model">ControlNet Image:</label></td><td> <tr id="controlnet_model_container" class="pl-5">
<div id="control_image_wrapper" class="preview_image_wrapper"> <td><label for="controlnet_model">ControlNet Image:</label></td>
<img id="control_image_preview" class="image_preview" src="" crossorigin="anonymous" /> <td class="diffusers-restart-needed">
<span id="control_image_size_box" class="img_bottom_label"></span> <div id="control_image_wrapper" class="preview_image_wrapper">
<button class="control_image_clear image_clear_btn"><i class="fa-solid fa-xmark"></i></button> <img id="control_image_preview" class="image_preview" src="" crossorigin="anonymous" />
</div> <span id="control_image_size_box" class="img_bottom_label"></span>
<input id="control_image" name="control_image" type="file" /> <button class="control_image_clear image_clear_btn"><i class="fa-solid fa-xmark"></i></button>
<a href="https://github.com/easydiffusion/easydiffusion/wiki/ControlNet" target="_blank"><i class="fa-solid fa-circle-question help-btn"><span class="simple-tooltip top-left">Click to learn more about ControlNets</span></i></a> </div>
<div id="controlnet_config" class="displayNone"> <input id="control_image" name="control_image" type="file" />
<label><small>Filter to apply:</small></label> <a href="https://github.com/easydiffusion/easydiffusion/wiki/ControlNet" target="_blank"><i class="fa-solid fa-circle-question help-btn"><span class="simple-tooltip top-left">Click to learn more about ControlNets</span></i></a>
<select id="control_image_filter"> <div id="controlnet_config" class="displayNone">
<option value="">None</option> <label><small>Filter to apply:</small></label>
<optgroup label="Pose"> <select id="control_image_filter">
<option value="openpose">OpenPose (*)</option> <option value="">None</option>
<option value="openpose_face">OpenPose face</option> <optgroup label="Pose">
<option value="openpose_faceonly">OpenPose face-only</option> <option value="openpose">OpenPose (*)</option>
<option value="openpose_hand">OpenPose hand</option> <option value="openpose_face">OpenPose face</option>
<option value="openpose_full">OpenPose full</option> <option value="openpose_faceonly">OpenPose face-only</option>
</optgroup> <option value="openpose_hand">OpenPose hand</option>
<optgroup label="Outline"> <option value="openpose_full">OpenPose full</option>
<option value="canny">Canny (*)</option> </optgroup>
<option value="mlsd">Straight lines</option> <optgroup label="Outline">
<option value="scribble_hed">Scribble hed (*)</option> <option value="canny">Canny (*)</option>
<option value="scribble_hedsafe">Scribble hedsafe</option> <option value="mlsd">Straight lines</option>
<option value="scribble_pidinet">Scribble pidinet</option> <option value="scribble_hed">Scribble hed (*)</option>
<option value="scribble_pidsafe">Scribble pidsafe</option> <option value="scribble_hedsafe">Scribble hedsafe</option>
<option value="softedge_hed">Softedge hed</option> <option value="scribble_pidinet">Scribble pidinet</option>
<option value="softedge_hedsafe">Softedge hedsafe</option> <option value="scribble_pidsafe">Scribble pidsafe</option>
<option value="softedge_pidinet">Softedge pidinet</option> <option value="softedge_hed">Softedge hed</option>
<option value="softedge_pidsafe">Softedge pidsafe</option> <option value="softedge_hedsafe">Softedge hedsafe</option>
</optgroup> <option value="softedge_pidinet">Softedge pidinet</option>
<optgroup label="Depth"> <option value="softedge_pidsafe">Softedge pidsafe</option>
<option value="normal_bae">Normal bae (*)</option> </optgroup>
<option value="depth_midas">Depth midas</option> <optgroup label="Depth">
<option value="depth_zoe">Depth zoe</option> <option value="normal_bae">Normal bae (*)</option>
<option value="depth_leres">Depth leres</option> <option value="depth_midas">Depth midas</option>
<option value="depth_leres++">Depth leres++</option> <option value="depth_zoe">Depth zoe</option>
</optgroup> <option value="depth_leres">Depth leres</option>
<optgroup label="Line art"> <option value="depth_leres++">Depth leres++</option>
<option value="lineart_coarse">Lineart coarse</option> </optgroup>
<option value="lineart_realistic">Lineart realistic</option> <optgroup label="Line art">
<option value="lineart_anime">Lineart anime</option> <option value="lineart_coarse">Lineart coarse</option>
</optgroup> <option value="lineart_realistic">Lineart realistic</option>
<optgroup label="Misc"> <option value="lineart_anime">Lineart anime</option>
<option value="shuffle">Shuffle</option> </optgroup>
<option value="segment">Segment</option> <optgroup label="Misc">
</optgroup> <option value="shuffle">Shuffle</option>
</select> <option value="segment">Segment</option>
<br/> </optgroup>
<label for="controlnet_model"><small>Model:</small></label> <input id="controlnet_model" type="text" spellcheck="false" autocomplete="off" class="model-filter" data-path="" /> </select>
<br/> <br/>
<label><small>Will download the necessary models, the first time.</small></label> <label for="controlnet_model"><small>Model:</small></label> <input id="controlnet_model" type="text" spellcheck="false" autocomplete="off" class="model-filter" data-path="" />
</div> <br/>
</td></tr> <label><small>Will download the necessary models, the first time.</small></label>
</div>
</td>
</tr>
<tr class="pl-5"><td><label for="vae_model">Custom VAE:</label></td><td> <tr class="pl-5"><td><label for="vae_model">Custom VAE:</label></td><td>
<input id="vae_model" type="text" spellcheck="false" autocomplete="off" class="model-filter" data-path="" /> <input id="vae_model" type="text" spellcheck="false" autocomplete="off" class="model-filter" data-path="" />
<a href="https://github.com/easydiffusion/easydiffusion/wiki/VAE-Variational-Auto-Encoder" target="_blank"><i class="fa-solid fa-circle-question help-btn"><span class="simple-tooltip top-left">Click to learn more about VAEs</span></i></a> <a href="https://github.com/easydiffusion/easydiffusion/wiki/VAE-Variational-Auto-Encoder" target="_blank"><i class="fa-solid fa-circle-question help-btn"><span class="simple-tooltip top-left">Click to learn more about VAEs</span></i></a>

View File

@ -461,6 +461,7 @@ async function getAppConfig() {
if (!testDiffusersEnabled) { if (!testDiffusersEnabled) {
document.querySelector("#lora_model_container").style.display = "none" document.querySelector("#lora_model_container").style.display = "none"
document.querySelector("#tiling_container").style.display = "none" document.querySelector("#tiling_container").style.display = "none"
document.querySelector("#controlnet_model_container").style.display = "none"
document.querySelectorAll("#sampler_name option.diffusers-only").forEach((option) => { document.querySelectorAll("#sampler_name option.diffusers-only").forEach((option) => {
option.style.display = "none" option.style.display = "none"
@ -470,6 +471,7 @@ async function getAppConfig() {
} else { } else {
document.querySelector("#lora_model_container").style.display = "" document.querySelector("#lora_model_container").style.display = ""
document.querySelector("#tiling_container").style.display = "" document.querySelector("#tiling_container").style.display = ""
document.querySelector("#controlnet_model_container").style.display = ""
document.querySelectorAll("#sampler_name option.k_diffusion-only").forEach((option) => { document.querySelectorAll("#sampler_name option.k_diffusion-only").forEach((option) => {
option.style.display = "none" option.style.display = "none"