humblemikey commited on
Commit
9529314
Β·
verified Β·
1 Parent(s): c050a42

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -10,9 +10,9 @@ import numpy as np
10
  import PIL.Image
11
  import spaces
12
  import torch
13
- from diffusers import AutoencoderKL, DiffusionPipeline
14
 
15
- DESCRIPTION = "humblemikey/PixelWave10"
16
  if not torch.cuda.is_available():
17
  DESCRIPTION += "\n<p>Running on CPU πŸ₯Ά This demo does not work on CPU.</p>"
18
 
@@ -24,7 +24,7 @@ ENABLE_CPU_OFFLOAD = os.getenv("ENABLE_CPU_OFFLOAD") == "1"
24
  device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
25
  if torch.cuda.is_available():
26
  #vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
27
- pipe = DiffusionPipeline.from_pretrained(
28
  "humblemikey/PixelWave10",
29
  #vae=vae,
30
  torch_dtype=torch.float16,
@@ -66,8 +66,6 @@ def generate(
66
  return pipe(
67
  prompt=prompt,
68
  negative_prompt=negative_prompt,
69
- prompt_2=prompt_2,
70
- negative_prompt_2=negative_prompt_2,
71
  width=width,
72
  height=height,
73
  guidance_scale=guidance_scale_base,
@@ -145,7 +143,7 @@ with gr.Blocks(css="style.css") as demo:
145
  minimum=10,
146
  maximum=100,
147
  step=1,
148
- value=25,
149
  )
150
 
151
  gr.Examples(
 
10
  import PIL.Image
11
  import spaces
12
  import torch
13
+ from diffusers import AutoencoderKL, StableDiffusionXLPipeline
14
 
15
+ DESCRIPTION = "# humblemikey/PixelWave10"
16
  if not torch.cuda.is_available():
17
  DESCRIPTION += "\n<p>Running on CPU πŸ₯Ά This demo does not work on CPU.</p>"
18
 
 
24
  device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
25
  if torch.cuda.is_available():
26
  #vae = AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16)
27
+ pipe = StableDiffusionXLPipeline.from_pretrained(
28
  "humblemikey/PixelWave10",
29
  #vae=vae,
30
  torch_dtype=torch.float16,
 
66
  return pipe(
67
  prompt=prompt,
68
  negative_prompt=negative_prompt,
 
 
69
  width=width,
70
  height=height,
71
  guidance_scale=guidance_scale_base,
 
143
  minimum=10,
144
  maximum=100,
145
  step=1,
146
+ value=40,
147
  )
148
 
149
  gr.Examples(