Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -7,15 +7,11 @@ from diffusers import FluxControlPipeline, FluxTransformer2DModel
|
|
7 |
####################################
|
8 |
# Load the model(s) on CPU #
|
9 |
####################################
|
10 |
-
|
11 |
-
|
12 |
-
torch_dtype=torch.float32
|
13 |
-
)
|
14 |
pipeline = FluxControlPipeline.from_pretrained(
|
15 |
-
"black-forest-labs/FLUX.1-dev",
|
16 |
-
|
17 |
-
torch_dtype=torch.float32
|
18 |
-
)
|
19 |
|
20 |
#####################################
|
21 |
# The function for our Gradio app #
|
|
|
7 |
####################################
|
8 |
# Load the model(s) on CPU #
|
9 |
####################################
|
10 |
+
path = "sayakpaul/FLUX.1-dev-edit-v0"
|
11 |
+
edit_transformer = FluxTransformer2DModel.from_pretrained(path, torch_dtype=torch.bfloat16)
|
|
|
|
|
12 |
pipeline = FluxControlPipeline.from_pretrained(
|
13 |
+
"black-forest-labs/FLUX.1-dev", transformer=edit_transformer, torch_dtype=torch.bfloat16
|
14 |
+
).to("cuda")
|
|
|
|
|
15 |
|
16 |
#####################################
|
17 |
# The function for our Gradio app #
|