Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,18 +5,9 @@ import modin.pandas as pd
|
|
| 5 |
import numpy as np
|
| 6 |
from diffusers import DiffusionPipeline
|
| 7 |
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
torch.cuda.max_memory_allocated(device=device)
|
| 12 |
-
torch.cuda.empty_cache()
|
| 13 |
-
pipe = DiffusionPipeline.from_pretrained("mann-e/Mann-E_Dreams", torch_dtype=torch.float16)
|
| 14 |
-
pipe.enable_xformers_memory_efficient_attention()
|
| 15 |
-
pipe = pipe.to(device)
|
| 16 |
-
torch.cuda.empty_cache()
|
| 17 |
-
else:
|
| 18 |
-
pipe = DiffusionPipeline.from_pretrained("mann-e/Mann-E_Dreams", use_safetensors=True)
|
| 19 |
-
pipe = pipe.to(device)
|
| 20 |
|
| 21 |
@spaces.GPU
|
| 22 |
def genie (prompt, negative_prompt, steps, seed):
|
|
|
|
| 5 |
import numpy as np
|
| 6 |
from diffusers import DiffusionPipeline
|
| 7 |
|
| 8 |
+
pipe = DiffusionPipeline.from_pretrained("mann-e/Mann-E_Dreams", torch_dtype=torch.float16).to("cuda")
|
| 9 |
+
pipe.enable_xformers_memory_efficient_attention()
|
| 10 |
+
torch.cuda.empty_cache()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
|
| 12 |
@spaces.GPU
|
| 13 |
def genie (prompt, negative_prompt, steps, seed):
|