Nymbo commited on
Commit
03e984c
1 Parent(s): d8d13c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -21
app.py CHANGED
@@ -105,28 +105,13 @@ if torch.cuda.is_available():
105
  else:
106
  power_device = "CPU"
107
 
108
- with gr.Blocks(css=css) as demo:
109
  with gr.Column(elem_id="col-container"):
110
  gr.Markdown(
111
  f"""
112
- # ⚡ Flash Diffusion: FlashSD3
113
- This is an interactive demo of [Flash Diffusion](https://gojasper.github.io/flash-diffusion-project/), a diffusion distillation method proposed in [Flash Diffusion: Accelerating Any Conditional
114
- Diffusion Model for Few Steps Image Generation](http://arxiv.org/abs/2406.02347) *by Clément Chadebec, Onur Tasar, Eyal Benaroche and Benjamin Aubin* from Jasper Research.
115
- [This model](https://huggingface.co/jasperai/flash-sd3) is a **90.4M** LoRA distilled version of [SD3](https://huggingface.co/stabilityai/stable-diffusion-3-medium) model that is able to generate 1024x1024 images in **4 to 8 steps**.
116
- Results can be compared with the teacher model [here](https://huggingface.co/spaces/stabilityai/stable-diffusion-3-medium).
117
- Currently running on {power_device}.
118
  """
119
  )
120
- gr.Markdown(
121
- "If you enjoy the space, please also promote *open-source* by giving a ⭐ to the <a href='https://github.com/gojasper/flash-diffusion' target='_blank'>Github Repo</a>. [![GitHub Stars](https://img.shields.io/github/stars/gojasper/flash-diffusion?style=social)](https://github.com/gojasper/flash-diffusion)"
122
- )
123
- gr.Markdown(
124
- "💡 *Hint:* We noticed that 8 steps and CFG can improve the results (text rendering in particular) for that very model. Feel free to play with those parameters."
125
- )
126
-
127
- gr.Markdown(
128
- "💡 *Hint:* To better appreciate the low latency of our method, run the demo locally !"
129
- )
130
 
131
  with gr.Row():
132
  prompt = gr.Text(
@@ -180,10 +165,7 @@ with gr.Blocks(css=css) as demo:
180
 
181
  examples = gr.Examples(examples=examples, inputs=[prompt], cache_examples=False)
182
 
183
- gr.Markdown("**Disclaimer:**")
184
- gr.Markdown(
185
- "This demo is only for research purpose. Jasper cannot be held responsible for the generation of NSFW (Not Safe For Work) content through the use of this demo. Users are solely responsible for any content they create, and it is their obligation to ensure that it adheres to appropriate and ethical standards. Jasper provides the tools, but the responsibility for their use lies with the individual user."
186
- )
187
  gr.on(
188
  [run_button.click, seed.change, randomize_seed.change, prompt.submit],
189
  fn=infer,
 
105
  else:
106
  power_device = "CPU"
107
 
108
+ with gr.Blocks(css=css, theme="Nymbo/Alyx_Theme") as demo:
109
  with gr.Column(elem_id="col-container"):
110
  gr.Markdown(
111
  f"""
112
+ # ⚡ SD3: Flash
 
 
 
 
 
113
  """
114
  )
 
 
 
 
 
 
 
 
 
 
115
 
116
  with gr.Row():
117
  prompt = gr.Text(
 
165
 
166
  examples = gr.Examples(examples=examples, inputs=[prompt], cache_examples=False)
167
 
168
+ gr.Markdown("")
 
 
 
169
  gr.on(
170
  [run_button.click, seed.change, randomize_seed.change, prompt.submit],
171
  fn=infer,