Instructions to use NimVideo/cogvideox-2b-img2vid with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use NimVideo/cogvideox-2b-img2vid with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image, export_to_video # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("NimVideo/cogvideox-2b-img2vid", dtype=torch.bfloat16, device_map="cuda") pipe.to("cuda") prompt = "A man with short gray hair plays a red electric guitar." image = load_image( "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/guitar-man.png" ) output = pipe(image=image, prompt=prompt).frames[0] export_to_video(output, "output.mp4") - Notebooks
- Google Colab
- Kaggle
| { | |
| "_class_name": "CogVideoXDDIMScheduler", | |
| "_diffusers_version": "0.31.0.dev0", | |
| "beta_end": 0.012, | |
| "beta_schedule": "scaled_linear", | |
| "beta_start": 0.00085, | |
| "clip_sample": false, | |
| "clip_sample_range": 1.0, | |
| "num_train_timesteps": 1000, | |
| "prediction_type": "v_prediction", | |
| "rescale_betas_zero_snr": true, | |
| "sample_max_value": 1.0, | |
| "set_alpha_to_one": true, | |
| "snr_shift_scale": 3.0, | |
| "steps_offset": 0, | |
| "timestep_spacing": "linspace", | |
| "trained_betas": null | |
| } | |