Spaces:
Runtime error
Runtime error
zhangyang-0123
commited on
Commit
·
fa31c55
1
Parent(s):
d61123d
update
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ pipe = FluxPipeline.from_pretrained(model_repo_id, torch_dtype=torch_dtype)
|
|
15 |
pipe = pipe.to(device)
|
16 |
|
17 |
# load pruned model
|
18 |
-
pruned_pipe = FluxPipeline.from_pretrained(model_repo_id, torch_dtype=torch_dtype)
|
19 |
pruned_pipe.transformer = torch.load(
|
20 |
hf_hub_download("zhangyang-0123/EcoDiffPrunedModels", "model/flux/flux.pkl"),
|
21 |
map_location="cpu",
|
@@ -56,15 +56,18 @@ css = """
|
|
56 |
|
57 |
header = """
|
58 |
# 🌱 EcoDiff Pruned FLUX-Schnell (20% Pruning Ratio)
|
|
|
59 |
|
|
|
60 |
<div style="text-align: center; display: flex; justify-content: left; gap: 5px;">
|
61 |
-
<a href="https://arxiv.org/abs/2412.02852"><img src="https://img.shields.io/badge/ariXv-Paper-A42C25.svg" alt="arXiv"></a>
|
62 |
-
<a href="https://huggingface.co/zhangyang-0123/EcoDiffPrunedModels"><img src="https://img.shields.io/badge/🤗-Model-ffbd45.svg" alt="HuggingFace"></a>
|
63 |
</div>
|
64 |
"""
|
65 |
|
66 |
with gr.Blocks(css=css) as demo:
|
67 |
gr.Markdown(header)
|
|
|
68 |
with gr.Row():
|
69 |
prompt = gr.Textbox(
|
70 |
label="Prompt",
|
|
|
15 |
pipe = pipe.to(device)
|
16 |
|
17 |
# load pruned model
|
18 |
+
pruned_pipe = FluxPipeline.from_pretrained(model_repo_id, torch_dtype=torch_dtype)
|
19 |
pruned_pipe.transformer = torch.load(
|
20 |
hf_hub_download("zhangyang-0123/EcoDiffPrunedModels", "model/flux/flux.pkl"),
|
21 |
map_location="cpu",
|
|
|
56 |
|
57 |
header = """
|
58 |
# 🌱 EcoDiff Pruned FLUX-Schnell (20% Pruning Ratio)
|
59 |
+
"""
|
60 |
|
61 |
+
header_2 = """
|
62 |
<div style="text-align: center; display: flex; justify-content: left; gap: 5px;">
|
63 |
+
<a href="https://arxiv.org/abs/2412.02852"><img src="https://img.shields.io/badge/ariXv-Paper-A42C25.svg" alt="arXiv"></a>
|
64 |
+
<a href="https://huggingface.co/zhangyang-0123/EcoDiffPrunedModels"><img src="https://img.shields.io/badge/🤗-Model-ffbd45.svg" alt="HuggingFace"></a>
|
65 |
</div>
|
66 |
"""
|
67 |
|
68 |
with gr.Blocks(css=css) as demo:
|
69 |
gr.Markdown(header)
|
70 |
+
gr.HTML(header_2)
|
71 |
with gr.Row():
|
72 |
prompt = gr.Textbox(
|
73 |
label="Prompt",
|