patrickvonplaten commited on
Commit
6e5a323
1 Parent(s): a750c0e
Files changed (2) hide show
  1. __pycache__/app.cpython-310.pyc +0 -0
  2. app.py +4 -2
__pycache__/app.cpython-310.pyc CHANGED
Binary files a/__pycache__/app.cpython-310.pyc and b/__pycache__/app.cpython-310.pyc differ
 
app.py CHANGED
@@ -26,7 +26,7 @@ def predict(dict, prompt="", guidance_scale=7.5, steps=20, strength=1.0, schedul
26
  add_kwargs["algorithm_type"] = "sde-dpmsolver++"
27
 
28
  scheduler = getattr(diffusers, scheduler_class_name)
29
- pipe.scheduler = scheduler.from_config(pipe.scheduler.config, **add_kwargs)
30
 
31
  init_image = dict["image"].convert("RGB").resize((1024, 1024))
32
  mask = dict["mask"].convert("RGB").resize((1024, 1024))
@@ -90,6 +90,8 @@ with image_blocks as demo:
90
  guidance_scale = gr.Number(value=7.5, minimum=1.0, maximum=20.0, step=0.1, label="guidance_scale")
91
  steps = gr.Number(value=20, minimum=10, maximum=50, step=0.1, label="steps")
92
  strength = gr.Number(value=1.0, minimum=0.0, maximum=1.0, step=0.05, label="strength")
 
 
93
  schedulers = ["DEISMultistepScheduler", "HeunDiscreteScheduler", "EulerDiscreteScheduler", "DPMSolverMultistepScheduler", "DPMSolverMultistepScheduler-Karras", "DPMSolverMultistepScheduler-Karras-SDE"]
94
  scheduler = gr.Dropdown(choices=schedulers, value="EulerDiscreteScheduler")
95
 
@@ -118,4 +120,4 @@ with image_blocks as demo:
118
  """
119
  )
120
 
121
- image_blocks.launch(share=True)
 
26
  add_kwargs["algorithm_type"] = "sde-dpmsolver++"
27
 
28
  scheduler = getattr(diffusers, scheduler_class_name)
29
+ pipe.scheduler = scheduler.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", subfolder="scheduler", **add_kwargs)
30
 
31
  init_image = dict["image"].convert("RGB").resize((1024, 1024))
32
  mask = dict["mask"].convert("RGB").resize((1024, 1024))
 
90
  guidance_scale = gr.Number(value=7.5, minimum=1.0, maximum=20.0, step=0.1, label="guidance_scale")
91
  steps = gr.Number(value=20, minimum=10, maximum=50, step=0.1, label="steps")
92
  strength = gr.Number(value=1.0, minimum=0.0, maximum=1.0, step=0.05, label="strength")
93
+
94
+ with gr.Row(elem_id="prompt-container").style(mobile_collapse=False, equal_height=True):
95
  schedulers = ["DEISMultistepScheduler", "HeunDiscreteScheduler", "EulerDiscreteScheduler", "DPMSolverMultistepScheduler", "DPMSolverMultistepScheduler-Karras", "DPMSolverMultistepScheduler-Karras-SDE"]
96
  scheduler = gr.Dropdown(choices=schedulers, value="EulerDiscreteScheduler")
97
 
 
120
  """
121
  )
122
 
123
+ image_blocks.launch()