diff --git a/README.md b/README.md index 441f01c..1307d1f 100644 --- a/README.md +++ b/README.md @@ -151,8 +151,15 @@ of the **CogVideoX** open-source model. distribution using a LLM. By default, the script uses GLM4, but it can also be replaced with any other LLM such as GPT, Gemini, etc. + [gradio_web_demo](inference/gradio_web_demo.py): A simple gradio web UI demonstrating how to use the CogVideoX-2B - model to generate - videos. + model to generate videos. Same as Our Huggingface Space, you can use this script to launch a web demo. +```shell +cd inference +# For Linux and Windows users (and macOS with Intel??) +python gradio_web_demo.py # humans mode + +# For macOS with Apple Silicon users, Intel not supported, this maybe 20x slower than RTX 4090 +PYTORCH_ENABLE_MPS_FALLBACK=1 python gradio_web_demo.py # humans mode +```
diff --git a/README_ja.md b/README_ja.md index de7dabf..398de54 100644 --- a/README_ja.md +++ b/README_ja.md @@ -130,8 +130,17 @@ CogVideoXは、[清影](https://chatglm.cn/video?fr=osm_cogvideox) と同源の + [diffusers_vae_demo](inference/cli_vae_demo.py): VAE推論コードの実行には現在71GBのメモリが必要ですが、将来的には最適化される予定です。 + [convert_demo](inference/convert_demo.py): ユーザー入力をCogVideoXに適した形式に変換する方法。CogVideoXは長いキャプションでトレーニングされているため、入力テキストをLLMを使用してトレーニング分布と一致させる必要があります。デフォルトではGLM4を使用しますが、GPT、Geminiなどの他のLLMに置き換えることもできます。 -+ [gradio_web_demo](inference/gradio_web_demo.py): CogVideoX-2Bモデルを使用してビデオを生成する方法を示すシンプルなgradio - Web UI。 ++ [gradio_web_demo](inference/gradio_web_demo.py): CogVideoX-2B モデルを使用して動画を生成する方法を示す、シンプルな + Gradio Web UI デモです。私たちの Huggingface Space と同様に、このスクリプトを使用して Web デモを起動することができます。 + +```shell +cd inference +# For Linux and Windows users (and macOS with Intel??) +python gradio_web_demo.py # humans mode + +# For macOS with Apple Silicon users, Intel not supported, this maybe 20x slower than RTX 4090 +PYTORCH_ENABLE_MPS_FALLBACK=1 python gradio_web_demo.py # humans mode +```
diff --git a/README_zh.md b/README_zh.md index 33025d1..8a9d6d0 100644 --- a/README_zh.md +++ b/README_zh.md @@ -128,7 +128,15 @@ CogVideoX是 [清影](https://chatglm.cn/video?fr=osm_cogvideox) 同源的开源 + [convert_demo](inference/convert_demo.py): 如何将用户的输入转换成适合 CogVideoX的长输入。因为CogVideoX是在长文本上训练的,所以我们需要把输入文本的分布通过LLM转换为和训练一致的长文本。脚本中默认使用GLM4,也可以替换为GPT、Gemini等任意大语言模型。 + [gradio_web_demo](inference/gradio_web_demo.py): 一个简单的gradio网页应用,展示如何使用 CogVideoX-2B 模型生成视频。 +与我们的 Huggingface Space 类似,你可以使用此脚本运行一个简单的网页应用,用于生成视频。 +```shell +cd inference +# For Linux and Windows users (and macOS with Intel??) +python gradio_web_demo.py # humans mode +# For macOS with Apple Silicon users, Intel not supported, this maybe 20x slower than RTX 4090 +PYTORCH_ENABLE_MPS_FALLBACK=1 python gradio_web_demo.py # humans mode +```
diff --git a/requirements.txt b/requirements.txt index 55b376e..4512ea8 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,13 +1,14 @@ -diffusers>=0.3.0 +diffusers>=0.30.0 +transformers>=4.43.4 +accelerate>=0.33.0 +sentencepiece==0.2.0 # T5 SwissArmyTransformer==0.4.11 # Inference -torch==2.4.0 +torch==2.4.0 # Tested in 2.2 2.3 2.4 and 2.5 torchvision==0.19.0 gradio==4.40.0 # For HF gradio demo -streamlit==1.37.0 # For web demo -opencv-python==4.10 -imageio-ffmpeg==0.5.1 -openai==1.38.0 -transformers==4.43.4 -accelerate==0.33.0 -sentencepiece==0.2.0 -pillow==9.5.0 \ No newline at end of file +pillow==9.5.0 # For HF gradio demo +streamlit==1.37.0 # For streamlit web demo +opencv-python==4.10 # For diffusers inference origin export video +imageio==2.34.2 # For diffusers inference export video +imageio-ffmpeg==0.5.1 # For diffusers inference export video +openai==1.38.0 # For prompt refiner \ No newline at end of file