LoRA 视频过曝模糊
作者: RuipingL创建于 2025年10月27日更新于 2025年11月6日
def generate_video( prompt: str, model_path: str, lora_path: str = None, lora_rank: int = 128, num_frames: int = 81, width: Optional[int] = None, height: Optional[int] = None, output_path: str = "./output.mp4", image_or_video_path: str = "", num_inference_steps: int = 50, guidance_scale: float = 6.0, num_videos_per_prompt: int = 1, dtype: torch.dtype = torch.bfloat16, generate_type: str = Literal["t2v", "i2v", "v2v"], # i2v: image to video, v2v: video to video seed: int = 42, fps: int = 16, ): """ Generates a video based on the given prompt and saves it to the specified path.
内容来源: zai-org/CogVideo