aifeifei798 commited on
Commit
9f739e2
1 Parent(s): 158f6fa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -6,9 +6,15 @@ import torch
6
  from diffusers import DiffusionPipeline
7
 
8
  dtype = torch.bfloat16
9
- device = "cuda" if torch.cuda.is_available() else "cpu"
10
 
11
- pipe = DiffusionPipeline.from_pretrained("aifeifei798/DarkIdol-flux-v1", torch_dtype=dtype).to(device)
 
 
 
 
 
 
 
12
 
13
  MAX_SEED = np.iinfo(np.int32).max
14
  MAX_IMAGE_SIZE = 2048
 
6
  from diffusers import DiffusionPipeline
7
 
8
  dtype = torch.bfloat16
 
9
 
10
+ device = "cuda" if torch.cuda.is_available() else "cpu"
11
+ taef1 = AutoencoderTiny.from_pretrained("aifeifei798/taef1", torch_dtype=dtype).to(
12
+ device
13
+ )
14
+
15
+ pipe = DiffusionPipeline.from_pretrained(
16
+ "aifeifei798/DarkIdol-flux-v1", torch_dtype=dtype, vae=taef1
17
+ ).to(device)
18
 
19
  MAX_SEED = np.iinfo(np.int32).max
20
  MAX_IMAGE_SIZE = 2048