Spaces:
Running
on
Zero
Running
on
Zero
small change
Browse files
app.py
CHANGED
|
@@ -34,7 +34,7 @@ torch.backends.cudnn.benchmark = True
|
|
| 34 |
# -----------------------------
|
| 35 |
# Model / pipeline loading
|
| 36 |
# -----------------------------
|
| 37 |
-
@torch.
|
| 38 |
@spaces.GPU
|
| 39 |
def load_pipeline_single_gpu() -> FluxKontextSliderPipeline:
|
| 40 |
pretrained = "black-forest-labs/FLUX.1-Kontext-dev"
|
|
@@ -295,6 +295,7 @@ def _encode_prompt(prompt: str):
|
|
| 295 |
# Inference functions
|
| 296 |
# -----------------------------
|
| 297 |
@spaces.GPU
|
|
|
|
| 298 |
def generate_image_stack_edits(text_prompt, n_edits, input_image):
|
| 299 |
"""
|
| 300 |
Compute n_edits images on a single GPU for slider values in (0,1],
|
|
|
|
| 34 |
# -----------------------------
|
| 35 |
# Model / pipeline loading
|
| 36 |
# -----------------------------
|
| 37 |
+
@torch.no_grad()
|
| 38 |
@spaces.GPU
|
| 39 |
def load_pipeline_single_gpu() -> FluxKontextSliderPipeline:
|
| 40 |
pretrained = "black-forest-labs/FLUX.1-Kontext-dev"
|
|
|
|
| 295 |
# Inference functions
|
| 296 |
# -----------------------------
|
| 297 |
@spaces.GPU
|
| 298 |
+
@torch.no_grad()
|
| 299 |
def generate_image_stack_edits(text_prompt, n_edits, input_image):
|
| 300 |
"""
|
| 301 |
Compute n_edits images on a single GPU for slider values in (0,1],
|