valhalla commited on
Commit
112de75
1 Parent(s): 738a011

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -7,7 +7,7 @@ import numpy as np
7
  import PIL.Image
8
  import torch
9
  import torchvision.transforms.functional as TF
10
- from diffusers import EulerAncestralDiscreteScheduler, StableDiffusionXLAdapterPipeline, T2IAdapter
11
 
12
  DESCRIPTION = "# T2I-Adapter-SDXL Sketch"
13
 
@@ -68,11 +68,11 @@ if torch.cuda.is_available():
68
  scheduler = EulerAncestralDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler")
69
  pipe = StableDiffusionXLAdapterPipeline.from_pretrained(
70
  model_id,
 
71
  adapter=adapter,
72
- safety_checker=None,
73
  torch_dtype=torch.float16,
74
  variant="fp16",
75
- scheduler=scheduler,
76
  )
77
  pipe.to(device)
78
  else:
 
7
  import PIL.Image
8
  import torch
9
  import torchvision.transforms.functional as TF
10
+ from diffusers import EulerAncestralDiscreteScheduler, StableDiffusionXLAdapterPipeline, T2IAdapter, AutoencoderKL
11
 
12
  DESCRIPTION = "# T2I-Adapter-SDXL Sketch"
13
 
 
68
  scheduler = EulerAncestralDiscreteScheduler.from_pretrained(model_id, subfolder="scheduler")
69
  pipe = StableDiffusionXLAdapterPipeline.from_pretrained(
70
  model_id,
71
+ vae=AutoencoderKL.from_pretrained("madebyollin/sdxl-vae-fp16-fix", torch_dtype=torch.float16),
72
  adapter=adapter,
73
+ scheduler=scheduler,
74
  torch_dtype=torch.float16,
75
  variant="fp16",
 
76
  )
77
  pipe.to(device)
78
  else: