Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,19 +5,10 @@ import spaces
|
|
| 5 |
import torch
|
| 6 |
import os
|
| 7 |
import time
|
| 8 |
-
from diffusers import FluxPipeline
|
| 9 |
|
| 10 |
MAX_SEED = np.iinfo(np.int32).max
|
| 11 |
pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16).to("cuda")
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
pipe.scheduler = FlowMatchEulerDiscreteScheduler.from_config(
|
| 15 |
-
pipe.scheduler.config,
|
| 16 |
-
shift=3.16,
|
| 17 |
-
base_shift=0.5,
|
| 18 |
-
max_shift=1.15
|
| 19 |
-
)
|
| 20 |
-
|
| 21 |
torch.cuda.empty_cache()
|
| 22 |
MAX_IMAGE_SIZE = 2048
|
| 23 |
|
|
|
|
| 5 |
import torch
|
| 6 |
import os
|
| 7 |
import time
|
| 8 |
+
from diffusers import FluxPipeline
|
| 9 |
|
| 10 |
MAX_SEED = np.iinfo(np.int32).max
|
| 11 |
pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16).to("cuda")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
torch.cuda.empty_cache()
|
| 13 |
MAX_IMAGE_SIZE = 2048
|
| 14 |
|