HedronCreeper commited on
Commit
e2cdf8e
·
verified ·
1 Parent(s): 4d147ef

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -9,7 +9,7 @@ pipe = None
9
  def load_model():
10
  global pipe
11
  pipe = StableDiffusionPipeline.from_pretrained(
12
- "lambdalabs/miniSD-diffusers",
13
  torch_dtype=torch.float32,
14
  safety_checker=None
15
  )
@@ -26,7 +26,7 @@ def generate():
26
  try:
27
  data = request.json
28
  prompt = data.get("prompt", "a beautiful landscape")
29
- image = pipe(prompt, num_inference_steps=6, height=256, width=256).images[0]
30
  buf = io.BytesIO()
31
  image.save(buf, format="PNG")
32
  img_b64 = base64.b64encode(buf.getvalue()).decode()
 
9
  def load_model():
10
  global pipe
11
  pipe = StableDiffusionPipeline.from_pretrained(
12
+ "Lykon/dreamshaper-8",
13
  torch_dtype=torch.float32,
14
  safety_checker=None
15
  )
 
26
  try:
27
  data = request.json
28
  prompt = data.get("prompt", "a beautiful landscape")
29
+ image = pipe(prompt, num_inference_steps=20, height=512, width=512).images[0]
30
  buf = io.BytesIO()
31
  image.save(buf, format="PNG")
32
  img_b64 = base64.b64encode(buf.getvalue()).decode()