kadirnar commited on
Commit
81b62ca
1 Parent(s): 1359190

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -8,12 +8,12 @@ import torch
8
  import gradio as gr
9
 
10
  best_model_list = [
 
11
  "runwayml/stable-diffusion-v1-5",
12
  "CompVis/stable-diffusion-v1-4",
13
  "prompthero/openjourney",
14
  "dreamlike-art/dreamlike-photoreal-2.0",
15
  "dreamlike-art/dreamlike-diffusion-1.0",
16
- "stabilityai/stable-diffusion-2-inpainting"
17
  ]
18
 
19
  orig_prompt = "Create a relaxing atmosphere with the use of plants and other natural elements. Such as a hanging terrarium or a wall-mounted planter. Include plenty of storage options to keep the space organized and clutter-free. Consider adding a vanity with double sinks and plenty of drawers and cabinets. As well as a wall mounted medicine and towel storage."
@@ -21,7 +21,7 @@ orig_negative_prompt = "lurry, bad art, blurred, text, watermark"
21
 
22
 
23
  def stable_diffusion_zoom_out(
24
- repo_id="stabilityai/stable-diffusion-2-inpainting",
25
  original_prompt,
26
  negative_prompt,
27
  steps=32,
@@ -68,11 +68,11 @@ def stable_diffusion_zoom_out(
68
  all_frames.append(current_image)
69
 
70
  save_path = "infinite_zoom_out.mp4"
71
- write_video(save_path, all_frames, fps=16)
72
  return save_path
73
 
74
  inputs = [
75
- gr.Dropdown(choices=best_model_list,default="stabilityai/stable-diffusion-2-inpainting",label="Model"),
76
  gr.inputs.Textbox(lines=1, default=orig_prompt, label="Prompt"),
77
  gr.inputs.Textbox(lines=1, default=orig_negative_prompt, label="Negative Prompt"),
78
  gr.inputs.Slider(minimum=1, maximum=64, default=32, label="Steps"),
 
8
  import gradio as gr
9
 
10
  best_model_list = [
11
+ "stabilityai/stable-diffusion-2-inpainting",
12
  "runwayml/stable-diffusion-v1-5",
13
  "CompVis/stable-diffusion-v1-4",
14
  "prompthero/openjourney",
15
  "dreamlike-art/dreamlike-photoreal-2.0",
16
  "dreamlike-art/dreamlike-diffusion-1.0",
 
17
  ]
18
 
19
  orig_prompt = "Create a relaxing atmosphere with the use of plants and other natural elements. Such as a hanging terrarium or a wall-mounted planter. Include plenty of storage options to keep the space organized and clutter-free. Consider adding a vanity with double sinks and plenty of drawers and cabinets. As well as a wall mounted medicine and towel storage."
 
21
 
22
 
23
  def stable_diffusion_zoom_out(
24
+ repo_id,
25
  original_prompt,
26
  negative_prompt,
27
  steps=32,
 
68
  all_frames.append(current_image)
69
 
70
  save_path = "infinite_zoom_out.mp4"
71
+ write_video(save_path, all_frames, fps=fps)
72
  return save_path
73
 
74
  inputs = [
75
+ gr.Dropdown(choices=best_model_list,default="stabilityai/stable-diffusion-2-inpainting", label="Model"),
76
  gr.inputs.Textbox(lines=1, default=orig_prompt, label="Prompt"),
77
  gr.inputs.Textbox(lines=1, default=orig_negative_prompt, label="Negative Prompt"),
78
  gr.inputs.Slider(minimum=1, maximum=64, default=32, label="Steps"),