Learner commited on
Commit
c200362
1 Parent(s): e084d27

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -37,6 +37,8 @@ pipe, params = FlaxStableDiffusionControlNetPipeline.from_pretrained(
37
  safety_checker=None,
38
  )
39
 
 
 
40
 
41
  # inference function takes prompt, negative prompt and image
42
  def infer(prompts, negative_prompts, image):
@@ -80,7 +82,7 @@ description = "Sketch your game battlemap and add some prompts to let the magic
80
  gr.Interface(
81
  fn=infer,
82
  inputs=["text", "text", "image"],
83
- outputs="gallery",
84
  title=title,
85
  description=description,
86
  ).launch()
 
37
  safety_checker=None,
38
  )
39
 
40
+ pipe.enable_model_cpu_offload()
41
+ pipe.enable_xformers_memory_efficient_attention()
42
 
43
  # inference function takes prompt, negative prompt and image
44
  def infer(prompts, negative_prompts, image):
 
82
  gr.Interface(
83
  fn=infer,
84
  inputs=["text", "text", "image"],
85
+ outputs="image",
86
  title=title,
87
  description=description,
88
  ).launch()