ideo_path = hf_hub_download(repo_type="space", repo_id=repo_id, filename=filename)
Read video from path


	Copied
from PIL import Image
import imageio

reader = imageio.get_reader(video_path, "ffmpeg")
frame_count = 8
video = [Image.fromarray(reader.get_data(i)) for i in range(frame_count)]
Run StableDiffusionInstructPix2PixPipeline with our custom attention processor


	Copied
import torch
from diffusers import StableDiffusionInstructPix2PixPi