diff --git a/.gitignore b/.gitignore index bccce0f..f7438af 100644 --- a/.gitignore +++ b/.gitignore @@ -163,4 +163,4 @@ cython_debug/ # From inference.py outputs/ -video_output_*.mp4 \ No newline at end of file +video_output_*.mp4 diff --git a/experiments.ipynb b/experiments.ipynb new file mode 100644 index 0000000..143db9a --- /dev/null +++ b/experiments.ipynb @@ -0,0 +1,142 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "\"Open" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Install The Requirements" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "!git clone https://github.com/LuthandoMaqondo/LTX-Video.git\n", + "%cd /content/LTX-Video\n", + "!git checkout luthando-contribution" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "%pip install -r requirements.txt\n", + "# # or\n", + "# !pip install -r requirements.txt" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Download the model Checkpoint: from Huggingface Hub" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ + { + "name": "stderr", + "output_type": "stream", + "text": [ + "/home/luthando/miniconda3/envs/ltx-video/lib/python3.13/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n", + " from .autonotebook import tqdm as notebook_tqdm\n", + "/home/luthando/miniconda3/envs/ltx-video/lib/python3.13/site-packages/huggingface_hub/file_download.py:834: UserWarning: `local_dir_use_symlinks` parameter is deprecated and will be ignored. The process to download files to a local folder has been updated and do not rely on symlinks anymore. You only need to pass a destination folder as`local_dir`.\n", + "For more details, check out https://huggingface.co/docs/huggingface_hub/main/en/guides/download#download-files-to-local-folder.\n", + " warnings.warn(\n", + "Fetching 26 files: 100%|██████████| 26/26 [26:52<00:00, 62.03s/it] \n" + ] + }, + { + "data": { + "text/plain": [ + "'/home/luthando/Desktop/LTX-Video/model_ckpt'" + ] + }, + "execution_count": 1, + "metadata": {}, + "output_type": "execute_result" + } + ], + "source": [ + "from huggingface_hub import snapshot_download\n", + "\n", + "model_path = 'model_ckpt' # The local directory to save downloaded checkpoint\n", + "snapshot_download(\"Lightricks/LTX-Video\", local_dir=model_path, local_dir_use_symlinks=False, repo_type='model')" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Running Inference" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "Running generation with arguments: Namespace(ckpt_dir='model_ckpt', input_video_path=None, input_image_path=None, output_path=None, seed=0, num_inference_steps=2, num_images_per_prompt=1, guidance_scale=3, height=720, width=1280, num_frames=2, frame_rate=25, bfloat16=False, prompt='Hello', negative_prompt='worst quality, inconsistent motion, blurry, jittery, distorted')\n", + "Padded dimensions: 736x1280x9\n", + "Downloading shards: 100%|██████████████████████| 2/2 [00:00<00:00, 25343.23it/s]\n", + "Loading checkpoint shards: 100%|██████████████████| 2/2 [00:00<00:00, 16.82it/s]\n", + " 0%| | 0/2 [00:00