Spaces:
Running
on
Zero
Running
on
Zero
prithivMLmods
commited on
Commit
•
1cc3500
1
Parent(s):
03c5f07
Update app.py
Browse files
app.py
CHANGED
@@ -11,12 +11,7 @@ from typing import Tuple
|
|
11 |
dtype = torch.bfloat16
|
12 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
13 |
|
14 |
-
|
15 |
-
pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=dtype).to(device)
|
16 |
-
|
17 |
-
# Load the Flux Realism LoRA model
|
18 |
-
lora_repo = "XLabs-AI/flux-RealismLora"
|
19 |
-
pipe.load_lora_weights(lora_repo)
|
20 |
|
21 |
MAX_SEED = np.iinfo(np.int32).max
|
22 |
MAX_IMAGE_SIZE = 2048
|
@@ -76,7 +71,7 @@ style_list = [
|
|
76 |
},
|
77 |
]
|
78 |
|
79 |
-
css
|
80 |
#col-container {
|
81 |
margin: 0 auto;
|
82 |
max-width: 530px;
|
@@ -218,6 +213,7 @@ with gr.Blocks(css=css, theme="bethecloud/storj_theme") as demo:
|
|
218 |
predefined_gallery = gr.Gallery(label="## Images Sample", columns=3, show_label=False, value=load_predefined_images1())
|
219 |
|
220 |
gr.Markdown("**Disclaimer/Note:**")
|
|
|
221 |
gr.Markdown("🍕Model used in the space <a href='https://huggingface.co/black-forest-labs/FLUX.1-schnell' target='_blank'>black-forest-labs/FLUX.1-schnell</a>. More: 12B param rectified flow transformer distilled from [FLUX.1 [pro]](https://blackforestlabs.ai/) for 4 step generation[[blog](https://blackforestlabs.ai/announcing-black-forest-labs/)] [[model](https://huggingface.co/black-forest-labs/FLUX.1-schnell)]")
|
222 |
gr.Markdown("⚠️ users are accountable for the content they generate and are responsible for ensuring it meets appropriate ethical standards.")
|
223 |
|
|
|
11 |
dtype = torch.bfloat16
|
12 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
13 |
|
14 |
+
pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-schnell", torch_dtype=dtype).to(device)
|
|
|
|
|
|
|
|
|
|
|
15 |
|
16 |
MAX_SEED = np.iinfo(np.int32).max
|
17 |
MAX_IMAGE_SIZE = 2048
|
|
|
71 |
},
|
72 |
]
|
73 |
|
74 |
+
css="""
|
75 |
#col-container {
|
76 |
margin: 0 auto;
|
77 |
max-width: 530px;
|
|
|
213 |
predefined_gallery = gr.Gallery(label="## Images Sample", columns=3, show_label=False, value=load_predefined_images1())
|
214 |
|
215 |
gr.Markdown("**Disclaimer/Note:**")
|
216 |
+
|
217 |
gr.Markdown("🍕Model used in the space <a href='https://huggingface.co/black-forest-labs/FLUX.1-schnell' target='_blank'>black-forest-labs/FLUX.1-schnell</a>. More: 12B param rectified flow transformer distilled from [FLUX.1 [pro]](https://blackforestlabs.ai/) for 4 step generation[[blog](https://blackforestlabs.ai/announcing-black-forest-labs/)] [[model](https://huggingface.co/black-forest-labs/FLUX.1-schnell)]")
|
218 |
gr.Markdown("⚠️ users are accountable for the content they generate and are responsible for ensuring it meets appropriate ethical standards.")
|
219 |
|