Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -30,10 +30,11 @@ class timer:
|
|
| 30 |
if not path.exists(cache_path):
|
| 31 |
os.makedirs(cache_path, exist_ok=True)
|
| 32 |
|
| 33 |
-
pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16
|
| 34 |
pipe.load_lora_weights(hf_hub_download("ByteDance/Hyper-SD", "Hyper-FLUX.1-dev-8steps-lora.safetensors"))
|
| 35 |
pipe.fuse_lora(lora_scale=0.125)
|
| 36 |
pipe.to(device="cuda", dtype=torch.bfloat16)
|
|
|
|
| 37 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
| 38 |
gr.Markdown(
|
| 39 |
"""
|
|
@@ -106,4 +107,3 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
| 106 |
|
| 107 |
if __name__ == "__main__":
|
| 108 |
demo.launch()
|
| 109 |
-
|
|
|
|
| 30 |
if not path.exists(cache_path):
|
| 31 |
os.makedirs(cache_path, exist_ok=True)
|
| 32 |
|
| 33 |
+
pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16)
|
| 34 |
pipe.load_lora_weights(hf_hub_download("ByteDance/Hyper-SD", "Hyper-FLUX.1-dev-8steps-lora.safetensors"))
|
| 35 |
pipe.fuse_lora(lora_scale=0.125)
|
| 36 |
pipe.to(device="cuda", dtype=torch.bfloat16)
|
| 37 |
+
|
| 38 |
with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
| 39 |
gr.Markdown(
|
| 40 |
"""
|
|
|
|
| 107 |
|
| 108 |
if __name__ == "__main__":
|
| 109 |
demo.launch()
|
|
|