Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -23,7 +23,7 @@ pipe.load_lora_weights(hf_hub_download("ByteDance/Hyper-SD", "Hyper-FLUX.1-dev-8
|
|
| 23 |
pipe.fuse_lora(lora_scale=0.125)
|
| 24 |
pipe.to(DEVICE)
|
| 25 |
|
| 26 |
-
examples = [[Image.open("cat.jpg"), "a tiger", 0, 0.
|
| 27 |
def reset_do_inversion():
|
| 28 |
return True
|
| 29 |
|
|
@@ -90,8 +90,10 @@ with gr.Blocks(css=css) as demo:
|
|
| 90 |
with gr.Column(elem_id="col-container"):
|
| 91 |
gr.Markdown(f"""# RF inversion ποΈποΈ
|
| 92 |
### Edit real images with FLUX.1 [dev]
|
| 93 |
-
|
| 94 |
-
Stochastic Rectified Differential Equations*](https://rf-inversion.github.io/data/rf-inversion.pdf)
|
|
|
|
|
|
|
| 95 |
|
| 96 |
[[non-commercial license](https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md)] [[project page](https://rf-inversion.github.io/) [[arxiv](https://arxiv.org/pdf/2410.10792)]
|
| 97 |
""")
|
|
@@ -122,7 +124,7 @@ Stochastic Rectified Differential Equations*](https://rf-inversion.github.io/dat
|
|
| 122 |
minimum=0.0,
|
| 123 |
maximum=1.0,
|
| 124 |
step=0.1,
|
| 125 |
-
value=0.
|
| 126 |
)
|
| 127 |
eta = gr.Slider(
|
| 128 |
label="eta",
|
|
@@ -154,7 +156,7 @@ Stochastic Rectified Differential Equations*](https://rf-inversion.github.io/dat
|
|
| 154 |
minimum=1,
|
| 155 |
maximum=50,
|
| 156 |
step=1,
|
| 157 |
-
value=
|
| 158 |
)
|
| 159 |
|
| 160 |
with gr.Row():
|
|
@@ -171,7 +173,7 @@ Stochastic Rectified Differential Equations*](https://rf-inversion.github.io/dat
|
|
| 171 |
minimum=1,
|
| 172 |
maximum=50,
|
| 173 |
step=1,
|
| 174 |
-
value=
|
| 175 |
)
|
| 176 |
|
| 177 |
with gr.Row():
|
|
|
|
| 23 |
pipe.fuse_lora(lora_scale=0.125)
|
| 24 |
pipe.to(DEVICE)
|
| 25 |
|
| 26 |
+
examples = [[Image.open("cat.jpg"), "a tiger", 0, 0.7, 0.5, 0.9, 8, 8, 789385745, False]]
|
| 27 |
def reset_do_inversion():
|
| 28 |
return True
|
| 29 |
|
|
|
|
| 90 |
with gr.Column(elem_id="col-container"):
|
| 91 |
gr.Markdown(f"""# RF inversion ποΈποΈ
|
| 92 |
### Edit real images with FLUX.1 [dev]
|
| 93 |
+
following the algorithm proposed in [*Semantic Image Inversion and Editing using
|
| 94 |
+
Stochastic Rectified Differential Equations* by Rout et al.](https://rf-inversion.github.io/data/rf-inversion.pdf)
|
| 95 |
+
|
| 96 |
+
### & based on the implementations of [@raven38](https://github.com/raven38) & [@DarkMnDragon](https://github.com/DarkMnDragon) ππ»
|
| 97 |
|
| 98 |
[[non-commercial license](https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md)] [[project page](https://rf-inversion.github.io/) [[arxiv](https://arxiv.org/pdf/2410.10792)]
|
| 99 |
""")
|
|
|
|
| 124 |
minimum=0.0,
|
| 125 |
maximum=1.0,
|
| 126 |
step=0.1,
|
| 127 |
+
value=0.7,
|
| 128 |
)
|
| 129 |
eta = gr.Slider(
|
| 130 |
label="eta",
|
|
|
|
| 156 |
minimum=1,
|
| 157 |
maximum=50,
|
| 158 |
step=1,
|
| 159 |
+
value=8,
|
| 160 |
)
|
| 161 |
|
| 162 |
with gr.Row():
|
|
|
|
| 173 |
minimum=1,
|
| 174 |
maximum=50,
|
| 175 |
step=1,
|
| 176 |
+
value=8,
|
| 177 |
)
|
| 178 |
|
| 179 |
with gr.Row():
|