Manjushri commited on
Commit
0e01e81
1 Parent(s): 4b92f89

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -3,18 +3,16 @@ import modin.pandas as pd
3
  import torch
4
  from PIL import Image
5
  import imageio
6
- from diffusers import StableDiffusionXLAdapterPipeline, T2IAdapter, AutoencoderKL, EulerAncestralDiscreteScheduler
7
 
8
  device = "cuda" if torch.cuda.is_available() else "cpu"
9
  model_id = "stabilityai/stable-diffusion-xl-base-1.0"
10
  adapter = T2IAdapter.from_pretrained(
11
  "TencentARC/t2i-adapter-sketch-sdxl-1.0")
12
- scheduler = EulerAncestralDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler")
13
  pipe = StableDiffusionXLAdapterPipeline.from_pretrained(
14
  model_id,
15
- vae=AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix"),
16
- adapter=adapter,
17
- scheduler=scheduler)
18
  pipe = pipe.to(device)
19
 
20
  def resize(value,img):
 
3
  import torch
4
  from PIL import Image
5
  import imageio
6
+ from diffusers import StableDiffusionXLAdapterPipeline, T2IAdapter
7
 
8
  device = "cuda" if torch.cuda.is_available() else "cpu"
9
  model_id = "stabilityai/stable-diffusion-xl-base-1.0"
10
  adapter = T2IAdapter.from_pretrained(
11
  "TencentARC/t2i-adapter-sketch-sdxl-1.0")
12
+ #scheduler = EulerAncestralDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler")
13
  pipe = StableDiffusionXLAdapterPipeline.from_pretrained(
14
  model_id,
15
+ adapter=adapter,)
 
 
16
  pipe = pipe.to(device)
17
 
18
  def resize(value,img):