Spaces:
Running
on
Zero
Running
on
Zero
Himanshu-AT
commited on
Commit
·
a18a8e9
1
Parent(s):
94e2acf
test
Browse files
app.py
CHANGED
@@ -18,8 +18,8 @@ pipe.load_lora_weights("alvdansen/flux-koda")
|
|
18 |
pipe.enable_sequential_cpu_offload()
|
19 |
# pipe.enable_fp16()
|
20 |
pipe.enable_lora()
|
21 |
-
pipe.vae.enable_slicing()
|
22 |
-
pipe.vae.enable_tiling()
|
23 |
|
24 |
def calculate_optimal_dimensions(image: Image.Image):
|
25 |
# Extract the original dimensions
|
@@ -60,7 +60,7 @@ def calculate_optimal_dimensions(image: Image.Image):
|
|
60 |
|
61 |
@spaces.GPU(durations=300)
|
62 |
def infer(edit_images, prompt, seed=42, randomize_seed=False, width=1024, height=1024, guidance_scale=3.5, num_inference_steps=28, progress=gr.Progress(track_tqdm=True)):
|
63 |
-
pipe.enable_xformers_memory_efficient_attention()
|
64 |
|
65 |
image = edit_images["background"]
|
66 |
width, height = calculate_optimal_dimensions(image)
|
|
|
18 |
pipe.enable_sequential_cpu_offload()
|
19 |
# pipe.enable_fp16()
|
20 |
pipe.enable_lora()
|
21 |
+
# pipe.vae.enable_slicing()
|
22 |
+
# pipe.vae.enable_tiling()
|
23 |
|
24 |
def calculate_optimal_dimensions(image: Image.Image):
|
25 |
# Extract the original dimensions
|
|
|
60 |
|
61 |
@spaces.GPU(durations=300)
|
62 |
def infer(edit_images, prompt, seed=42, randomize_seed=False, width=1024, height=1024, guidance_scale=3.5, num_inference_steps=28, progress=gr.Progress(track_tqdm=True)):
|
63 |
+
# pipe.enable_xformers_memory_efficient_attention()
|
64 |
|
65 |
image = edit_images["background"]
|
66 |
width, height = calculate_optimal_dimensions(image)
|