Update app.py
Browse files
app.py
CHANGED
|
@@ -13,7 +13,6 @@ model_15 = "runwayml/stable-diffusion-v1-5"
|
|
| 13 |
scheduler_15 = DDIMScheduler.from_pretrained(model_15, subfolder="scheduler")
|
| 14 |
pipe_15 = DiffusionPipeline.from_pretrained(model_15, vae=vae, scheduler=scheduler_15, torch_dtype=torch.float16, use_safetensors=True, variant="fp16").to("cuda")
|
| 15 |
|
| 16 |
-
#pipe.enable_model_cpu_offload()
|
| 17 |
pipe.enable_vae_tiling()
|
| 18 |
|
| 19 |
@spaces.GPU
|
|
@@ -40,9 +39,14 @@ with gr.Blocks() as demo:
|
|
| 40 |
with gr.Tab("SD1.5 in 1024x1024"):
|
| 41 |
with gr.Row():
|
| 42 |
prompt_15 = gr.Textbox(label="Prompt")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
btn_15 = gr.Button("Run")
|
| 44 |
-
output_gallery_15 = gr.Gallery(label="Results")
|
| 45 |
-
btn_15.click(fn=run_hidiffusion_15, inputs=[prompt_15,
|
| 46 |
|
| 47 |
with gr.Tab("SDXL in 2048x2048"):
|
| 48 |
with gr.Row():
|
|
@@ -53,9 +57,10 @@ with gr.Blocks() as demo:
|
|
| 53 |
visible=False
|
| 54 |
)
|
| 55 |
btn = gr.Button("Run")
|
| 56 |
-
output_gallery = gr.Gallery(label="Results")
|
| 57 |
btn.click(fn=run_hidiffusion, inputs=[prompt, negative_prompt], outputs=[output_gallery])
|
| 58 |
|
|
|
|
| 59 |
gr.Examples(examples=[
|
| 60 |
"a beautiful model woman, full body visible, model pose, direct frontal gaze, white color background, realritics photo, 16k",
|
| 61 |
"a beautiful model woman, 20 year aged, Caucasian ethnicity, nurse uniform attire, full body visible, model pose, direct frontal gaze, white color background, realritics photo, 16k",
|
|
|
|
| 13 |
scheduler_15 = DDIMScheduler.from_pretrained(model_15, subfolder="scheduler")
|
| 14 |
pipe_15 = DiffusionPipeline.from_pretrained(model_15, vae=vae, scheduler=scheduler_15, torch_dtype=torch.float16, use_safetensors=True, variant="fp16").to("cuda")
|
| 15 |
|
|
|
|
| 16 |
pipe.enable_vae_tiling()
|
| 17 |
|
| 18 |
@spaces.GPU
|
|
|
|
| 39 |
with gr.Tab("SD1.5 in 1024x1024"):
|
| 40 |
with gr.Row():
|
| 41 |
prompt_15 = gr.Textbox(label="Prompt")
|
| 42 |
+
negative_prompt_15 = gr.Textbox(
|
| 43 |
+
label="Negative Prompt",
|
| 44 |
+
value="(deformed, distorted, disfigured:1.3), poorly drawn, bad anatomy, wrong anatomy, extra limb, missing limb, floating limbs, (mutated hands and fingers:1.4), disconnected limbs, mutation, mutated, ugly, disgusting, blurry, amputation, (NSFW:1.25)",
|
| 45 |
+
visible=False
|
| 46 |
+
)
|
| 47 |
btn_15 = gr.Button("Run")
|
| 48 |
+
output_gallery_15 = gr.Gallery(label="Results")
|
| 49 |
+
btn_15.click(fn=run_hidiffusion_15, inputs=[prompt_15, negative_prompt_15], outputs=[output_gallery_15])
|
| 50 |
|
| 51 |
with gr.Tab("SDXL in 2048x2048"):
|
| 52 |
with gr.Row():
|
|
|
|
| 57 |
visible=False
|
| 58 |
)
|
| 59 |
btn = gr.Button("Run")
|
| 60 |
+
output_gallery = gr.Gallery(label="Results")
|
| 61 |
btn.click(fn=run_hidiffusion, inputs=[prompt, negative_prompt], outputs=[output_gallery])
|
| 62 |
|
| 63 |
+
|
| 64 |
gr.Examples(examples=[
|
| 65 |
"a beautiful model woman, full body visible, model pose, direct frontal gaze, white color background, realritics photo, 16k",
|
| 66 |
"a beautiful model woman, 20 year aged, Caucasian ethnicity, nurse uniform attire, full body visible, model pose, direct frontal gaze, white color background, realritics photo, 16k",
|