kayfahaarukku commited on
Commit
df8ede9
1 Parent(s): 89165e2

Bringing back `from_single_file`

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -44,8 +44,12 @@ def load_pipeline(model_name):
44
  "madebyollin/sdxl-vae-fp16-fix",
45
  torch_dtype=torch.float16,
46
  )
47
- pipeline = StableDiffusionXLPipeline.from_pretrained
48
-
 
 
 
 
49
  pipe = pipeline(
50
  model_name,
51
  vae=vae,
 
44
  "madebyollin/sdxl-vae-fp16-fix",
45
  torch_dtype=torch.float16,
46
  )
47
+ pipeline = (
48
+ StableDiffusionXLPipeline.from_single_file
49
+ if MODEL.endswith(".safetensors")
50
+ else StableDiffusionXLPipeline.from_pretrained
51
+ )
52
+
53
  pipe = pipeline(
54
  model_name,
55
  vae=vae,