# -*- coding: utf-8 -*- """stable_diffusion_example.ipynb ## Stable diffusion Gabriel Turinici 19/01/2024 """ !pip install keras_cv==0.8.1 tensorflow==2.15.0.post1 keras==2.15.0 import keras_cv import keras import matplotlib.pyplot as plt model = keras_cv.models.StableDiffusion(img_width=512, img_height=512, jit_compile=True) def plot_images(images): plt.figure(figsize=(4*len(images),4)) for i in range(len(images)): ax = plt.subplot(1, len(images), i + 1) plt.imshow(images[i]) plt.axis("off") """## Here the main part Change the prompt below to draw your own images. """ prompt="snowy wheather in Paris" images = model.text_to_image(prompt, batch_size=3,num_steps=50,seed=123) plot_images(images)