File size: 464 Bytes
9184d6d
 
 
 
 
 
0d44900
 
9184d6d
 
 
 
 
 
16193e3
 
9184d6d
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import time
import keras_cv
from tensorflow import keras
import matplotlib.pyplot as plt
model = keras_cv.models.StableDiffusion(img_width=512, img_height=512)
images = model.text_to_image("photograph of an astronaut riding a horse", batch_size=3)


def plot_images(images):
    plt.figure(figsize=(20, 20))
    for i in range(len(images)):
        ax = plt.subplot(1, len(images), i + 1)
        plt.imshow(images[i])
        plt.axis("off")


plot_images(images)