Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -7,8 +7,7 @@ from PIL import Image
|
|
7 |
import os
|
8 |
from huggingface_hub import hf_hub_download
|
9 |
import torch
|
10 |
-
import diffusers
|
11 |
-
from pipeline_flux_rf_inversion import RFInversionFluxPipeline
|
12 |
|
13 |
# Constants
|
14 |
MAX_SEED = np.iinfo(np.int32).max
|
@@ -16,8 +15,9 @@ MAX_IMAGE_SIZE = 1024
|
|
16 |
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|
17 |
|
18 |
|
19 |
-
pipe =
|
20 |
-
|
|
|
21 |
pipe.to(DEVICE)
|
22 |
|
23 |
def reset_do_inversion():
|
|
|
7 |
import os
|
8 |
from huggingface_hub import hf_hub_download
|
9 |
import torch
|
10 |
+
import diffusers import DiffusionPipeline
|
|
|
11 |
|
12 |
# Constants
|
13 |
MAX_SEED = np.iinfo(np.int32).max
|
|
|
15 |
DEVICE = "cuda" if torch.cuda.is_available() else "cpu"
|
16 |
|
17 |
|
18 |
+
pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev",
|
19 |
+
custom_pipeline="pipeline_flux_rf_inversion",
|
20 |
+
torch_dtype=torch.bfloat16)
|
21 |
pipe.to(DEVICE)
|
22 |
|
23 |
def reset_do_inversion():
|