Update README.md

#1
by sayakpaul HF staff - opened
Files changed (1) hide show
  1. README.md +8 -8
README.md CHANGED
@@ -26,7 +26,7 @@ from diffusers import KandinskyPipeline, KandinskyPriorPipeline
26
  import torch
27
 
28
 
29
- pipe_prior = KandinskyPriorPipeline.from_pretrained("YiYiXu/Kandinsky-prior", torch_dtype=torch.float16)
30
  pipe_prior.to("cuda")
31
 
32
  prompt = "A alien cheeseburger creature eating itself, claymation, cinematic, moody lighting"
@@ -40,7 +40,7 @@ zero_image_emb = pipe_prior(
40
  negative_prompt, guidance_scale=1.0, num_inference_steps=25, generator=generator, negative_prompt=negative_prompt
41
  ).images
42
 
43
- pipe = KandinskyPipeline.from_pretrained("YiYiXu/Kandinsky", torch_dtype=torch.float16)
44
  pipe.to("cuda")
45
 
46
 
@@ -78,11 +78,11 @@ original_image = Image.open(BytesIO(response.content)).convert("RGB")
78
  original_image = original_image.resize((768, 512))
79
 
80
  # create prior
81
- pipe_prior = KandinskyPriorPipeline.from_pretrained("YiYiXu/Kandinsky-prior", torch_dtype=torch.float16)
82
  pipe_prior.to("cuda")
83
 
84
  # create img2img pipeline
85
- pipe = KandinskyImg2ImgPipeline.from_pretrained("YiYiXu/Kandinsky", torch_dtype=torch.float16)
86
  pipe.to("cuda")
87
 
88
  prompt = "A fantasy landscape, Cinematic lighting"
@@ -121,13 +121,13 @@ from diffusers.utils import load_image
121
  import torch
122
  import numpy as np
123
 
124
- pipe_prior = KandinskyPriorPipeline.from_pretrained("YiYiXu/Kandinsky-prior", torch_dtype=torch.float16)
125
  pipe_prior.to("cuda")
126
 
127
  prompt = "a hat"
128
  image_emb, zero_image_emb = pipe_prior(prompt, return_dict=False)
129
 
130
- pipe = KandinskyInpaintPipeline.from_pretrained("YiYiXu/Kandinsky-inpaint", torch_dtype=torch.float16)
131
  pipe.to("cuda")
132
 
133
  init_image = load_image(
@@ -164,7 +164,7 @@ import PIL
164
  import torch
165
  from torchvision import transforms
166
 
167
- pipe_prior = KandinskyPriorPipeline.from_pretrained("YiYiXu/Kandinsky-prior", torch_dtype=torch.float16)
168
  pipe_prior.to("cuda")
169
 
170
  img1 = load_image(
@@ -179,7 +179,7 @@ images_texts = ["a cat", img1, img2]
179
  weights = [0.3, 0.3, 0.4]
180
  image_emb, zero_image_emb = pipe_prior.interpolate(images_texts, weights)
181
 
182
- pipe = KandinskyPipeline.from_pretrained("YiYiXu/Kandinsky", torch_dtype=torch.float16)
183
  pipe.to("cuda")
184
 
185
  image = pipe(
 
26
  import torch
27
 
28
 
29
+ pipe_prior = KandinskyPriorPipeline.from_pretrained("kandinsky-community/kandinsky-2-1-prior", torch_dtype=torch.float16)
30
  pipe_prior.to("cuda")
31
 
32
  prompt = "A alien cheeseburger creature eating itself, claymation, cinematic, moody lighting"
 
40
  negative_prompt, guidance_scale=1.0, num_inference_steps=25, generator=generator, negative_prompt=negative_prompt
41
  ).images
42
 
43
+ pipe = KandinskyPipeline.from_pretrained("kandinsky-community/kandinsky-2-1", torch_dtype=torch.float16)
44
  pipe.to("cuda")
45
 
46
 
 
78
  original_image = original_image.resize((768, 512))
79
 
80
  # create prior
81
+ pipe_prior = KandinskyPriorPipeline.from_pretrained("kandinsky-community/kandinsky-2-1-prior", torch_dtype=torch.float16)
82
  pipe_prior.to("cuda")
83
 
84
  # create img2img pipeline
85
+ pipe = KandinskyImg2ImgPipeline.from_pretrained("kandinsky-community/kandinsky-2-1", torch_dtype=torch.float16)
86
  pipe.to("cuda")
87
 
88
  prompt = "A fantasy landscape, Cinematic lighting"
 
121
  import torch
122
  import numpy as np
123
 
124
+ pipe_prior = KandinskyPriorPipeline.from_pretrained("kandinsky-community/kandinsky-2-1-prior", torch_dtype=torch.float16)
125
  pipe_prior.to("cuda")
126
 
127
  prompt = "a hat"
128
  image_emb, zero_image_emb = pipe_prior(prompt, return_dict=False)
129
 
130
+ pipe = KandinskyInpaintPipeline.from_pretrained("kandinsky-community/kandinsky-2-1-inpaint", torch_dtype=torch.float16)
131
  pipe.to("cuda")
132
 
133
  init_image = load_image(
 
164
  import torch
165
  from torchvision import transforms
166
 
167
+ pipe_prior = KandinskyPriorPipeline.from_pretrained("kandinsky-community/kandinsky-2-1-prior", torch_dtype=torch.float16)
168
  pipe_prior.to("cuda")
169
 
170
  img1 = load_image(
 
179
  weights = [0.3, 0.3, 0.4]
180
  image_emb, zero_image_emb = pipe_prior.interpolate(images_texts, weights)
181
 
182
+ pipe = KandinskyPipeline.from_pretrained("kandinsky-community/kandinsky-2-1", torch_dtype=torch.float16)
183
  pipe.to("cuda")
184
 
185
  image = pipe(