Views
No views yet
1from diffusers import DiffusionPipeline
2
3# load the pretrained model
4pipeline = DiffusionPipeline.from_pretrained(
5 "jadechoghari/VidToMe",
6 trust_remote_code=True,
7 custom_pipeline="jadechoghari/VidToMe",
8 sd_version="depth",
9 device="cuda",
10 float_precision="fp16"
11)
12
13# set prompts for inversion and generation
14inversion_prompt = "flamingos standing in the water near a tree."
15generation_prompt = {"origami": "rainbow-colored origami flamingos standing in the water near a tree."}
16
17# additional control and parameters
18control_type = "none" # No extra control, use "depth" if needed
19negative_prompt = ""
20
21# Run the video-to-image editing pipeline
22generated_images = pipeline(
23 video_path="path/to/video.mp4", # add path to the input video
24 video_prompt=inversion_prompt, # inversion prompt
25 edit_prompt=generation_prompt, # edit prompt for generation
26 control_type=control_type # control type (e.g., "none", "depth")
27)
28