multimodalart HF staff commited on
Commit
9e3f56f
1 Parent(s): 5eb3734

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -76,8 +76,9 @@ def process_sketch(canvas_data, binary_matrixes):
76
  return [gr.update(visible=True), binary_matrixes, *visibilities, *colors]
77
 
78
  def process_generation(model, binary_matrixes, boostrapping, aspect, steps, seed, master_prompt, negative_prompt, *prompts):
 
79
  if(model != "stabilityai/stable-diffusion-2-1-base"):
80
- sd = MultiDiffusion("cuda",model)
81
  if(seed == -1):
82
  seed = random.randint(1, 2147483647)
83
  seed_everything(seed)
 
76
  return [gr.update(visible=True), binary_matrixes, *visibilities, *colors]
77
 
78
  def process_generation(model, binary_matrixes, boostrapping, aspect, steps, seed, master_prompt, negative_prompt, *prompts):
79
+ global sd
80
  if(model != "stabilityai/stable-diffusion-2-1-base"):
81
+ sd = MultiDiffusion("cuda", model)
82
  if(seed == -1):
83
  seed = random.randint(1, 2147483647)
84
  seed_everything(seed)