Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -10,11 +10,11 @@ from live_preview_helpers import calculate_shift, retrieve_timesteps, flux_pipe_
|
|
10 |
dtype = torch.bfloat16
|
11 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
12 |
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
MAX_SEED = np.iinfo(np.int32).max
|
19 |
MAX_IMAGE_SIZE = 2048
|
20 |
|
@@ -54,10 +54,7 @@ css="""
|
|
54 |
with gr.Blocks(css=css) as demo:
|
55 |
|
56 |
with gr.Column(elem_id="col-container"):
|
57 |
-
gr.Markdown(f"""#
|
58 |
-
12B param rectified flow transformer guidance-distilled from [FLUX.1 [pro]](https://blackforestlabs.ai/)
|
59 |
-
[[non-commercial license](https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md)] [[blog](https://blackforestlabs.ai/announcing-black-forest-labs/)] [[model](https://huggingface.co/black-forest-labs/FLUX.1-dev)]
|
60 |
-
""")
|
61 |
|
62 |
with gr.Row():
|
63 |
|
@@ -110,7 +107,7 @@ with gr.Blocks(css=css) as demo:
|
|
110 |
minimum=1,
|
111 |
maximum=15,
|
112 |
step=0.1,
|
113 |
-
value=
|
114 |
)
|
115 |
|
116 |
num_inference_steps = gr.Slider(
|
|
|
10 |
dtype = torch.bfloat16
|
11 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
12 |
|
13 |
+
pipe = SanaSprintPipeline.from_pretrained(
|
14 |
+
"Efficient-Large-Model/Sana_Sprint_0.6B_1024px_diffusers",
|
15 |
+
torch_dtype=torch.bfloat16
|
16 |
+
)
|
17 |
+
pipe.to(device)
|
18 |
MAX_SEED = np.iinfo(np.int32).max
|
19 |
MAX_IMAGE_SIZE = 2048
|
20 |
|
|
|
54 |
with gr.Blocks(css=css) as demo:
|
55 |
|
56 |
with gr.Column(elem_id="col-container"):
|
57 |
+
gr.Markdown(f"""# Sana Sprint""")
|
|
|
|
|
|
|
58 |
|
59 |
with gr.Row():
|
60 |
|
|
|
107 |
minimum=1,
|
108 |
maximum=15,
|
109 |
step=0.1,
|
110 |
+
value=1,
|
111 |
)
|
112 |
|
113 |
num_inference_steps = gr.Slider(
|