kadirnar commited on
Commit
4db841e
·
verified ·
1 Parent(s): 7e1ec9f

Update stable_cascade.py

Browse files
Files changed (1) hide show
  1. stable_cascade.py +2 -2
stable_cascade.py CHANGED
@@ -1,12 +1,12 @@
1
  import torch, os
2
  from diffusers import StableCascadeDecoderPipeline, StableCascadePriorPipeline
3
  import gradio as gr
4
-
5
- os.environ['TOKENIZERS_PARALLELISM'] = 'false'
6
 
7
  prior = StableCascadePriorPipeline.from_pretrained("stabilityai/stable-cascade-prior", torch_dtype=torch.bfloat16).to("cuda")
8
  decoder = StableCascadeDecoderPipeline.from_pretrained("stabilityai/stable-cascade", torch_dtype=torch.float16).to("cuda")
9
 
 
10
  def generate_images(
11
  prompt="a photo of a girl",
12
  negative_prompt="bad,ugly,deformed",
 
1
  import torch, os
2
  from diffusers import StableCascadeDecoderPipeline, StableCascadePriorPipeline
3
  import gradio as gr
4
+ import spaces
 
5
 
6
  prior = StableCascadePriorPipeline.from_pretrained("stabilityai/stable-cascade-prior", torch_dtype=torch.bfloat16).to("cuda")
7
  decoder = StableCascadeDecoderPipeline.from_pretrained("stabilityai/stable-cascade", torch_dtype=torch.float16).to("cuda")
8
 
9
+ @spaces.GPU
10
  def generate_images(
11
  prompt="a photo of a girl",
12
  negative_prompt="bad,ugly,deformed",