Skip to content

JimikoSK/cogvideox-controlnet

 
 

Repository files navigation

CogvideoX Controlnet Extention

stacked_ship.mp4
stacked_car.mp4

This repo contains the code for simple Controlnet module for CogvideoX model.
Supported models for 2B:

How to

Clone repo

git clone https://github.com/TheDenk/cogvideox-controlnet.git
cd cogvideox-controlnet

Create venv

python -m venv venv
source venv/bin/activate

Install requirements

pip install -r requirements.txt

Simple examples

Inference with cli

python -m inference.cli_demo \
    --video_path "resources/car.mp4" \
    --prompt "car is moving among mountains" \
    --controlnet_type "canny" \
    --base_model_path THUDM/CogVideoX-2b \
    --controlnet_model_path TheDenk/cogvideox-2b-controlnet-canny-v1

Inference with Gradio

python -m inference.gradio_web_demo \
    --controlnet_type "canny" \
    --base_model_path THUDM/CogVideoX-2b \
    --controlnet_model_path TheDenk/cogvideox-2b-controlnet-canny-v1

Detailed inference

python -m inference.cli_demo \
    --video_path "resources/car.mp4" \
    --prompt "car is moving on waves in the ocean" \
    --controlnet_type "canny" \
    --base_model_path THUDM/CogVideoX-2b \
    --controlnet_model_path TheDenk/cogvideox-2b-controlnet-canny-v1 \
    --num_inference_steps 50 \
    --guidance_scale 6.0 \
    --controlnet_weights 0.5 \
    --controlnet_guidance_start 0.0 \
    --controlnet_guidance_end 0.5 \
    --output_path "./output.mp4" \
    --seed 42

Acknowledgements

Original code and models CogVideoX.

Contacts

Issues should be raised directly in the repository. For professional support and recommendations please [email protected].

About

Simple Controlnet module for CogvideoX model.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 97.0%
  • Python 3.0%