Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -28,11 +28,10 @@ def split_image(input_image, num_splits=4):
|
|
| 28 |
|
| 29 |
return output_images
|
| 30 |
|
| 31 |
-
pipe = FluxPipeline.from_pretrained(
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
)
|
| 35 |
-
pipe.to(device)
|
| 36 |
|
| 37 |
MAX_SEED = np.iinfo(np.int32).max
|
| 38 |
|
|
@@ -74,7 +73,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 74 |
with gr.Column(elem_id="col-container"):
|
| 75 |
gr.Markdown(f"""
|
| 76 |
# FLUX Animations
|
| 77 |
-
Generate gifs with FLUX
|
| 78 |
""")
|
| 79 |
|
| 80 |
with gr.Row():
|
|
@@ -108,7 +107,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 108 |
minimum=1,
|
| 109 |
maximum=12,
|
| 110 |
step=1,
|
| 111 |
-
value=
|
| 112 |
)
|
| 113 |
|
| 114 |
|
|
|
|
| 28 |
|
| 29 |
return output_images
|
| 30 |
|
| 31 |
+
pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch_dtype)
|
| 32 |
+
pipe.load_lora_weights(hf_hub_download("ByteDance/Hyper-SD", "Hyper-FLUX.1-dev-8steps-lora.safetensors"))
|
| 33 |
+
pipe.fuse_lora(lora_scale=0.125)
|
| 34 |
+
pipe.to(device=device, dtype=torch_dtype)
|
|
|
|
| 35 |
|
| 36 |
MAX_SEED = np.iinfo(np.int32).max
|
| 37 |
|
|
|
|
| 73 |
with gr.Column(elem_id="col-container"):
|
| 74 |
gr.Markdown(f"""
|
| 75 |
# FLUX Animations
|
| 76 |
+
Generate gifs with FLUX [dev] + HyperSD 8 steps. Concept idea by [fofr](https://x.com/fofrAI). Diffusers implementation by [Dhruv](_DhruvNair_)
|
| 77 |
""")
|
| 78 |
|
| 79 |
with gr.Row():
|
|
|
|
| 107 |
minimum=1,
|
| 108 |
maximum=12,
|
| 109 |
step=1,
|
| 110 |
+
value=8,
|
| 111 |
)
|
| 112 |
|
| 113 |
|