tombetthauser commited on
Commit
93dd707
Β·
1 Parent(s): 36fb421

Add diffusers import and pipe

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -1,4 +1,9 @@
1
  import gradio
 
 
 
 
 
2
 
3
  def image_prompt(thing):
4
  prompt = "A children's drawing of a " + thing
 
1
  import gradio
2
+ from diffusers import StableDiffusionPipeline as pipeline
3
+ import torch
4
+
5
+ my_token = "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"
6
+ pipe = pipeline.from_pretrained("CompVis/stable-diffusion-v1-4", revision="fp16", torch_dtype=torch.float16, use_auth_token=my_token).to("cuda")
7
 
8
  def image_prompt(thing):
9
  prompt = "A children's drawing of a " + thing