tonyassi commited on
Commit
ef4b074
β€’
1 Parent(s): 8df0601

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py CHANGED
@@ -1,4 +1,16 @@
1
  import gradio as gr
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
  def blend(img1, img2, slider):
4
  return img1
 
1
  import gradio as gr
2
+ from diffusers import KandinskyPriorPipeline, KandinskyPipeline
3
+ from diffusers.utils import load_image
4
+
5
+
6
+ pipe_prior = KandinskyPriorPipeline.from_pretrained(
7
+ "kandinsky-community/kandinsky-2-1-prior", torch_dtype=torch.float16
8
+ )
9
+ pipe_prior.to("cuda")
10
+
11
+ pipe = KandinskyPipeline.from_pretrained("kandinsky-community/kandinsky-2-1", torch_dtype=torch.float16)
12
+ pipe.to("cuda")
13
+
14
 
15
  def blend(img1, img2, slider):
16
  return img1