ironjr commited on
Commit
09dc574
1 Parent(s): 78ae837

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -9
app.py CHANGED
@@ -36,6 +36,7 @@ import numpy as np
36
  from PIL import Image
37
  import torch
38
 
 
39
  import gradio as gr
40
  from huggingface_hub import snapshot_download
41
 
@@ -115,7 +116,7 @@ model = StreamMultiDiffusion(
115
  bootstrap_mix_steps=opt.bootstrap_steps,
116
  guidance_scale=opt.guidance_scale,
117
  seed=opt.seed,
118
- )
119
 
120
 
121
  prompt_suggestions = [
@@ -380,6 +381,7 @@ def register(state, drawpad):
380
  return state
381
 
382
 
 
383
  def run(state, drawpad):
384
  state = register(state, drawpad)
385
  state.is_running = True
@@ -662,10 +664,6 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css, head=head) as demo:
662
  <img src='https://img.shields.io/badge/%F0%9F%A4%97%20Paper-StreamMultiDiffusion-yellow'>
663
  </a>
664
  &nbsp;
665
- <a href='https://huggingface.co/spaces/ironjr/StreamMultiDiffusion'>
666
- <img src='https://img.shields.io/badge/%F0%9F%A4%97%20Demo-StreamMultiDiffusion-yellow'>
667
- </a>
668
- &nbsp;
669
  <a href='https://huggingface.co/spaces/ironjr/SemanticPalette'>
670
  <img src='https://img.shields.io/badge/%F0%9F%A4%97%20Demo-SemanticPaletteSD1.5-yellow'>
671
  </a>
@@ -673,10 +671,6 @@ with gr.Blocks(theme=gr.themes.Soft(), css=css, head=head) as demo:
673
  <a href='https://huggingface.co/spaces/ironjr/SemanticPaletteXL'>
674
  <img src='https://img.shields.io/badge/%F0%9F%A4%97%20Demo-SemanticPaletteSDXL-yellow'>
675
  </a>
676
- &nbsp;
677
- <a href='https://colab.research.google.com/github/camenduru/SemanticPalette-jupyter/blob/main/SemanticPalette_jupyter.ipynb'>
678
- <img src='https://colab.research.google.com/assets/colab-badge.svg'>
679
- </a>
680
  </div>
681
  </div>
682
  </div>
 
36
  from PIL import Image
37
  import torch
38
 
39
+ import spaces
40
  import gradio as gr
41
  from huggingface_hub import snapshot_download
42
 
 
116
  bootstrap_mix_steps=opt.bootstrap_steps,
117
  guidance_scale=opt.guidance_scale,
118
  seed=opt.seed,
119
+ ).cuda()
120
 
121
 
122
  prompt_suggestions = [
 
381
  return state
382
 
383
 
384
+ @spaces.GPU
385
  def run(state, drawpad):
386
  state = register(state, drawpad)
387
  state.is_running = True
 
664
  <img src='https://img.shields.io/badge/%F0%9F%A4%97%20Paper-StreamMultiDiffusion-yellow'>
665
  </a>
666
  &nbsp;
 
 
 
 
667
  <a href='https://huggingface.co/spaces/ironjr/SemanticPalette'>
668
  <img src='https://img.shields.io/badge/%F0%9F%A4%97%20Demo-SemanticPaletteSD1.5-yellow'>
669
  </a>
 
671
  <a href='https://huggingface.co/spaces/ironjr/SemanticPaletteXL'>
672
  <img src='https://img.shields.io/badge/%F0%9F%A4%97%20Demo-SemanticPaletteSDXL-yellow'>
673
  </a>
 
 
 
 
674
  </div>
675
  </div>
676
  </div>