started by creating a StableDiffusionImg2ImgPipeline with a pretrained Stable Diffusion model like nitrosocke/Ghibli-Diffusion.


	Copied
import torch
import requests
from PIL import Image
from io import BytesIO
from diffusers import StableDiffusionImg2ImgPipeline

device = "cuda"
pipe = StableDiffusionImg2ImgPipeline.from_pretrained("nitrosocke/Ghibli-Diffusion", torch_dtype=torch.float16).to(
    device
)
Download and preprocess an initial im