Fix cancel button

This commit is contained in:
lnyan 2022-10-19 18:27:46 +08:00
parent 445ee72bf9
commit dad615d1b7
5 changed files with 8 additions and 7 deletions

2
app.py
View File

@ -594,7 +594,7 @@ with blocks as demo:
)
setup_button = gr.Button("Click to Setup (may take a while)", variant="primary")
with gr.Row():
with gr.Column(scale=2, min_width=150):
with gr.Column(scale=3, min_width=270):
init_mode = gr.Radio(
label="Init Mode",
choices=[

View File

@ -631,7 +631,7 @@ def convert_checkpoint(checkpoint_path):
type=str,
help="Type of scheduler to use. Should be one of ['pndm', 'lms', 'ddim']",
)
parser.add_argument("--dump_path", default=None, type=str, required=True, help="Path to the output model.")
parser.add_argument("--dump_path", default=None, type=str, help="Path to the output model.")
args = parser.parse_args([])
if args.original_config_file is None:

View File

@ -2,7 +2,7 @@ function(token_val, width, height, size, model_choice, model_path){
let app=document.querySelector("gradio-app");
app=app.shadowRoot??app;
app.querySelector("#sdinfframe").style.height=80+Number(height)+"px";
app.querySelector("#setup_row").style.display="none";
// app.querySelector("#setup_row").style.display="none";
app.querySelector("#model_path_input").style.display="none";
let frame=app.querySelector("#sdinfframe").contentWindow.document;

View File

@ -238,7 +238,7 @@ var toolbar=new w2toolbar({
case "accept":
case "cancel":
this.hide(...outpaint_result_lst);
this.disable(...outpaint_result_lst);
this.disable(...outpaint_result_func_lst);
this.enable(...outpaint_button_lst);
document.querySelector("#container").style.pointerEvents="auto";
window.postMessage(["click", event.target],"*");
@ -333,7 +333,7 @@ window.update_scale=function(val){
w2ui.toolbar.refresh();
}
window.enable_result_lst=function(){
w2ui.toolbar.enable(...outpaint_result_func_lst);
w2ui.toolbar.enable(...outpaint_result_lst);
}
function onObjectScaled(e)
{

View File

@ -204,5 +204,6 @@ class PhotometricCorrection:
)
self.parser=parser
# if __name__ =="__main__":
# process=PhotometricCorrection()
if __name__ =="__main__":
import sys
process=PhotometricCorrection()