Commit 0d9b4315 authored by missionfloyd's avatar missionfloyd
Browse files

Fix img2img

parent d6271939
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -157,7 +157,6 @@ function submit_img2img() {
    var res = create_submit_args(arguments);

    res[0] = id;
    res[1] = get_tab_index('mode_img2img');

    return res;
}
+1 −1
Original line number Diff line number Diff line
@@ -152,7 +152,7 @@ def img2img(id_task: str, mode: int, prompt: str, negative_prompt: str, prompt_s
    is_batch = mode == 5

    if mode == 0:  # img2img
        image = init_img
        image = init_img["composite"]
        mask = None
    elif mode == 1:  # img2img sketch
        image = sketch
+3 −3
Original line number Diff line number Diff line
@@ -523,10 +523,10 @@ def create_ui():

                    if category == "image":
                        with gr.Tabs(elem_id="mode_img2img"):
                            img2img_selected_tab = gr.State(0)
                            img2img_selected_tab = gr.Number(value=0, visible=False)

                            with gr.TabItem('img2img', id='img2img', elem_id="img2img_img2img_tab") as tab_img2img:
                                init_img = gr.Image(label="Image for img2img", elem_id="img2img_image", show_label=False, source="upload", interactive=True, type="pil", tool="editor", image_mode="RGBA", height=opts.img2img_editor_height)
                                init_img = gr.ImageEditor(label="Image for img2img", elem_id="img2img_image", show_label=False, sources=("upload", "clipboard"), interactive=True, type="pil", image_mode="RGBA", height=opts.img2img_editor_height)
                                add_copy_image_controls('img2img', init_img)

                            with gr.TabItem('Sketch', id='img2img_sketch', elem_id="img2img_img2img_sketch_tab") as tab_sketch:
@@ -718,7 +718,7 @@ def create_ui():
                _js="submit_img2img",
                inputs=[
                    dummy_component,
                    dummy_component,
                    img2img_selected_tab,
                    toprow.prompt,
                    toprow.negative_prompt,
                    toprow.ui_styles.dropdown,
+0 −8
Original line number Diff line number Diff line
@@ -2,14 +2,6 @@

@import url('https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@400;600&display=swap');


/* temporary fix to hide gradio crop tool until it's fixed https://github.com/gradio-app/gradio/issues/3810 */

div.gradio-image button[aria-label="Edit"] {
    display: none;
}


/* general gradio fixes */

:root, .dark{