diff options
author | AUTOMATIC <16777216c@gmail.com> | 2022-08-24 06:24:32 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2022-08-24 06:24:32 +0000 |
commit | 2a0f8afb2956ae0d73edb7483664644eb6d18289 (patch) | |
tree | 5bb1ff085c77c767190b9ddbb333372281f9e3c1 /webui.py | |
parent | 6efddcb279bf3db4a3885e1bd630770569801357 (diff) | |
download | stable-diffusion-webui-gfx803-2a0f8afb2956ae0d73edb7483664644eb6d18289.tar.gz stable-diffusion-webui-gfx803-2a0f8afb2956ae0d73edb7483664644eb6d18289.tar.bz2 stable-diffusion-webui-gfx803-2a0f8afb2956ae0d73edb7483664644eb6d18289.zip |
remove remote image as sample for img2img (it will now use a local image if you have one, none otherwise)
Diffstat (limited to 'webui.py')
-rw-r--r-- | webui.py | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -544,11 +544,14 @@ def img2img(prompt: str, init_img, ddim_steps: int, use_GFPGAN: bool, prompt_mat return output_images, seed, info
+sample_img2img = "assets/stable-samples/img2img/sketch-mountains-input.jpg"
+sample_img2img = sample_img2img if os.path.exists(sample_img2img) else None
+
img2img_interface = gr.Interface(
img2img,
inputs=[
gr.Textbox(placeholder="A fantasy landscape, trending on artstation.", lines=1),
- gr.Image(value="https://raw.githubusercontent.com/CompVis/stable-diffusion/main/assets/stable-samples/img2img/sketch-mountains-input.jpg", source="upload", interactive=True, type="pil"),
+ gr.Image(value=sample_img2img, source="upload", interactive=True, type="pil"),
gr.Slider(minimum=1, maximum=150, step=1, label="Sampling Steps", value=50),
gr.Checkbox(label='Fix faces using GFPGAN', value=False, visible=GFPGAN is not None),
gr.Checkbox(label='Create prompt matrix (separate multiple prompts using |, and get all combinations of them)', value=False),
|