Spaces:
Running
on
Zero
Running
on
Zero
aifeifei798
commited on
Commit
•
9f739e2
1
Parent(s):
158f6fa
Update app.py
Browse files
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 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|