Skip to content
Pruna AI logo

P-Video-Replace

Image-to-VideoPruna AI

Pruna's P-Video-Replace takes a source video and one or more identity reference images, then places the referenced person or people into the video while preserving the source motion and audio.

Model Info
More informationlink
PricingView pricing in the Cloudflare dashboard

Usage

TypeScript
const response = await env.AI.run(
'pruna/p-video-replace',
{
video: 'https://test-videos.co.uk/vids/bigbuckbunny/mp4/h264/360/Big_Buck_Bunny_360_10s_1MB.mp4',
images: ['https://huggingface.co/spaces/yisol/IDM-VTON/resolve/main/example/human/00121_00.jpg'],
resolution: '720p',
target_fps: 'original',
},
)
console.log(response)

Parameters

video
stringrequiredSource RGB video (.mp4) used as the motion and audio source. HTTP(S) URL or data URI.
turbo
booleanrequireddefault: falseTurbo mode: faster generation for slightly lower quality.
resolution
stringrequireddefault: 720penum: 720p, 1080pTarget resolution.
save_audio
booleanrequireddefault: trueSave the video with audio.
ignore_audio
booleanrequireddefault: falseIgnore source audio during generation.
target_fps
stringrequireddefault: originalenum: 24, 48, originalTarget FPS for the working video.
instruction_prompt
stringrequireddefault: Further instruction on how to place people from the reference images into the scene.
seed
integerminimum: -9007199254740991maximum: 9007199254740991Random seed for reproducible generation.
disable_safety_checker
booleanrequireddefault: falseDisable safety checker for generated videos.

API Schemas (Raw)

Input
Output