Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -5,6 +5,9 @@ import spaces
|
|
5 |
import torch
|
6 |
from diffusers import DiffusionPipeline
|
7 |
|
|
|
|
|
|
|
8 |
dtype = torch.bfloat16
|
9 |
#device = "cuda" if torch.cuda.is_available() else "cpu"
|
10 |
device = "cuda"
|
@@ -46,7 +49,7 @@ css="""
|
|
46 |
with gr.Blocks(css=css) as demo:
|
47 |
|
48 |
with gr.Column(elem_id="col-container"):
|
49 |
-
gr.Markdown(f"""# FLUX.1 [schnell]
|
50 |
12B param rectified flow transformer distilled from [FLUX.1 [pro]](https://blackforestlabs.ai/) for 4 step generation
|
51 |
[[blog](https://blackforestlabs.ai/announcing-black-forest-labs/)] [[model](https://huggingface.co/black-forest-labs/FLUX.1-schnell)]
|
52 |
""")
|
|
|
5 |
import torch
|
6 |
from diffusers import DiffusionPipeline
|
7 |
|
8 |
+
# for initial data
|
9 |
+
pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell", torch_dtype=dtype).to("cpu")
|
10 |
+
|
11 |
dtype = torch.bfloat16
|
12 |
#device = "cuda" if torch.cuda.is_available() else "cpu"
|
13 |
device = "cuda"
|
|
|
49 |
with gr.Blocks(css=css) as demo:
|
50 |
|
51 |
with gr.Column(elem_id="col-container"):
|
52 |
+
gr.Markdown(f"""# FLUX.1 [schnell] 120 sec version
|
53 |
12B param rectified flow transformer distilled from [FLUX.1 [pro]](https://blackforestlabs.ai/) for 4 step generation
|
54 |
[[blog](https://blackforestlabs.ai/announcing-black-forest-labs/)] [[model](https://huggingface.co/black-forest-labs/FLUX.1-schnell)]
|
55 |
""")
|