commit 9cc4121bd8a0aefbc88f382101e224613348b3fb Author: om_karande Date: Tue Oct 6 12:10:34 2026 +0530 feat: add Wan 2.2 Image-to-Video ComfyUI Kaggle setup and workflows diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..334a046 --- /dev/null +++ b/.gitignore @@ -0,0 +1,37 @@ +# Jupyter Checkpoints +.ipynb_checkpoints/ +*/.ipynb_checkpoints/* + +# Model Weights & Binaries (Large Files >50MB) +*.safetensors +*.gguf +*.pt +*.pth +*.bin +*.ckpt +*.onnx +models/ + +# Rendered Outputs & Media +output/ +outputs/ +temp/ +*.mp4 +*.gif +*.webp + +# Environments & Python cache +venv/ +.venv/ +env/ +__pycache__/ +*.py[cod] + +# Secrets & Environment variables +.env +*.token +hf_token.txt + +# Cloudflare & temporary logs +cloudflared +*.log \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..0a0c71c --- /dev/null +++ b/README.md @@ -0,0 +1,66 @@ +# ComfyUI on Kaggle — Wan 2.2 Image-to-Video Setup + +A reproducible, automated pipeline to launch **ComfyUI** on free Kaggle GPU instances (T4 / P100 / T4x2) with the **Wan 2.2 Image-to-Video (I2V)** models and a public Cloudflare tunnel. + +## 📌 Project Overview + +This repository contains ready-to-run Jupyter Notebooks optimized for running ComfyUI on Kaggle's cloud environment: +- Automated ComfyUI and custom nodes installation +- Efficient model downloading via Hugging Face Hub (`huggingface_hub`) +- Rapid GGUF-quantized Wan 2.2 model setup for low-VRAM execution +- Secure, zero-port-forwarding public access via Cloudflare Tunnel (`cloudflared`) + +--- + +## 📂 Repository Structure + +```text +ComfyUI_Kaggle/ +├── notebooks/ +│ ├── wan-2-2-image-to-video-comfyui-setup-kaggle.ipynb # Main setup notebook (ComfyUI + Models + Tunnel) +│ ├── comfyui_wan22_i2v_sfw_debug.ipynb # Debug & dependency verification notebook +│ └── wan2_2_kaggle_test.ipynb # Direct script/testing notebook +├── .gitignore # Excludes model weights and generated videos +└── README.md # Documentation and setup guide +``` + +--- + +## 🚀 How to Run on Kaggle + +### Step 1: Create or Import Notebook +1. Go to [Kaggle](https://www.kaggle.com/) and click **Create** -> **New Notebook**. +2. Click **File** -> **Import Notebook** and upload `notebooks/wan-2-2-image-to-video-comfyui-setup-kaggle.ipynb`. + +### Step 2: Configure Kaggle Settings +In the notebook sidebar (**Notebook options** on the right): +- **Accelerator**: Select **GPU T4 x 2** or **GPU P100**. +- **Internet**: Toggle to **On** (required to install packages and download models). + +### Step 3: Run the Cells +Run the notebook cells in order: +1. **Install ComfyUI & Dependencies**: Clones ComfyUI, installs PyTorch and required packages. +2. **Download Models**: Fetches Wan 2.2 I2V GGUF weights, Clip Vision, VAE, and Text Encoders from Hugging Face into `/kaggle/tmp/ComfyUI/models/`. +3. **Download Cloudflare Tunnel**: Downloads the `cloudflared` Linux binary. +4. **Start ComfyUI**: Launches the server in the background on port `8188`. +5. **Start Tunnel & Open UI**: Launches `cloudflared tunnel` and prints your public URL (e.g., `https://xxxx.trycloudflare.com`). + +Click the printed URL to open the full ComfyUI web interface in your browser. + +--- + +## 📦 Models Used + +| Component | Repository | Filename / Path | +| :--- | :--- | :--- | +| **I2V UNet (GGUF)** | `befox/WAN2.2-14B-Rapid-AllInOne-GGUF` | `v10/wan2.2-i2v-rapid-aio-v10-nsfw-Q4_K.gguf` | +| **Clip Vision** | `Comfy-Org/Wan_2.1_ComfyUI_repackaged` | `split_files/clip_vision/clip_vision_h.safetensors` | +| **VAE** | `Comfy-Org/Wan_2.2_ComfyUI_Repackaged` | `split_files/vae/wan_2.1_vae.safetensors` | +| **Text Encoder** | `Comfy-Org/Wan_2.1_ComfyUI_repackaged` | `split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors` | + +--- + +## 🔒 Security & Best Practices + +- Model weights (`.gguf`, `.safetensors`) and generated output videos (`.mp4`) are gitignored to keep the repository lightweight. +- Sensitive access tokens should never be committed into the notebook cells. Use Kaggle Secrets (`from kaggle_secrets import UserSecretsClient`) if private Hugging Face tokens are required. \ No newline at end of file diff --git a/notebooks/comfyui_wan22_i2v_sfw_debug.ipynb b/notebooks/comfyui_wan22_i2v_sfw_debug.ipynb new file mode 100644 index 0000000..56d6a59 --- /dev/null +++ b/notebooks/comfyui_wan22_i2v_sfw_debug.ipynb @@ -0,0 +1,292 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Install ComfyUI and dependencies" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# Install ComfyUI and dependencies\n", + "!pip install -q torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118\n", + "!pip install -q huggingface_hub\n", + "!mkdir -p /kaggle/tmp\n", + "!git clone https://github.com/comfyanonymous/ComfyUI.git /kaggle/tmp/ComfyUI\n", + "%cd /kaggle/tmp/ComfyUI\n", + "!pip install -q -r requirements.txt\n", + "\n", + "# Install ComfyUI-Manager\n", + "!git clone https://github.com/ltdrdata/ComfyUI-Manager.git custom_nodes/ComfyUI-Manager\n", + "\n", + "# Install ComfyUI-KJNodes (helper nodes used in the official LTX-2.3 GGUF workflow)\n", + "!git clone https://github.com/kijai/ComfyUI-KJNodes.git custom_nodes/ComfyUI-KJNodes\n", + "!pip install -q -r custom_nodes/ComfyUI-KJNodes/requirements.txt\n", + "\n", + "# Install the missing GGUF loader custom node\n", + "!git clone https://github.com/city96/ComfyUI-GGUF.git custom_nodes/ComfyUI-GGUF\n", + "%cd /kaggle/tmp/ComfyUI/custom_nodes/ComfyUI-GGUF\n", + "\n", + "# 1. Install required python libraries for GGUF parsing\n", + "!pip install -q -r requirements.txt\n", + "!pip install -q gguf sentencepiece\n", + "\n", + "print(\"\\nGGUF library dependencies successfully patched!\")\n", + "!git clone https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite.git custom_nodes/ComfyUI-VideoHelperSuite\n", + "# 1. Move into the video helper suite directory\n", + "%cd /kaggle/tmp/ComfyUI/custom_nodes/ComfyUI-VideoHelperSuite\n", + "\n", + "# 2. Force install the required system and video manipulation libraries\n", + "!pip install -q -r requirements.txt\n", + "!pip install -q decord av simplejson imageio-ffmpeg\n", + "\n", + "# Install cloudflared to expose the URL publicly\n", + "!wget -q https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 -O cloudflared\n", + "!chmod +x cloudflared\n", + "\n", + "%cd /kaggle/tmp/ComfyUI\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Error observed:** `[Errno 2] No such file or directory: '/kaggle/tmp/ComfyUI/custom_nodes/ComfyUI-VideoHelperSuite'` \u2014 the `%cd` into that directory failed right after cloning it (likely a timing/path issue), so the following `pip install -r requirements.txt` and extra installs may have run in the wrong directory." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Download models" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "%cd /kaggle/tmp/ComfyUI\n", + "\n", + "# 3. Create the required directory for clip_vision models\n", + "!mkdir -p models/clip_vision\n", + "# Create standard target directories\n", + "!mkdir -p models/unet\n", + "!mkdir -p models/text_encoders\n", + "!mkdir -p models/vae\n", + "!mkdir -p models/clip_vision\n", + "\n", + "# Use huggingface_hub to fetch your chosen model paths\n", + "from huggingface_hub import hf_hub_download\n", + "\n", + "print(\"Downloading clip_vision_h.safetensors from the correct repository...\")\n", + "hf_hub_download(\n", + " repo_id=\"Comfy-Org/Wan_2.1_ComfyUI_repackaged\",\n", + " filename=\"split_files/clip_vision/clip_vision_h.safetensors\",\n", + " local_dir=\"models/clip_vision\",\n", + " local_dir_use_symlinks=False\n", + ")\n", + "\n", + "print(\"Downloading the Image-to-Video (I2V) GGUF file...\")\n", + "hf_hub_download(\n", + " repo_id=\"befox/WAN2.2-14B-Rapid-AllInOne-GGUF\",\n", + " filename=\"v10/wan2.2-i2v-rapid-aio-v10-Q4_K.gguf\",\n", + " local_dir=\"models/unet\",\n", + " local_dir_use_symlinks=False\n", + ")\n", + "\n", + "print(\"Downloading Wan 2.1 VAE...\")\n", + "hf_hub_download(\n", + " repo_id=\"Comfy-Org/Wan_2.2_ComfyUI_Repackaged\",\n", + " filename=\"split_files/vae/wan_2.1_vae.safetensors\",\n", + " local_dir=\"models/vae\",\n", + " local_dir_use_symlinks=False\n", + ")\n", + "\n", + "print(\"Downloading Text Encoder...\")\n", + "hf_hub_download(\n", + " repo_id=\"Comfy-Org/Wan_2.1_ComfyUI_repackaged\",\n", + " filename=\"split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors\",\n", + " local_dir=\"models/text_encoders\",\n", + " local_dir_use_symlinks=False\n", + ")\n", + "\n", + "print(\"All set! Files successfully downloaded to /kaggle/tmp/ComfyUI/models/.\")\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "*(Output confirmed all four files downloaded successfully, with a deprecation warning about `local_dir_use_symlinks` \u2014 harmless, just remove that argument since it's ignored in current `huggingface_hub`.)*" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "!find /kaggle/tmp/ComfyUI/models/unet \\\n", + " /kaggle/tmp/ComfyUI/models/text_encoders \\\n", + " /kaggle/tmp/ComfyUI/models/vae \\\n", + " /kaggle/tmp/ComfyUI/models/clip_vision \\\n", + " -type f -printf '%p\\t%k KB\\n'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Output:** confirms the four model files are present with expected sizes (unet ~10.6M KB, text_encoder ~6.6M KB, vae ~248K KB, clip_vision ~1.2M KB), plus leftover placeholder/cache files." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "!ps -fp 247\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Output:** empty \u2014 PID 247 doesn't exist (stale reference, harmless)." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "!curl -I http://127.0.0.1:8182\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Output:** `curl: (7) Failed to connect to 127.0.0.1 port 8182 after 0 ms: Connection refused` \u2014 ComfyUI server not yet running at this point." + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Create tunnel and get URL" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "!ps aux | grep '[m]ain.py'\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Output:** `root 238 33.6 0.3 133508 113412 ? S 06:12 0:02 python3 main.py --listen 0.0.0.0 --port 8182 --enable-manager` \u2014 confirms ComfyUI's `main.py` IS running on port 8182." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "!curl -I http://127.0.0.1:8182\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Output:** still `Connection refused` \u2014 this is the core problem. The process is running (per `ps aux`) but not accepting connections on 8182 yet (could be still initializing/loading models, or bound to a different interface)." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "!ss -ltnp | grep 8182\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Output:** empty \u2014 no output was captured/shown for this cell, so it's unclear if anything is actually listening on 8182." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import subprocess\n", + "\n", + "tunnel = subprocess.Popen(\n", + " [\"/kaggle/tmp/cloudflared\", \"tunnel\", \"--url\", \"http://localhost:8182\"],\n", + " stdout=subprocess.PIPE,\n", + " stderr=subprocess.STDOUT\n", + ")\n", + "\n", + "print(\"Waiting for URL... (may take 15-20 seconds)\")\n", + "for line in iter(tunnel.stdout.readline, b\"\"):\n", + " line = line.decode().strip()\n", + " print(line)\n", + " if \"https://\" in line and \"trycloudflare.com\" in line:\n", + " for word in line.split():\n", + " if word.startswith(\"https://\") and \"trycloudflare.com\" in word:\n", + " print(\"\\n\\u2705 Your ComfyUI URL:\", word)\n", + " break\n", + " break\n" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "**Core issue to investigate:** `main.py` shows as running in `ps aux`, but `curl` to `127.0.0.1:8182` keeps refusing the connection \u2014 so the tunnel step never gets a live server to connect to. Check whether ComfyUI is still loading the (large) GGUF model, whether it crashed silently after the `ps` snapshot, or whether it's listening on a different port/interface than expected." + ] + } + ], + "metadata": { + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "name": "python", + "version": "3.12.13", + "mimetype": "text/x-python", + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "pygments_lexer": "ipython3", + "nbconvert_exporter": "python", + "file_extension": ".py" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +} \ No newline at end of file diff --git a/notebooks/wan-2-2-image-to-video-comfyui-setup-kaggle.ipynb b/notebooks/wan-2-2-image-to-video-comfyui-setup-kaggle.ipynb new file mode 100644 index 0000000..0f52bca --- /dev/null +++ b/notebooks/wan-2-2-image-to-video-comfyui-setup-kaggle.ipynb @@ -0,0 +1 @@ +{"metadata":{"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"language_info":{"name":"python","version":"3.12.13","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"},"kaggle":{"accelerator":"nvidiaTeslaT4","dataSources":[],"isInternetEnabled":true,"language":"python","sourceType":"notebook","isGpuEnabled":false}},"nbformat_minor":5,"nbformat":4,"cells":[{"id":"45c14ef4-fb4d-4ab6-b36c-affc233810ad","cell_type":"markdown","source":"# Install ComfyUI and dependencies","metadata":{}},{"id":"2d925b20-b2f3-4677-a1dd-c99e9a03a35d","cell_type":"code","source":"\n# Install ComfyUI and dependencies\n!pip install -q torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118\n!pip install -q huggingface_hub\n!mkdir -p /kaggle/tmp\n!git clone https://github.com/comfyanonymous/ComfyUI.git /kaggle/tmp/ComfyUI\n%cd /kaggle/tmp/ComfyUI\n!pip install -q -r requirements.txt\n\n# Install ComfyUI-Manager\n!git clone https://github.com/ltdrdata/ComfyUI-Manager.git custom_nodes/ComfyUI-Manager\n\n \n# Install ComfyUI-KJNodes (helper nodes used in the official LTX-2.3 GGUF workflow)\n!git clone https://github.com/kijai/ComfyUI-KJNodes.git custom_nodes/ComfyUI-KJNodes\n!pip install -q -r custom_nodes/ComfyUI-KJNodes/requirements.txt\n\n# Install the missing GGUF loader custom node\n!git clone https://github.com/city96/ComfyUI-GGUF.git custom_nodes/ComfyUI-GGUF\n%cd /kaggle/tmp/ComfyUI/custom_nodes/ComfyUI-GGUF\n\n# 1. Install required python libraries for GGUF parsing\n!pip install -q -r requirements.txt\n!pip install -q gguf sentencepiece\n\nprint(\"\\nGGUF library dependencies successfully patched!\")\n!git clone https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite.git custom_nodes/ComfyUI-VideoHelperSuite\n# 1. Move into the video helper suite directory\n%cd /kaggle/tmp/ComfyUI/custom_nodes/ComfyUI-VideoHelperSuite\n\n# 2. Force install the required system and video manipulation libraries\n!pip install -q -r requirements.txt\n!pip install -q decord av simplejson imageio-ffmpeg\n\n# Install cloudflared to expose the URL publicly\n!wget -q https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 -O cloudflared\n!chmod +x cloudflared\n\n\n%cd /kaggle/tmp/ComfyUI","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-07-05T07:51:10.433659Z","iopub.execute_input":"2026-07-05T07:51:10.433927Z","iopub.status.idle":"2026-07-05T07:52:20.038245Z","shell.execute_reply.started":"2026-07-05T07:51:10.433904Z","shell.execute_reply":"2026-07-05T07:52:20.037489Z"}},"outputs":[{"name":"stdout","text":"Cloning into '/kaggle/tmp/ComfyUI'...\nremote: Enumerating objects: 42712, done.\u001b[K\nremote: Counting objects: 100% (140/140), done.\u001b[K\nremote: Compressing objects: 100% (34/34), done.\u001b[K\nremote: Total 42712 (delta 126), reused 106 (delta 106), pack-reused 42572 (from 2)\u001b[K\nReceiving objects: 100% (42712/42712), 83.68 MiB | 23.99 MiB/s, done.\nResolving deltas: 100% (28959/28959), done.\n/kaggle/tmp/ComfyUI\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m26.6/26.6 MB\u001b[0m \u001b[31m67.6 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m:00:01\u001b[0m00:01\u001b[0m\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m15.4/15.4 MB\u001b[0m \u001b[31m93.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m:00:01\u001b[0m0:01\u001b[0m\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m7.0/7.0 MB\u001b[0m \u001b[31m107.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m346.8/346.8 kB\u001b[0m \u001b[31m25.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m63.8/63.8 kB\u001b[0m \u001b[31m5.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m2.7/2.7 MB\u001b[0m \u001b[31m74.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m:00:01\u001b[0m\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m100.1/100.1 MB\u001b[0m \u001b[31m19.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m89.4/89.4 MB\u001b[0m \u001b[31m21.5 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m:00:01\u001b[0m00:01\u001b[0m\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m89.1/89.1 MB\u001b[0m \u001b[31m21.2 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m:00:01\u001b[0m00:01\u001b[0m\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m104.3/104.3 MB\u001b[0m \u001b[31m18.3 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m00:01\u001b[0m\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m61.2/61.2 kB\u001b[0m \u001b[31m3.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m35.5/35.5 MB\u001b[0m \u001b[31m56.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m:00:01\u001b[0m00:01\u001b[0m\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m320.8/320.8 kB\u001b[0m \u001b[31m20.1 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m4.6/4.6 MB\u001b[0m \u001b[31m98.0 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m:00:01\u001b[0m\n\u001b[?25hCloning into 'custom_nodes/ComfyUI-Manager'...\nremote: Enumerating objects: 31274, done.\u001b[K\nremote: Counting objects: 100% (195/195), done.\u001b[K\nremote: Compressing objects: 100% (94/94), done.\u001b[K\nremote: Total 31274 (delta 143), reused 118 (delta 101), pack-reused 31079 (from 3)\u001b[K\nReceiving objects: 100% (31274/31274), 173.31 MiB | 36.58 MiB/s, done.\nResolving deltas: 100% (23180/23180), done.\nCloning into 'custom_nodes/ComfyUI-KJNodes'...\nremote: Enumerating objects: 5720, done.\u001b[K\nremote: Counting objects: 100% (2810/2810), done.\u001b[K\nremote: Compressing objects: 100% (526/526), done.\u001b[K\nremote: Total 5720 (delta 2468), reused 2284 (delta 2284), pack-reused 2910 (from 2)\u001b[K\nReceiving objects: 100% (5720/5720), 25.86 MiB | 33.10 MiB/s, done.\nResolving deltas: 100% (3900/3900), done.\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m1.8/1.8 MB\u001b[0m \u001b[31m45.8 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m00:01\u001b[0m\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m67.1/67.1 kB\u001b[0m \u001b[31m4.4 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n\u001b[?25hCloning into 'custom_nodes/ComfyUI-GGUF'...\nremote: Enumerating objects: 814, done.\u001b[K\nremote: Counting objects: 100% (508/508), done.\u001b[K\nremote: Compressing objects: 100% (198/198), done.\u001b[K\nremote: Total 814 (delta 458), reused 310 (delta 310), pack-reused 306 (from 2)\u001b[K\nReceiving objects: 100% (814/814), 190.09 KiB | 6.79 MiB/s, done.\nResolving deltas: 100% (543/543), done.\n/kaggle/tmp/ComfyUI/custom_nodes/ComfyUI-GGUF\n\u001b[2K \u001b[90m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\u001b[0m \u001b[32m118.5/118.5 kB\u001b[0m \u001b[31m4.7 MB/s\u001b[0m eta \u001b[36m0:00:00\u001b[0m\n\u001b[?25h\nGGUF library dependencies successfully patched!\nCloning into 'custom_nodes/ComfyUI-VideoHelperSuite'...\nremote: Enumerating objects: 3368, done.\u001b[K\nremote: Counting objects: 100% (12/12), done.\u001b[K\nremote: Compressing objects: 100% (9/9), done.\u001b[K\nremote: Total 3368 (delta 5), reused 3 (delta 3), pack-reused 3356 (from 2)\u001b[K\nReceiving objects: 100% (3368/3368), 814.63 KiB | 15.37 MiB/s, done.\nResolving deltas: 100% (1977/1977), done.\n","output_type":"stream"}],"execution_count":1},{"id":"14f2fb72-8534-4b6e-b8c4-18ff4a52c813","cell_type":"markdown","source":"# Download models","metadata":{}},{"id":"6647d521-419a-4729-a2bb-8b9aa4caf3ce","cell_type":"code","source":"%cd /kaggle/tmp/ComfyUI\n\n# 3. Create the required directory for clip_vision models\n!mkdir -p models/clip_vision\n# Create standard target directories\n!mkdir -p models/unet\n!mkdir -p models/text_encoders\n!mkdir -p models/vae\n!mkdir -p models/clip_vision\n\n\n# Use huggingface_hub to fetch your chosen befox GGUF model paths\nfrom huggingface_hub import hf_hub_download\n\n\nprint(\"Downloading clip_vision_h.safetensors from the correct repository...\")\nhf_hub_download(\n repo_id=\"Comfy-Org/Wan_2.1_ComfyUI_repackaged\", # Switched repo path\n filename=\"split_files/clip_vision/clip_vision_h.safetensors\",\n local_dir=\"models/clip_vision\",\n local_dir_use_symlinks=False\n)\n\nprint(\"Downloading the correct Image-to-Video (I2V) GGUF file...\")\nhf_hub_download(\n repo_id=\"befox/WAN2.2-14B-Rapid-AllInOne-GGUF\",\n filename=\"v10/wan2.2-i2v-rapid-aio-v10-nsfw-Q4_K.gguf\", # Notice the i2v swap here\n local_dir=\"models/unet\",\n local_dir_use_symlinks=False\n)\n\nprint(\"Downloading Wan 2.1 VAE...\")\nhf_hub_download(\n repo_id=\"Comfy-Org/Wan_2.2_ComfyUI_Repackaged\",\n filename=\"split_files/vae/wan_2.1_vae.safetensors\",\n local_dir=\"models/vae\",\n local_dir_use_symlinks=False\n)\n\nprint(\"Downloading Text Encoder...\")\nhf_hub_download(\n repo_id=\"Comfy-Org/Wan_2.1_ComfyUI_repackaged\",\n filename=\"split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors\",\n local_dir=\"models/text_encoders\",\n local_dir_use_symlinks=False\n)\n\nprint(\"All set! Files successfully downloaded to /kaggle/tmp/ComfyUI/models/.\")","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-07-05T07:52:20.039993Z","iopub.execute_input":"2026-07-05T07:52:20.040216Z","iopub.status.idle":"2026-07-05T07:53:54.109688Z","shell.execute_reply.started":"2026-07-05T07:52:20.04019Z","shell.execute_reply":"2026-07-05T07:53:54.108882Z"}},"outputs":[{"name":"stdout","text":"/kaggle/tmp/ComfyUI\nDownloading clip_vision_h.safetensors from the correct repository...\n","output_type":"stream"},{"name":"stderr","text":"/usr/local/lib/python3.12/dist-packages/huggingface_hub/utils/_validators.py:205: UserWarning: The `local_dir_use_symlinks` argument is deprecated and ignored in `hf_hub_download`. Downloading to a local directory does not use symlinks anymore.\n warnings.warn(\nWarning: You are sending unauthenticated requests to the HF Hub. Please set a HF_TOKEN to enable higher rate limits and faster downloads.\n","output_type":"stream"},{"output_type":"display_data","data":{"text/plain":"split_files/clip_vision/clip_vision_h.sa(…): 0%| | 0.00/1.26G [00:00 Execution > Live preview method'.\n\u001b[32m[INFO]\u001b[0m ### ComfyUI Version: v0.27.0-17-g7f287b70 | Released on '2026-07-04'\n\u001b[32m[INFO]\u001b[0m ComfyUI-GGUF: Allowing full torch compile\n\u001b[32m[INFO]\u001b[0m \nImport times for custom nodes:\n\u001b[32m[INFO]\u001b[0m 0.0 seconds: /kaggle/tmp/ComfyUI/custom_nodes/websocket_image_save.py\n\u001b[32m[INFO]\u001b[0m 0.0 seconds: /kaggle/tmp/ComfyUI/custom_nodes/ComfyUI-KJNodes\n\u001b[32m[INFO]\u001b[0m 0.0 seconds: /kaggle/tmp/ComfyUI/custom_nodes/ComfyUI-GGUF\n\u001b[32m[INFO]\u001b[0m 0.1 seconds: /kaggle/tmp/ComfyUI/custom_nodes/ComfyUI-Manager\n\u001b[32m[INFO]\u001b[0m \n\u001b[32m[INFO]\u001b[0m Context impl SQLiteImpl.\n\u001b[32m[INFO]\u001b[0m Will assume non-transactional DDL.\n\u001b[1m\u001b[31m[ERROR]\u001b[0m Failed to initialize database. Please ensure you have installed the latest requirements. If the error persists, please report this as in future the database will be required: Could not acquire lock on database '/kaggle/tmp/ComfyUI/user/comfyui.db'. Another ComfyUI process may already be using it. Use --database-url to specify a separate database file.\n\u001b[32m[INFO]\u001b[0m [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/model-list.json\n\u001b[32m[INFO]\u001b[0m [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/alter-list.json\n\u001b[32m[INFO]\u001b[0m [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/github-stats.json\n\u001b[32m[INFO]\u001b[0m [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json\n\u001b[32m[INFO]\u001b[0m Using RAM pressure cache.\n\u001b[32m[INFO]\u001b[0m Starting server\n\n\u001b[1m\u001b[31m[ERROR]\u001b[0m Port 8182 is already in use on address 0.0.0.0. Please close the other application or use a different port with --port.\n\u001b[32m[INFO]\u001b[0m [ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/extension-node-map.json\n","output_type":"stream"},{"name":"stdout","text":"Cannot connect to comfyregistry.\nFETCH DATA from: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json[ComfyUI-Manager] Due to a network error, switching to local mode.\n=> custom-node-list.json\n=> cannot schedule new futures after shutdown\nFETCH DATA from: /kaggle/tmp/ComfyUI/custom_nodes/ComfyUI-Manager/custom-node-list.json [DONE]\n","output_type":"stream"},{"name":"stderr","text":"\u001b[32m[INFO]\u001b[0m [ComfyUI-Manager] All startup tasks have been completed.\n","output_type":"stream"},{"name":"stdout","text":"FETCH ComfyRegistry Data: 30/159\nFETCH ComfyRegistry Data: 35/159\nFETCH ComfyRegistry Data: 40/159\nFETCH ComfyRegistry Data: 45/159\nFETCH ComfyRegistry Data: 50/159\nFETCH ComfyRegistry Data: 55/159\nFETCH ComfyRegistry Data: 60/159\nFETCH ComfyRegistry Data: 65/159\nFETCH ComfyRegistry Data: 70/159\nFETCH ComfyRegistry Data: 75/159\nFETCH ComfyRegistry Data: 80/159\nFETCH ComfyRegistry Data: 85/159\nFETCH ComfyRegistry Data: 90/159\nFETCH ComfyRegistry Data: 95/159\nFETCH ComfyRegistry Data: 100/159\nFETCH ComfyRegistry Data: 105/159\nFETCH ComfyRegistry Data: 110/159\nFETCH ComfyRegistry Data: 115/159\nFETCH ComfyRegistry Data: 120/159\nFETCH ComfyRegistry Data: 125/159\nFETCH ComfyRegistry Data: 130/159\nFETCH ComfyRegistry Data: 135/159\nFETCH ComfyRegistry Data: 140/159\nFETCH ComfyRegistry Data: 145/159\nFETCH ComfyRegistry Data: 150/159\nFETCH ComfyRegistry Data: 155/159\nFETCH ComfyRegistry Data [DONE]\n","output_type":"stream"},{"name":"stderr","text":"\u001b[32m[INFO]\u001b[0m [ComfyUI-Manager] default cache updated: https://api.comfy.org/nodes\n\u001b[32m[INFO]\u001b[0m [ComfyUI-Manager] All startup tasks have been completed.\n","output_type":"stream"},{"name":"stdout","text":"FETCH DATA from: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json [DONE]\n","output_type":"stream"},{"name":"stderr","text":"\u001b[1m\u001b[33m[WARNING]\u001b[0m [DEPRECATION WARNING] Detected import of deprecated legacy API: /scripts/ui.js. This is likely caused by a custom node extension using outdated APIs. Please update your extensions or contact the extension author for an updated version.\n\u001b[1m\u001b[33m[WARNING]\u001b[0m [DEPRECATION WARNING] Detected import of deprecated legacy API: /extensions/core/groupNode.js. This is likely caused by a custom node extension using outdated APIs. Please update your extensions or contact the extension author for an updated version.\n\u001b[1m\u001b[33m[WARNING]\u001b[0m [DEPRECATION WARNING] Detected import of deprecated legacy API: /scripts/ui/components/buttonGroup.js. This is likely caused by a custom node extension using outdated APIs. Please update your extensions or contact the extension author for an updated version.\n\u001b[1m\u001b[33m[WARNING]\u001b[0m [DEPRECATION WARNING] Detected import of deprecated legacy API: /scripts/ui/components/button.js. This is likely caused by a custom node extension using outdated APIs. Please update your extensions or contact the extension author for an updated version.\n\u001b[32m[INFO]\u001b[0m got prompt\n\u001b[1m\u001b[33m[WARNING]\u001b[0m invalid prompt: {'type': 'missing_node_type', 'message': \"Node 'ID #8' has no class_type. The workflow may be corrupted or a custom node is missing.\", 'details': \"Node ID '#8'\", 'extra_info': {'node_id': '8', 'class_type': None, 'node_title': None}}\n","output_type":"stream"}],"execution_count":6},{"id":"21f2b7cd-0b1a-48ae-8009-053919f15c37","cell_type":"markdown","source":"# Create tunnel and get URL","metadata":{}},{"id":"9b3f0de5-02ec-4026-b1e8-51a9b6bceb9c","cell_type":"code","source":"import subprocess\n\ntunnel = subprocess.Popen(\n [\"/kaggle/tmp/cloudflared\", \"tunnel\", \"--url\", \"http://localhost:8182\"],\n stdout=subprocess.PIPE,\n stderr=subprocess.STDOUT\n)\n\nprint(\"Waiting for URL... (may take 15-20 seconds)\")\nfor line in iter(tunnel.stdout.readline, b\"\"):\n line = line.decode().strip()\n print(line)\n if \"https://\" in line and \"trycloudflare.com\" in line:\n for word in line.split():\n if word.startswith(\"https://\") and \"trycloudflare.com\" in word:\n print(\"\\n\\u2705 Your ComfyUI URL:\", word)\n break\n break","metadata":{"trusted":true,"execution":{"iopub.status.busy":"2026-07-05T07:54:13.923214Z","iopub.execute_input":"2026-07-05T07:54:13.923489Z","iopub.status.idle":"2026-07-05T07:54:19.207101Z","shell.execute_reply.started":"2026-07-05T07:54:13.923466Z","shell.execute_reply":"2026-07-05T07:54:19.206365Z"}},"outputs":[{"name":"stdout","text":"Waiting for URL... (may take 15-20 seconds)\n2026-07-05T07:54:14Z INF Thank you for trying Cloudflare Tunnel. Doing so, without a Cloudflare account, is a quick way to experiment and try it out. However, be aware that these account-less Tunnels have no uptime guarantee, are subject to the Cloudflare Online Services Terms of Use (https://www.cloudflare.com/website-terms/), and Cloudflare reserves the right to investigate your use of Tunnels for violations of such terms. If you intend to use Tunnels in production you should use a pre-created named tunnel by following: https://developers.cloudflare.com/cloudflare-one/connections/connect-apps\n2026-07-05T07:54:14Z INF Requesting new quick Tunnel on trycloudflare.com...\n[START] Security scan\n[DONE] Security scan\n## ComfyUI-Manager: installing dependencies done.\n** ComfyUI startup time: 2026-07-05 07:54:15.358\n** Platform: Linux\n** Python version: 3.12.13 (main, Mar 4 2026, 09:23:07) [GCC 11.4.0]\n** Python executable: /usr/bin/python3\n** ComfyUI Path: /kaggle/tmp/ComfyUI\n** ComfyUI Base Folder Path: /kaggle/tmp/ComfyUI\n** User directory: /kaggle/tmp/ComfyUI/user\n** ComfyUI-Manager config path: /kaggle/tmp/ComfyUI/user/__manager/config.ini\n** Log path: /kaggle/tmp/ComfyUI/user/comfyui.log\n","output_type":"stream"},{"name":"stderr","text":"\u001b[32m[INFO]\u001b[0m \nPrestartup times for custom nodes:\n\u001b[32m[INFO]\u001b[0m 7.6 seconds: /kaggle/tmp/ComfyUI/custom_nodes/ComfyUI-Manager\n\u001b[32m[INFO]\u001b[0m \n","output_type":"stream"},{"name":"stdout","text":"2026-07-05T07:54:19Z INF +--------------------------------------------------------------------------------------------+\n2026-07-05T07:54:19Z INF | Your quick Tunnel has been created! Visit it at (it may take some time to be reachable): |\n2026-07-05T07:54:19Z INF | https://find-supplies-rca-opt.trycloudflare.com |\n\n✅ Your ComfyUI URL: https://find-supplies-rca-opt.trycloudflare.com\n","output_type":"stream"}],"execution_count":5}]} \ No newline at end of file diff --git a/notebooks/wan2_2_kaggle_test.ipynb b/notebooks/wan2_2_kaggle_test.ipynb new file mode 100644 index 0000000..881cb93 --- /dev/null +++ b/notebooks/wan2_2_kaggle_test.ipynb @@ -0,0 +1,242 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "id": "b2c580f4", + "metadata": {}, + "source": [ + "# Wan 2.2 (TI2V-5B) — Test Notebook (Kaggle)\n", + "\n", + "This notebook assumes you have **already installed dependencies and attached your dataset** on Kaggle.\n", + "It only covers **testing** the model: loading it, running a text-to-video generation, and an image-to-video generation.\n", + "\n", + "**Before running:** in the right-hand panel, make sure your dataset is attached and Accelerator is set to **GPU (T4 x2 or P100)**." + ] + }, + { + "cell_type": "markdown", + "id": "aa60ba24", + "metadata": {}, + "source": [ + "## 1. Check GPU" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "da64aff1", + "metadata": {}, + "outputs": [], + "source": [ + "!nvidia-smi" + ] + }, + { + "cell_type": "markdown", + "id": "af741a96", + "metadata": {}, + "source": [ + "## 2. Set your paths\n", + "\n", + "Edit the variables below to match where your model files live.\n", + "- If you uploaded the Wan 2.2 model as a Kaggle **Dataset**, it will be mounted under `/kaggle/input//`.\n", + "- If you haven't pre-downloaded the weights and want to pull them directly from Hugging Face instead, leave `LOCAL_MODEL_PATH` as `None` and the notebook will fall back to downloading `Wan-AI/Wan2.2-TI2V-5B-Diffusers` automatically." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "569b64e8", + "metadata": {}, + "outputs": [], + "source": [ + "# --- EDIT THIS ---\n", + "# Set to the folder path of your attached Kaggle dataset if you pre-downloaded the model,\n", + "# e.g. \"/kaggle/input/wan22-ti2v-5b/Wan2.2-TI2V-5B-Diffusers\"\n", + "# Leave as None to auto-download from Hugging Face instead.\n", + "LOCAL_MODEL_PATH = None\n", + "\n", + "# Where to save generated test videos\n", + "OUTPUT_DIR = \"/kaggle/working/outputs\"\n", + "\n", + "import os\n", + "os.makedirs(OUTPUT_DIR, exist_ok=True)\n", + "\n", + "# Quick sanity check of what's available under /kaggle/input\n", + "for root, dirs, files in os.walk(\"/kaggle/input\"):\n", + " print(root)\n" + ] + }, + { + "cell_type": "markdown", + "id": "818966ea", + "metadata": {}, + "source": [ + "## 3. Imports" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "25cbb788", + "metadata": {}, + "outputs": [], + "source": [ + "import torch\n", + "from diffusers import WanPipeline\n", + "from diffusers.utils import export_to_video, load_image\n", + "from IPython.display import Video, display\n", + "\n", + "print(\"Torch version:\", torch.__version__)\n", + "print(\"CUDA available:\", torch.cuda.is_available())\n", + "if torch.cuda.is_available():\n", + " print(\"GPU:\", torch.cuda.get_device_name(0))\n" + ] + }, + { + "cell_type": "markdown", + "id": "7ae9448b", + "metadata": {}, + "source": [ + "## 4. Load the Wan 2.2 model" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "2fa2c921", + "metadata": {}, + "outputs": [], + "source": [ + "model_source = LOCAL_MODEL_PATH if LOCAL_MODEL_PATH else \"Wan-AI/Wan2.2-TI2V-5B-Diffusers\"\n", + "print(\"Loading model from:\", model_source)\n", + "\n", + "pipe = WanPipeline.from_pretrained(\n", + " model_source,\n", + " torch_dtype=torch.bfloat16\n", + ")\n", + "pipe.to(\"cuda\")\n", + "\n", + "# Keeps VRAM usage safe on Kaggle's T4/P100 GPUs\n", + "pipe.enable_model_cpu_offload()\n", + "\n", + "print(\"Model loaded successfully.\")\n" + ] + }, + { + "cell_type": "markdown", + "id": "ebabef47", + "metadata": {}, + "source": [ + "## 5. Test — Text-to-Video\n", + "\n", + "Edit `prompt` below to whatever you want to test." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "0ab5a843", + "metadata": {}, + "outputs": [], + "source": [ + "prompt = \"A golden retriever running on a beach at sunset, cinematic lighting\"\n", + "\n", + "t2v_output = pipe(\n", + " prompt=prompt,\n", + " num_frames=49,\n", + " guidance_scale=5.0\n", + ").frames[0]\n", + "\n", + "t2v_path = os.path.join(OUTPUT_DIR, \"test_t2v_output.mp4\")\n", + "export_to_video(t2v_output, t2v_path, fps=24)\n", + "print(\"Saved:\", t2v_path)\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "290a6a8f", + "metadata": {}, + "outputs": [], + "source": [ + "display(Video(t2v_path, embed=True))" + ] + }, + { + "cell_type": "markdown", + "id": "e6490183", + "metadata": {}, + "source": [ + "## 6. Test — Image-to-Video\n", + "\n", + "Set `input_image_path` to an image in your attached dataset, or use a URL." + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "d4c48abb", + "metadata": {}, + "outputs": [], + "source": [ + "# --- EDIT THIS ---\n", + "# Local path to an image from your dataset, e.g. \"/kaggle/input/my-images/sample.jpg\"\n", + "# Or leave as a URL to test with a sample image instead.\n", + "input_image_path = \"https://images.unsplash.com/photo-1519681393784-d120267933ba\"\n", + "\n", + "input_image = load_image(input_image_path)\n", + "\n", + "i2v_prompt = \"the scene comes to life with gentle, natural motion\"\n", + "\n", + "i2v_output = pipe(\n", + " image=input_image,\n", + " prompt=i2v_prompt,\n", + " num_frames=49,\n", + " guidance_scale=5.0\n", + ").frames[0]\n", + "\n", + "i2v_path = os.path.join(OUTPUT_DIR, \"test_i2v_output.mp4\")\n", + "export_to_video(i2v_output, i2v_path, fps=24)\n", + "print(\"Saved:\", i2v_path)\n" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "7f19884f", + "metadata": {}, + "outputs": [], + "source": [ + "display(Video(i2v_path, embed=True))" + ] + }, + { + "cell_type": "markdown", + "id": "04f8b687", + "metadata": {}, + "source": [ + "## 7. Notes\n", + "\n", + "- Both test videos are saved in `/kaggle/working/outputs/` — you can download them from the notebook's **Output** panel after the run finishes (Kaggle auto-saves everything in `/kaggle/working/` for you to download as an artifact).\n", + "- If you hit a CUDA out-of-memory error, lower `num_frames` from 49 to 25, or reduce `guidance_scale`.\n", + "- Kaggle free GPU sessions have a **~9-12 hour limit** and **30 hours/week** quota — keep that in mind if you plan to chain this into a longer fine-tuning session later.\n", + "- This notebook only *tests* the base model. Fine-tuning (LoRA) requires a separate training script and dataset preprocessing step, not covered here." + ] + } + ], + "metadata": { + "accelerator": "GPU", + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "name": "python", + "version": "3.10" + } + }, + "nbformat": 4, + "nbformat_minor": 5 +}