目录
文生视频,图生视频
图生视频参数:
文生视频,图生视频
GitHub - THUDM/CogVideo: text and image to video generation: CogVideoX (2024) and CogVideo (ICLR 2023)
with torch.no_grad():for text, cnt in tqdm(data_iter):if args.image2video:# use with input image shapetext, image_path = text.split("@@")assert os.path.exists(image_path), image_pathimage = Image.open(image_path).convert("RGB")(img_W, img_H) = image.size
图生视频参数:
def add_sampling_config_args(parser):"""Sampling configurations"""group = parser.add_argument_group("sampling", "Sampling Configurations")group.add_argument("--output-dir", type=str, default="samples")group.add_argument("--input-dir", type=str, default=None)group.add_argument("--input-type", type=str, default="cli")group.add_argument("--input-file", type=str, default="input.txt")group.add_argument("--sampling-image-size", type=list, default=[768, 1360])group.add_argument("--final-size", type=int, default=2048)group.add_argument("--sdedit", action="store_true")group.add_argument("--grid-num-rows", type=int, default=1)group.add_argument("--force-inference", action="store_true")group.add_argument("--lcm_steps", type=int, default=None)group.add_argument("--sampling-num-frames", type=int, default=32)group.add_argument("--sampling-fps", type=int, default=8)group.add_argument("--only-save-latents", type=bool, default=False)group.add_argument("--only-log-video-latents", type=bool, default=False)group.add_argument("--latent-channels", type=int, default=32)group.add_argument("--image2video", action="store_true")return parser