Spaces:
Running
on
Zero
Running
on
Zero
Prime Cai
commited on
Commit
·
f3e9f34
1
Parent(s):
c90a6d7
dynamic gpu
Browse files
app.py
CHANGED
@@ -16,6 +16,7 @@ CHECKPOINT = "primecai/dsd_model"
|
|
16 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
17 |
dtype = torch.bfloat16 if torch.cuda.is_available() else torch.float32
|
18 |
|
|
|
19 |
def init_pipeline():
|
20 |
global pipe
|
21 |
transformer = FluxTransformer2DConditionalModel.from_pretrained(
|
|
|
16 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
17 |
dtype = torch.bfloat16 if torch.cuda.is_available() else torch.float32
|
18 |
|
19 |
+
@spaces.GPU
|
20 |
def init_pipeline():
|
21 |
global pipe
|
22 |
transformer = FluxTransformer2DConditionalModel.from_pretrained(
|