Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -21,7 +21,7 @@ pipe = FluxPipeline.from_pretrained(base_model,
|
|
| 21 |
torch_dtype=torch.bfloat16)
|
| 22 |
|
| 23 |
pipe.transformer.to(memory_format=torch.channels_last)
|
| 24 |
-
|
| 25 |
# pipe.enable_model_cpu_offload()
|
| 26 |
clip_slider = CLIPSliderFlux(pipe, device=torch.device("cuda"))
|
| 27 |
|
|
@@ -163,7 +163,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 163 |
with gr.Column():
|
| 164 |
with gr.Group(elem_id="group"):
|
| 165 |
post_generation_image = gr.Image(label="Generated Images", type="filepath")
|
| 166 |
-
post_generation_slider = gr.Slider(minimum=-10, maximum=10, value=0, step=1)
|
| 167 |
with gr.Row():
|
| 168 |
with gr.Column(scale=4, min_width=50):
|
| 169 |
image_seq = gr.Image(label="Strip", elem_id="strip", height=65)
|
|
|
|
| 21 |
torch_dtype=torch.bfloat16)
|
| 22 |
|
| 23 |
pipe.transformer.to(memory_format=torch.channels_last)
|
| 24 |
+
pipe.transformer = torch.compile(pipe.transformer, mode="max-autotune", fullgraph=True)
|
| 25 |
# pipe.enable_model_cpu_offload()
|
| 26 |
clip_slider = CLIPSliderFlux(pipe, device=torch.device("cuda"))
|
| 27 |
|
|
|
|
| 163 |
with gr.Column():
|
| 164 |
with gr.Group(elem_id="group"):
|
| 165 |
post_generation_image = gr.Image(label="Generated Images", type="filepath")
|
| 166 |
+
post_generation_slider = gr.Slider(minimum=-10, maximum=10, value=0, step=1, label="From 1st to 2nd direction")
|
| 167 |
with gr.Row():
|
| 168 |
with gr.Column(scale=4, min_width=50):
|
| 169 |
image_seq = gr.Image(label="Strip", elem_id="strip", height=65)
|