zanemotiwala commited on
Commit
14d6567
1 Parent(s): b984c3e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -13,10 +13,12 @@ tokenizer = AutoTokenizer.from_pretrained(decoder_checkpoint)
13
  caption_model = VisionEncoderDecoderModel.from_pretrained(model_checkpoint).to(device)
14
 
15
  # Load the Stable Diffusion model
16
- #diffusion_model = StableDiffusionPipeline.from_pretrained("CompVis/stable-diffusion-v1-4")
17
- diffusion_model = StableDiffusionPipeline.from_pretrained("jbilcke-hf/sdxl-cinematic-2")
18
  diffusion_model = diffusion_model.to(device)
19
 
 
 
 
20
  def predict(image):
21
  # Generate a caption from the image
22
  image = image.convert('RGB')
 
13
  caption_model = VisionEncoderDecoderModel.from_pretrained(model_checkpoint).to(device)
14
 
15
  # Load the Stable Diffusion model
16
+ diffusion_model = StableDiffusionPipeline.from_pretrained("runwayml/stable-diffusion-v1-5")
 
17
  diffusion_model = diffusion_model.to(device)
18
 
19
+ prompt = "a photo of an astronaut riding a horse on mars"
20
+ image = pipe(prompt).images[0]
21
+
22
  def predict(image):
23
  # Generate a caption from the image
24
  image = image.convert('RGB')