Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import torch
|
2 |
import spaces
|
3 |
import gradio as gr
|
4 |
-
from diffusers import FluxInpaintPipeline
|
5 |
import random
|
6 |
import numpy as np
|
7 |
|
@@ -13,13 +13,10 @@ if torch.cuda.is_available():
|
|
13 |
"https://huggingface.co/black-forest-labs/FLUX.1-Fill-dev/blob/main/flux1-fill-dev.safetensors",
|
14 |
torch_dtype=torch.bfloat16
|
15 |
)
|
16 |
-
pipe =
|
17 |
model,
|
18 |
transformer=transformer,
|
19 |
torch_dtype=torch.bfloat16)
|
20 |
-
pipe.scheduler = FlowMatchEulerDiscreteScheduler.from_config(
|
21 |
-
pipe.scheduler.config, use_beta_sigmas=True
|
22 |
-
)
|
23 |
pipe.to("cuda")
|
24 |
|
25 |
|
|
|
1 |
import torch
|
2 |
import spaces
|
3 |
import gradio as gr
|
4 |
+
from diffusers import FluxInpaintPipeline, FluxTransformer2DModel
|
5 |
import random
|
6 |
import numpy as np
|
7 |
|
|
|
13 |
"https://huggingface.co/black-forest-labs/FLUX.1-Fill-dev/blob/main/flux1-fill-dev.safetensors",
|
14 |
torch_dtype=torch.bfloat16
|
15 |
)
|
16 |
+
pipe = FluxInpaintPipeline.from_pretrained(
|
17 |
model,
|
18 |
transformer=transformer,
|
19 |
torch_dtype=torch.bfloat16)
|
|
|
|
|
|
|
20 |
pipe.to("cuda")
|
21 |
|
22 |
|