AI Generation
Generate videos, images, audio, and music from text prompts.
Local Model Support
| Class | Local Model Family |
|---|---|
| TextToVideo | CogVideoX1.5-5B |
| ImageToVideo | CogVideoX1.5-5B-I2V |
| TextToSpeech | Bark / XTTS pipeline |
| TextToMusic | MusicGen |
| TextToImage | SDXL |
TextToVideo
TextToVideo
Generates videos from text descriptions using local diffusion models.
Source code in src/videopython/ai/generation/video.py
generate_video
generate_video(
prompt: str,
num_steps: int = 50,
num_frames: int = 81,
guidance_scale: float = 6.0,
) -> Video
Generate video from text prompt.
Source code in src/videopython/ai/generation/video.py
ImageToVideo
ImageToVideo
Generates videos from static images using local video diffusion.
Source code in src/videopython/ai/generation/video.py
generate_video
generate_video(
image: Image,
prompt: str = "",
num_steps: int = 50,
num_frames: int = 81,
guidance_scale: float = 6.0,
) -> Video
Generate video animation from a static image.
Source code in src/videopython/ai/generation/video.py
TextToImage
TextToImage
Generates images from text descriptions using local models.
Source code in src/videopython/ai/generation/image.py
generate_image
TextToSpeech
TextToSpeech
Generates speech audio from text using local models.
Supports Bark (base, small) and XTTS voice cloning (xtts).
Source code in src/videopython/ai/generation/audio.py
11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 | |
generate_audio
generate_audio(
text: str,
voice_preset: str | None = None,
voice_sample: Audio | None = None,
) -> Audio
Generate speech audio from text.
Source code in src/videopython/ai/generation/audio.py
TextToMusic
TextToMusic
Generates music from text descriptions using MusicGen.
Source code in src/videopython/ai/generation/audio.py
generate_audio
Generate music audio from text description.