Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ import spaces
|
|
14 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
15 |
dtype = torch.bfloat16
|
16 |
|
17 |
-
|
18 |
def load_models(model_path="MeissonFlow/Meissonic",
|
19 |
transformer_path="MeissonFlow/Muddit"):
|
20 |
model = SymmetricTransformer2DModel.from_pretrained(
|
@@ -34,11 +34,11 @@ def load_models(model_path="MeissonFlow/Meissonic",
|
|
34 |
transformer=model,
|
35 |
scheduler=scheduler,
|
36 |
)
|
37 |
-
pipe.to(device)
|
38 |
return pipe
|
39 |
|
40 |
# Load models (global variable to avoid reloading)
|
41 |
pipe = load_models()
|
|
|
42 |
|
43 |
# Common transform
|
44 |
def get_transform(resolution):
|
|
|
14 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
15 |
dtype = torch.bfloat16
|
16 |
|
17 |
+
|
18 |
def load_models(model_path="MeissonFlow/Meissonic",
|
19 |
transformer_path="MeissonFlow/Muddit"):
|
20 |
model = SymmetricTransformer2DModel.from_pretrained(
|
|
|
34 |
transformer=model,
|
35 |
scheduler=scheduler,
|
36 |
)
|
|
|
37 |
return pipe
|
38 |
|
39 |
# Load models (global variable to avoid reloading)
|
40 |
pipe = load_models()
|
41 |
+
pipe.to(device)
|
42 |
|
43 |
# Common transform
|
44 |
def get_transform(resolution):
|