Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -48,7 +48,7 @@ class SamplingOptions:
|
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
-
|
| 52 |
class FluxEditor:
|
| 53 |
def __init__(self, args):
|
| 54 |
self.args = args
|
|
@@ -89,7 +89,8 @@ class FluxEditor:
|
|
| 89 |
with torch.no_grad():
|
| 90 |
init_image = ae.encode(init_image.to()).to(torch.bfloat16)
|
| 91 |
return init_image
|
| 92 |
-
|
|
|
|
| 93 |
@torch.inference_mode()
|
| 94 |
def edit(self, init_image, source_prompt, target_prompt, num_steps, inject_step, guidance, seed):
|
| 95 |
|
|
|
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
+
|
| 52 |
class FluxEditor:
|
| 53 |
def __init__(self, args):
|
| 54 |
self.args = args
|
|
|
|
| 89 |
with torch.no_grad():
|
| 90 |
init_image = ae.encode(init_image.to()).to(torch.bfloat16)
|
| 91 |
return init_image
|
| 92 |
+
|
| 93 |
+
@spaces.GPU(duration=120)
|
| 94 |
@torch.inference_mode()
|
| 95 |
def edit(self, init_image, source_prompt, target_prompt, num_steps, inject_step, guidance, seed):
|
| 96 |
|