Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ import random
|
|
4 |
import spaces
|
5 |
import torch
|
6 |
from diffusers import DiffusionPipeline, FlowMatchEulerDiscreteScheduler, AutoencoderTiny, AutoencoderKL
|
7 |
-
from para_attn.first_block_cache.diffusers_adapters import apply_cache_on_pipe
|
8 |
from transformers import CLIPTextModel, CLIPTokenizer,T5EncoderModel, T5TokenizerFast
|
9 |
from live_preview_helpers import calculate_shift, retrieve_timesteps, flux_pipe_call_that_returns_an_iterable_of_images
|
10 |
import multiprocessing as mp
|
@@ -50,10 +50,10 @@ def infer(prompt, seed=42, randomize_seed=False, width=1024, height=1024, guidan
|
|
50 |
else:
|
51 |
joint_attention_kwargs = None
|
52 |
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
)
|
57 |
|
58 |
try:
|
59 |
# Call the custom pipeline function with the correct keyword argument
|
@@ -67,7 +67,6 @@ def infer(prompt, seed=42, randomize_seed=False, width=1024, height=1024, guidan
|
|
67 |
output_type="pil",
|
68 |
good_vae=good_vae, # Assuming good_vae is defined elsewhere
|
69 |
joint_attention_kwargs=joint_attention_kwargs, # Fixed parameter name
|
70 |
-
cache_scope=cache_scope,
|
71 |
):
|
72 |
yield img, seed
|
73 |
finally:
|
|
|
4 |
import spaces
|
5 |
import torch
|
6 |
from diffusers import DiffusionPipeline, FlowMatchEulerDiscreteScheduler, AutoencoderTiny, AutoencoderKL
|
7 |
+
# from para_attn.first_block_cache.diffusers_adapters import apply_cache_on_pipe
|
8 |
from transformers import CLIPTextModel, CLIPTokenizer,T5EncoderModel, T5TokenizerFast
|
9 |
from live_preview_helpers import calculate_shift, retrieve_timesteps, flux_pipe_call_that_returns_an_iterable_of_images
|
10 |
import multiprocessing as mp
|
|
|
50 |
else:
|
51 |
joint_attention_kwargs = None
|
52 |
|
53 |
+
# apply_cache_on_pipe(
|
54 |
+
# pipe,
|
55 |
+
# # residual_diff_threshold=0.2,
|
56 |
+
# )
|
57 |
|
58 |
try:
|
59 |
# Call the custom pipeline function with the correct keyword argument
|
|
|
67 |
output_type="pil",
|
68 |
good_vae=good_vae, # Assuming good_vae is defined elsewhere
|
69 |
joint_attention_kwargs=joint_attention_kwargs, # Fixed parameter name
|
|
|
70 |
):
|
71 |
yield img, seed
|
72 |
finally:
|