Skip to content

Episode 20 (#13)

David Gyori57cd53d0e162
diff --git a/.gitignore b/.gitignore
index e43b0f9..2fd794b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1,2 @@
.DS_Store
+.venv
diff --git a/episode_20/README.md b/episode_20/README.md
new file mode 100644
index 0000000..a1c54f5
--- /dev/null
+++ b/episode_20/README.md
@@ -0,0 +1,81 @@
+# Episode 20: Use Wan 2.2, ComfyUI and n8n to generate videos for free
+
+In this video, we show you how you can run Wan 2.2 from Alibaba on modal.com using ComfyUI and n8n. You can use your $30 free credits you receive every month to generate stunning AI videos.
+
+<table>
+ <tr>
+ <td>
+ <a href="https://www.skool.com/ai-agents-az/about">📚 Join our Skool community for support, premium content and more!</a>
+ <p>Be part of a growing community and help us create more content like this</p>
+ </td>
+ <td>
+ <img width="548" height="596" alt="Screenshot 2025-07-29 at 3 23 33 PM" src="https://github.com/user-attachments/assets/d687b58d-92d0-44c0-93f8-7be23d3cb80c" />
+ </td>
+ </tr>
+</table>
+
+## Watch the video
+
+[![Wan 2.2 for FREE (NO GPU NEEDED) - Best VEO3 and Seedance alternative (ComfyUI + n8n workflow)](https://img.youtube.com/vi/rZ45_IhojLY/0.jpg)](https://www.youtube.com/watch?v=rZ45_IhojLY)
+
+## Free n8n JSON workflows
+
+- [Wan 2.2 5b Image to Video n8n workflow](n8n_wan_2.2_5b_i2v.json)
+- [Wan 2.2 5b Text to Video n8n workflow](n8n_wan_2.2_5b_t2v.json)
+- [Wan 2.2 14b Image to Video n8n workflow](n8n_wan_2.2_14b_i2v.json)
+- [Wan 2.2 14b Text to Video n8n workflow](n8n_wan_2.2_14b_t2v.json)
+
+## Modal application
+
+- [python modal application to run Wan 2.2 5b with ComfyUI](modal_wan_comfyui_5b.py)
+- [python modal application to run Wan 2.2 14b Text to Video with ComfyUI](modal_wan_comfyui_14b_t2v.py)
+- [python modal application to run Wan 2.2 14b Image to Video with ComfyUI](modal_wan_comfyui_14b_i2v.py)
+
+## Instructions
+
+### Pre-requisites
+
+- Watch the video!
+- Have a Modal account (you can sign up for free)
+- Have an n8n setup
+
+#### Windows setup
+
+- Install Python 3.10+ from the [official website](https://www.python.org/downloads/)
+- Install the [Windows Subsystem for Linux (WSL)](https://docs.microsoft.com/en-us/windows/wsl/install) and set up a Linux distribution (like Ubuntu)
+- Install Python venv in WSL with `sudo apt install python3-venv`
+
+#### MacOS + Linux setup
+
+- Make sure you have Python 3.10+ installed
+- Make sure you have Python venv installed
+
+### Steps to run the application
+
+1. Copy the modal file you want to run (e.g., `modal_wan_comfyui_5b.py`) to your local machine
+2. Open a terminal and navigate to the directory where you copied the file
+3. Create a virtual environment with `python3 -m venv .venv`
+4. Activate the virtual environment with `source .venv/bin/activate`
+5. Install the modal package with `pip install modal`
+6. Run `modal setup` to configure your Modal account and approve it on the Modal website
+7. Run `modal serve {THE_MODAL_PYTHON_FILE}` to start the Modal application (replace `{THE_MODAL_PYTHON_FILE}` with the name of the file you copied, e.g., `modal_wan_comfyui_5b.py`)
+8. (optional) Deploy the application with `modal deploy {THE_MODAL_PYTHON_FILE}`
+
+## Additional resources
+
+- [Join n8n](https://n8n.partnerlinks.io/fenoo5ekqs1g)
+- [Modal.com](https://modal.com)
+- [ComfyUI documentation](https://docs.comfy.org/)
+
+## ComfyUI official workflows from the [ComfyUI documentation](https://docs.comfy.org/tutorials/video/wan/wan2_2)
+
+- [Wan 2.2 5b ti2v ComfyUI workflow](comfyui_wan2_2_5B_ti2v.json)
+- [Wan 2.2 14b t2v ComfyUI workflow](comfyui_wan2_2_14B_t2v.json)
+- [Wan 2.2 14b i2v ComfyUI workflow](comfyui_wan2_2_14B_i2v.json)
+
+## ComfyUI API workflows
+
+- [Wan 2.2 5b t2v ComfyUI API workflow](comfyui_api_wan2_2_5B_t2v.json)
+- [Wan 2.2 5b i2v ComfyUI API workflow](comfyui_api_wan2_2_5B_i2v.json)
+- [Wan 2.2 14b t2v ComfyUI API workflow](comfyui_api_wan2_2_14B_t2v.json)
+- [Wan 2.2 14b i2v ComfyUI API workflow](comfyui_api_wan2_2_14B_i2v.json)
diff --git a/episode_20/comfyui_api_wan2_2_14B_i2v.json b/episode_20/comfyui_api_wan2_2_14B_i2v.json
new file mode 100644
index 0000000..8a101c1
--- /dev/null
+++ b/episode_20/comfyui_api_wan2_2_14B_i2v.json
@@ -0,0 +1,241 @@
+{
+ "6": {
+ "inputs": {
+ "text": "The white dragon warrior stands still, eyes full of determination and strength. The camera slowly moves closer or circles around the warrior, highlighting the powerful presence and heroic spirit of the character.",
+ "clip": [
+ "38",
+ 0
+ ]
+ },
+ "class_type": "CLIPTextEncode",
+ "_meta": {
+ "title": "CLIP Text Encode (Positive Prompt)"
+ }
+ },
+ "7": {
+ "inputs": {
+ "text": "色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走",
+ "clip": [
+ "38",
+ 0
+ ]
+ },
+ "class_type": "CLIPTextEncode",
+ "_meta": {
+ "title": "CLIP Text Encode (Negative Prompt)"
+ }
+ },
+ "8": {
+ "inputs": {
+ "samples": [
+ "58",
+ 0
+ ],
+ "vae": [
+ "39",
+ 0
+ ]
+ },
+ "class_type": "VAEDecode",
+ "_meta": {
+ "title": "VAE Decode"
+ }
+ },
+ "37": {
+ "inputs": {
+ "unet_name": "wan2.2_i2v_high_noise_14B_fp16.safetensors",
+ "weight_dtype": "default"
+ },
+ "class_type": "UNETLoader",
+ "_meta": {
+ "title": "Load Diffusion Model"
+ }
+ },
+ "38": {
+ "inputs": {
+ "clip_name": "umt5_xxl_fp8_e4m3fn_scaled.safetensors",
+ "type": "wan",
+ "device": "default"
+ },
+ "class_type": "CLIPLoader",
+ "_meta": {
+ "title": "Load CLIP"
+ }
+ },
+ "39": {
+ "inputs": {
+ "vae_name": "wan_2.1_vae.safetensors"
+ },
+ "class_type": "VAELoader",
+ "_meta": {
+ "title": "Load VAE"
+ }
+ },
+ "54": {
+ "inputs": {
+ "shift": 8.000000000000002,
+ "model": [
+ "37",
+ 0
+ ]
+ },
+ "class_type": "ModelSamplingSD3",
+ "_meta": {
+ "title": "ModelSamplingSD3"
+ }
+ },
+ "55": {
+ "inputs": {
+ "shift": 8,
+ "model": [
+ "56",
+ 0
+ ]
+ },
+ "class_type": "ModelSamplingSD3",
+ "_meta": {
+ "title": "ModelSamplingSD3"
+ }
+ },
+ "56": {
+ "inputs": {
+ "unet_name": "wan2.2_i2v_low_noise_14B_fp16.safetensors",
+ "weight_dtype": "default"
+ },
+ "class_type": "UNETLoader",
+ "_meta": {
+ "title": "Load Diffusion Model"
+ }
+ },
+ "57": {
+ "inputs": {
+ "add_noise": "enable",
+ "noise_seed": 1042664824122032,
+ "steps": 20,
+ "cfg": 3.5,
+ "sampler_name": "euler",
+ "scheduler": "simple",
+ "start_at_step": 0,
+ "end_at_step": 10,
+ "return_with_leftover_noise": "enable",
+ "model": [
+ "54",
+ 0
+ ],
+ "positive": [
+ "63",
+ 0
+ ],
+ "negative": [
+ "63",
+ 1
+ ],
+ "latent_image": [
+ "63",
+ 2
+ ]
+ },
+ "class_type": "KSamplerAdvanced",
+ "_meta": {
+ "title": "KSampler (Advanced)"
+ }
+ },
+ "58": {
+ "inputs": {
+ "add_noise": "disable",
+ "noise_seed": 0,
+ "steps": 20,
+ "cfg": 3.5,
+ "sampler_name": "euler",
+ "scheduler": "simple",
+ "start_at_step": 10,
+ "end_at_step": 10000,
+ "return_with_leftover_noise": "disable",
+ "model": [
+ "55",
+ 0
+ ],
+ "positive": [
+ "63",
+ 0
+ ],
+ "negative": [
+ "63",
+ 1
+ ],
+ "latent_image": [
+ "57",
+ 0
+ ]
+ },
+ "class_type": "KSamplerAdvanced",
+ "_meta": {
+ "title": "KSampler (Advanced)"
+ }
+ },
+ "60": {
+ "inputs": {
+ "fps": 16,
+ "images": [
+ "8",
+ 0
+ ]
+ },
+ "class_type": "CreateVideo",
+ "_meta": {
+ "title": "Create Video"
+ }
+ },
+ "61": {
+ "inputs": {
+ "filename_prefix": "video/ComfyUI",
+ "format": "auto",
+ "codec": "auto",
+ "video": [
+ "60",
+ 0
+ ]
+ },
+ "class_type": "SaveVideo",
+ "_meta": {
+ "title": "Save Video"
+ }
+ },
+ "62": {
+ "inputs": {
+ "image": "example.png"
+ },
+ "class_type": "LoadImage",
+ "_meta": {
+ "title": "Load Image"
+ }
+ },
+ "63": {
+ "inputs": {
+ "width": 1280,
+ "height": 704,
+ "length": 81,
+ "batch_size": 1,
+ "positive": [
+ "6",
+ 0
+ ],
+ "negative": [
+ "7",
+ 0
+ ],
+ "vae": [
+ "39",
+ 0
+ ],
+ "start_image": [
+ "62",
+ 0
+ ]
+ },
+ "class_type": "WanImageToVideo",
+ "_meta": {
+ "title": "WanImageToVideo"
+ }
+ }
+}
\ No newline at end of file
diff --git a/episode_20/comfyui_api_wan2_2_14B_t2v.json b/episode_20/comfyui_api_wan2_2_14B_t2v.json
new file mode 100644
index 0000000..0141b3d
--- /dev/null
+++ b/episode_20/comfyui_api_wan2_2_14B_t2v.json
@@ -0,0 +1,216 @@
+{
+ "6": {
+ "inputs": {
+ "text": "A close-up of a young woman smiling gently in the rain, raindrops glistening on her face and eyelashes. The video captures the delicate details of her expression and the water droplets, with soft light reflecting off her skin in the rainy atmosphere.",
+ "clip": [
+ "38",
+ 0
+ ]
+ },
+ "class_type": "CLIPTextEncode",
+ "_meta": {
+ "title": "CLIP Text Encode (Positive Prompt)"
+ }
+ },
+ "7": {
+ "inputs": {
+ "text": "色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走",
+ "clip": [
+ "38",
+ 0
+ ]
+ },
+ "class_type": "CLIPTextEncode",
+ "_meta": {
+ "title": "CLIP Text Encode (Negative Prompt)"
+ }
+ },
+ "8": {
+ "inputs": {
+ "samples": [
+ "58",
+ 0
+ ],
+ "vae": [
+ "39",
+ 0
+ ]
+ },
+ "class_type": "VAEDecode",
+ "_meta": {
+ "title": "VAE Decode"
+ }
+ },
+ "37": {
+ "inputs": {
+ "unet_name": "wan2.2_t2v_high_noise_14B_fp16.safetensors",
+ "weight_dtype": "default"
+ },
+ "class_type": "UNETLoader",
+ "_meta": {
+ "title": "Load Diffusion Model"
+ }
+ },
+ "38": {
+ "inputs": {
+ "clip_name": "umt5_xxl_fp8_e4m3fn_scaled.safetensors",
+ "type": "wan",
+ "device": "default"
+ },
+ "class_type": "CLIPLoader",
+ "_meta": {
+ "title": "Load CLIP"
+ }
+ },
+ "39": {
+ "inputs": {
+ "vae_name": "wan_2.1_vae.safetensors"
+ },
+ "class_type": "VAELoader",
+ "_meta": {
+ "title": "Load VAE"
+ }
+ },
+ "54": {
+ "inputs": {
+ "shift": 8.000000000000002,
+ "model": [
+ "37",
+ 0
+ ]
+ },
+ "class_type": "ModelSamplingSD3",
+ "_meta": {
+ "title": "ModelSamplingSD3"
+ }
+ },
+ "55": {
+ "inputs": {
+ "shift": 8,
+ "model": [
+ "56",
+ 0
+ ]
+ },
+ "class_type": "ModelSamplingSD3",
+ "_meta": {
+ "title": "ModelSamplingSD3"
+ }
+ },
+ "56": {
+ "inputs": {
+ "unet_name": "wan2.2_t2v_low_noise_14B_fp16.safetensors",
+ "weight_dtype": "default"
+ },
+ "class_type": "UNETLoader",
+ "_meta": {
+ "title": "Load Diffusion Model"
+ }
+ },
+ "57": {
+ "inputs": {
+ "add_noise": "enable",
+ "noise_seed": 774388746670969,
+ "steps": 20,
+ "cfg": 3.5,
+ "sampler_name": "euler",
+ "scheduler": "simple",
+ "start_at_step": 0,
+ "end_at_step": 10,
+ "return_with_leftover_noise": "enable",
+ "model": [
+ "54",
+ 0
+ ],
+ "positive": [
+ "6",
+ 0
+ ],
+ "negative": [
+ "7",
+ 0
+ ],
+ "latent_image": [
+ "59",
+ 0
+ ]
+ },
+ "class_type": "KSamplerAdvanced",
+ "_meta": {
+ "title": "KSampler (Advanced)"
+ }
+ },
+ "58": {
+ "inputs": {
+ "add_noise": "disable",
+ "noise_seed": 0,
+ "steps": 20,
+ "cfg": 3.5,
+ "sampler_name": "euler",
+ "scheduler": "simple",
+ "start_at_step": 10,
+ "end_at_step": 10000,
+ "return_with_leftover_noise": "disable",
+ "model": [
+ "55",
+ 0
+ ],
+ "positive": [
+ "6",
+ 0
+ ],
+ "negative": [
+ "7",
+ 0
+ ],
+ "latent_image": [
+ "57",
+ 0
+ ]
+ },
+ "class_type": "KSamplerAdvanced",
+ "_meta": {
+ "title": "KSampler (Advanced)"
+ }
+ },
+ "59": {
+ "inputs": {
+ "width": 1280,
+ "height": 704,
+ "length": 81,
+ "batch_size": 1
+ },
+ "class_type": "EmptyHunyuanLatentVideo",
+ "_meta": {
+ "title": "EmptyHunyuanLatentVideo"
+ }
+ },
+ "60": {
+ "inputs": {
+ "fps": 16,
+ "images": [
+ "8",
+ 0
+ ]
+ },
+ "class_type": "CreateVideo",
+ "_meta": {
+ "title": "Create Video"
+ }
+ },
+ "61": {
+ "inputs": {
+ "filename_prefix": "video/ComfyUI",
+ "format": "auto",
+ "codec": "auto",
+ "video": [
+ "60",
+ 0
+ ]
+ },
+ "class_type": "SaveVideo",
+ "_meta": {
+ "title": "Save Video"
+ }
+ }
+}
\ No newline at end of file
diff --git a/episode_20/comfyui_api_wan2_2_5B_i2v.json b/episode_20/comfyui_api_wan2_2_5B_i2v.json
new file mode 100644
index 0000000..3293dfa
--- /dev/null
+++ b/episode_20/comfyui_api_wan2_2_5B_i2v.json
@@ -0,0 +1,175 @@
+{
+ "3": {
+ "inputs": {
+ "seed": 418826476045691,
+ "steps": 20,
+ "cfg": 5,
+ "sampler_name": "uni_pc",
+ "scheduler": "simple",
+ "denoise": 1,
+ "model": [
+ "48",
+ 0
+ ],
+ "positive": [
+ "6",
+ 0
+ ],
+ "negative": [
+ "7",
+ 0
+ ],
+ "latent_image": [
+ "55",
+ 0
+ ]
+ },
+ "class_type": "KSampler",
+ "_meta": {
+ "title": "KSampler"
+ }
+ },
+ "6": {
+ "inputs": {
+ "text": "In this retro cartoon, the fathre is speaking, while the boy is playing on the ground and the girl is reading from the book to the father",
+ "clip": [
+ "38",
+ 0
+ ]
+ },
+ "class_type": "CLIPTextEncode",
+ "_meta": {
+ "title": "CLIP Text Encode (Positive Prompt)"
+ }
+ },
+ "7": {
+ "inputs": {
+ "text": "色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走",
+ "clip": [
+ "38",
+ 0
+ ]
+ },
+ "class_type": "CLIPTextEncode",
+ "_meta": {
+ "title": "CLIP Text Encode (Negative Prompt)"
+ }
+ },
+ "8": {
+ "inputs": {
+ "samples": [
+ "3",
+ 0
+ ],
+ "vae": [
+ "39",
+ 0
+ ]
+ },
+ "class_type": "VAEDecode",
+ "_meta": {
+ "title": "VAE Decode"
+ }
+ },
+ "37": {
+ "inputs": {
+ "unet_name": "wan2.2_ti2v_5B_fp16.safetensors",
+ "weight_dtype": "default"
+ },
+ "class_type": "UNETLoader",
+ "_meta": {
+ "title": "Load Diffusion Model"
+ }
+ },
+ "38": {
+ "inputs": {
+ "clip_name": "umt5_xxl_fp8_e4m3fn_scaled.safetensors",
+ "type": "wan",
+ "device": "default"
+ },
+ "class_type": "CLIPLoader",
+ "_meta": {
+ "title": "Load CLIP"
+ }
+ },
+ "39": {
+ "inputs": {
+ "vae_name": "wan2.2_vae.safetensors"
+ },
+ "class_type": "VAELoader",
+ "_meta": {
+ "title": "Load VAE"
+ }
+ },
+ "48": {
+ "inputs": {
+ "shift": 8,
+ "model": [
+ "37",
+ 0
+ ]
+ },
+ "class_type": "ModelSamplingSD3",
+ "_meta": {
+ "title": "ModelSamplingSD3"
+ }
+ },
+ "55": {
+ "inputs": {
+ "width": 1280,
+ "height": 704,
+ "length": 121,
+ "batch_size": 1,
+ "vae": [
+ "39",
+ 0
+ ],
+ "start_image": [
+ "56",
+ 0
+ ]
+ },
+ "class_type": "Wan22ImageToVideoLatent",
+ "_meta": {
+ "title": "Wan22ImageToVideoLatent"
+ }
+ },
+ "56": {
+ "inputs": {
+ "image": "family.jpeg"
+ },
+ "class_type": "LoadImage",
+ "_meta": {
+ "title": "Load Image"
+ }
+ },
+ "57": {
+ "inputs": {
+ "fps": 24,
+ "images": [
+ "8",
+ 0
+ ]
+ },
+ "class_type": "CreateVideo",
+ "_meta": {
+ "title": "Create Video"
+ }
+ },
+ "58": {
+ "inputs": {
+ "filename_prefix": "video/ComfyUI",
+ "format": "auto",
+ "codec": "auto",
+ "video-preview": "",
+ "video": [
+ "57",
+ 0
+ ]
+ },
+ "class_type": "SaveVideo",
+ "_meta": {
+ "title": "Save Video"
+ }
+ }
+}
\ No newline at end of file
diff --git a/episode_20/comfyui_api_wan2_2_5B_t2v.json b/episode_20/comfyui_api_wan2_2_5B_t2v.json
new file mode 100644
index 0000000..b449d97
--- /dev/null
+++ b/episode_20/comfyui_api_wan2_2_5B_t2v.json
@@ -0,0 +1,162 @@
+{
+ "3": {
+ "inputs": {
+ "seed": 418826476045691,
+ "steps": 20,
+ "cfg": 5,
+ "sampler_name": "uni_pc",
+ "scheduler": "simple",
+ "denoise": 1,
+ "model": [
+ "48",
+ 0
+ ],
+ "positive": [
+ "6",
+ 0
+ ],
+ "negative": [
+ "7",
+ 0
+ ],
+ "latent_image": [
+ "55",
+ 0
+ ]
+ },
+ "class_type": "KSampler",
+ "_meta": {
+ "title": "KSampler"
+ }
+ },
+ "6": {
+ "inputs": {
+ "text": "In this retro cartoon, the fathre is speaking, while the boy is playing on the ground and the girl is reading from the book to the father",
+ "clip": [
+ "38",
+ 0
+ ]
+ },
+ "class_type": "CLIPTextEncode",
+ "_meta": {
+ "title": "CLIP Text Encode (Positive Prompt)"
+ }
+ },
+ "7": {
+ "inputs": {
+ "text": "色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走",
+ "clip": [
+ "38",
+ 0
+ ]
+ },
+ "class_type": "CLIPTextEncode",
+ "_meta": {
+ "title": "CLIP Text Encode (Negative Prompt)"
+ }
+ },
+ "8": {
+ "inputs": {
+ "samples": [
+ "3",
+ 0
+ ],
+ "vae": [
+ "39",
+ 0
+ ]
+ },
+ "class_type": "VAEDecode",
+ "_meta": {
+ "title": "VAE Decode"
+ }
+ },
+ "37": {
+ "inputs": {
+ "unet_name": "wan2.2_ti2v_5B_fp16.safetensors",
+ "weight_dtype": "default"
+ },
+ "class_type": "UNETLoader",
+ "_meta": {
+ "title": "Load Diffusion Model"
+ }
+ },
+ "38": {
+ "inputs": {
+ "clip_name": "umt5_xxl_fp8_e4m3fn_scaled.safetensors",
+ "type": "wan",
+ "device": "default"
+ },
+ "class_type": "CLIPLoader",
+ "_meta": {
+ "title": "Load CLIP"
+ }
+ },
+ "39": {
+ "inputs": {
+ "vae_name": "wan2.2_vae.safetensors"
+ },
+ "class_type": "VAELoader",
+ "_meta": {
+ "title": "Load VAE"
+ }
+ },
+ "48": {
+ "inputs": {
+ "shift": 8,
+ "model": [
+ "37",
+ 0
+ ]
+ },
+ "class_type": "ModelSamplingSD3",
+ "_meta": {
+ "title": "ModelSamplingSD3"
+ }
+ },
+ "55": {
+ "inputs": {
+ "width": 1280,
+ "height": 704,
+ "length": 121,
+ "batch_size": 1,
+ "vae": [
+ "39",
+ 0
+ ]
+ },
+ "class_type": "Wan22ImageToVideoLatent",
+ "_meta": {
+ "title": "Wan22ImageToVideoLatent"
+ }
+ },
+ "57": {
+ "inputs": {
+ "fps": 24,
+ "images": [
+ "8",
+ 0
+ ]
+ },
+ "class_type": "CreateVideo",
+ "_meta": {
+ "title": "Create Video"
+ }
+ },
+ "58": {
+ "inputs": {
+ "filename_prefix": "video/ComfyUI",
+ "format": "auto",
+ "codec": "auto",
+ "video-preview": "",
+ "video": [
+ "57",
+ 0
+ ]
+ },
+ "class_type": "SaveVideo",
+ "_meta": {
+ "title": "Save Video"
+ }
+ }
+}
\ No newline at end of file
diff --git a/episode_20/comfyui_wan2_2_14B_i2v.json b/episode_20/comfyui_wan2_2_14B_i2v.json
new file mode 100644
index 0000000..b6d0e9d
--- /dev/null
+++ b/episode_20/comfyui_wan2_2_14B_i2v.json
@@ -0,0 +1,971 @@
+{
+ "id": "ec7da562-7e21-4dac-a0d2-f4441e1efd3b",
+ "revision": 0,
+ "last_node_id": 66,
+ "last_link_id": 148,
+ "nodes": [
+ {
+ "id": 38,
+ "type": "CLIPLoader",
+ "pos": [
+ 38.86457061767578,
+ 189.26513671875
+ ],
+ "size": [
+ 346.391845703125,
+ 106
+ ],
+ "flags": {},
+ "order": 0,
+ "mode": 0,
+ "inputs": [],
+ "outputs": [
+ {
+ "name": "CLIP",
+ "type": "CLIP",
+ "slot_index": 0,
+ "links": [
+ 74,
+ 75
+ ]
+ }
+ ],
+ "properties": {
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45",
+ "Node name for S&R": "CLIPLoader",
+ "models": [
+ {
+ "name": "umt5_xxl_fp8_e4m3fn_scaled.safetensors",
+ "url": "https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors",
+ "directory": "text_encoders"
+ }
+ ]
+ },
+ "widgets_values": [
+ "umt5_xxl_fp8_e4m3fn_scaled.safetensors",
+ "wan",
+ "default"
+ ]
+ },
+ {
+ "id": 58,
+ "type": "KSamplerAdvanced",
+ "pos": [
+ 890,
+ 360
+ ],
+ "size": [
+ 304.748046875,
+ 498.6905822753906
+ ],
+ "flags": {},
+ "order": 12,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "model",
+ "type": "MODEL",
+ "link": 148
+ },
+ {
+ "name": "positive",
+ "type": "CONDITIONING",
+ "link": 138
+ },
+ {
+ "name": "negative",
+ "type": "CONDITIONING",
+ "link": 139
+ },
+ {
+ "name": "latent_image",
+ "type": "LATENT",
+ "link": 113
+ }
+ ],
+ "outputs": [
+ {
+ "name": "LATENT",
+ "type": "LATENT",
+ "links": [
+ 124
+ ]
+ }
+ ],
+ "properties": {
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45",
+ "Node name for S&R": "KSamplerAdvanced"
+ },
+ "widgets_values": [
+ "disable",
+ 0,
+ "fixed",
+ 20,
+ 3.5,
+ "euler",
+ "simple",
+ 10,
+ 10000,
+ "disable"
+ ]
+ },
+ {
+ "id": 57,
+ "type": "KSamplerAdvanced",
+ "pos": [
+ 890,
+ -60
+ ],
+ "size": [
+ 304.748046875,
+ 334
+ ],
+ "flags": {},
+ "order": 11,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "model",
+ "type": "MODEL",
+ "link": 147
+ },
+ {
+ "name": "positive",
+ "type": "CONDITIONING",
+ "link": 136
+ },
+ {
+ "name": "negative",
+ "type": "CONDITIONING",
+ "link": 137
+ },
+ {
+ "name": "latent_image",
+ "type": "LATENT",
+ "link": 140
+ }
+ ],
+ "outputs": [
+ {
+ "name": "LATENT",
+ "type": "LATENT",
+ "links": [
+ 113
+ ]
+ }
+ ],
+ "properties": {
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45",
+ "Node name for S&R": "KSamplerAdvanced"
+ },
+ "widgets_values": [
+ "enable",
+ 1042664824122032,
+ "randomize",
+ 20,
+ 3.5,
+ "euler",
+ "simple",
+ 0,
+ 10,
+ "enable"
+ ]
+ },
+ {
+ "id": 8,
+ "type": "VAEDecode",
+ "pos": [
+ 1240,
+ -40
+ ],
+ "size": [
+ 210,
+ 46
+ ],
+ "flags": {},
+ "order": 13,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "samples",
+ "type": "LATENT",
+ "link": 124
+ },
+ {
+ "name": "vae",
+ "type": "VAE",
+ "link": 76
+ }
+ ],
+ "outputs": [
+ {
+ "name": "IMAGE",
+ "type": "IMAGE",
+ "slot_index": 0,
+ "links": [
+ 131
+ ]
+ }
+ ],
+ "properties": {
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45",
+ "Node name for S&R": "VAEDecode"
+ },
+ "widgets_values": []
+ },
+ {
+ "id": 61,
+ "type": "SaveVideo",
+ "pos": [
+ 1240,
+ 190
+ ],
+ "size": [
+ 710,
+ 660
+ ],
+ "flags": {},
+ "order": 15,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "video",
+ "type": "VIDEO",
+ "link": 132
+ }
+ ],
+ "outputs": [],
+ "properties": {
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45",
+ "Node name for S&R": "SaveVideo"
+ },
+ "widgets_values": [
+ "video/ComfyUI",
+ "auto",
+ "auto"
+ ]
+ },
+ {
+ "id": 7,
+ "type": "CLIPTextEncode",
+ "pos": [
+ 420,
+ 410
+ ],
+ "size": [
+ 425.27801513671875,
+ 180.6060791015625
+ ],
+ "flags": {},
+ "order": 7,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "clip",
+ "type": "CLIP",
+ "link": 75
+ }
+ ],
+ "outputs": [
+ {
+ "name": "CONDITIONING",
+ "type": "CONDITIONING",
+ "slot_index": 0,
+ "links": [
+ 135
+ ]
+ }
+ ],
+ "title": "CLIP Text Encode (Negative Prompt)",
+ "properties": {
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45",
+ "Node name for S&R": "CLIPTextEncode"
+ },
+ "widgets_values": [
+ "色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走"
+ ],
+ "color": "#322",
+ "bgcolor": "#533"
+ },
+ {
+ "id": 39,
+ "type": "VAELoader",
+ "pos": [
+ 40,
+ 350
+ ],
+ "size": [
+ 344.731689453125,
+ 59.98149108886719
+ ],
+ "flags": {},
+ "order": 1,
+ "mode": 0,
+ "inputs": [],
+ "outputs": [
+ {
+ "name": "VAE",
+ "type": "VAE",
+ "slot_index": 0,
+ "links": [
+ 76,
+ 141
+ ]
+ }
+ ],
+ "properties": {
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45",
+ "Node name for S&R": "VAELoader",
+ "models": [
+ {
+ "name": "wan_2.1_vae.safetensors",
+ "url": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/vae/wan_2.1_vae.safetensors",
+ "directory": "vae"
+ }
+ ]
+ },
+ "widgets_values": [
+ "wan_2.1_vae.safetensors"
+ ]
+ },
+ {
+ "id": 54,
+ "type": "ModelSamplingSD3",
+ "pos": [
+ 640,
+ -70
+ ],
+ "size": [
+ 210,
+ 60
+ ],
+ "flags": {},
+ "order": 8,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "model",
+ "type": "MODEL",
+ "link": 110
+ }
+ ],
+ "outputs": [
+ {
+ "name": "MODEL",
+ "type": "MODEL",
+ "slot_index": 0,
+ "links": [
+ 147
+ ]
+ }
+ ],
+ "properties": {
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45",
+ "Node name for S&R": "ModelSamplingSD3"
+ },
+ "widgets_values": [
+ 8.000000000000002
+ ]
+ },
+ {
+ "id": 55,
+ "type": "ModelSamplingSD3",
+ "pos": [
+ 640,
+ 60
+ ],
+ "size": [
+ 210,
+ 58
+ ],
+ "flags": {},
+ "order": 9,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "model",
+ "type": "MODEL",
+ "link": 112
+ }
+ ],
+ "outputs": [
+ {
+ "name": "MODEL",
+ "type": "MODEL",
+ "slot_index": 0,
+ "links": [
+ 148
+ ]
+ }
+ ],
+ "properties": {
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45",
+ "Node name for S&R": "ModelSamplingSD3"
+ },
+ "widgets_values": [
+ 8
+ ]
+ },
+ {
+ "id": 66,
+ "type": "MarkdownNote",
+ "pos": [
+ -480,
+ -120
+ ],
+ "size": [
+ 480,
+ 350
+ ],
+ "flags": {},
+ "order": 2,
+ "mode": 0,
+ "inputs": [],
+ "outputs": [],
+ "title": "Model Links",
+ "properties": {},
+ "widgets_values": [
+ "[Tutorial](https://docs.comfy.org/tutorials/video/wan/wan2_2\n) | [教程](https://docs.comfy.org/zh-CN/tutorials/video/wan/wan2_2\n)\n\n**Diffusion Model**\n- [wan2.2_i2v_high_noise_14B_fp16.safetensors](https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_i2v_high_noise_14B_fp16.safetensors)\n- [wan2.2_i2v_low_noise_14B_fp16.safetensors](https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_i2v_low_noise_14B_fp16.safetensors)\n\n**VAE**\n- [wan_2.1_vae.safetensors](https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/vae/wan_2.1_vae.safetensors)\n\n**Text Encoder** \n- [umt5_xxl_fp8_e4m3fn_scaled.safetensors](https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors)\n\n\nFile save location\n\n```\nComfyUI/\n├───📂 models/\n│ ├───📂 diffusion_models/\n│ │ ├─── wan2.2_i2v_low_noise_14B_fp16.safetensors\n│ │ └─── wan2.2_i2v_high_noise_14B_fp16.safetensors\n│ ├───📂 text_encoders/\n│ │ └─── umt5_xxl_fp8_e4m3fn_scaled.safetensors \n│ └───📂 vae/\n│ └── wan_2.1_vae.safetensors\n```\n"
+ ],
+ "color": "#432",
+ "bgcolor": "#653"
+ },
+ {
+ "id": 6,
+ "type": "CLIPTextEncode",
+ "pos": [
+ 420,
+ 210
+ ],
+ "size": [
+ 422.84503173828125,
+ 164.31304931640625
+ ],
+ "flags": {},
+ "order": 6,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "clip",
+ "type": "CLIP",
+ "link": 74
+ }
+ ],
+ "outputs": [
+ {
+ "name": "CONDITIONING",
+ "type": "CONDITIONING",
+ "slot_index": 0,
+ "links": [
+ 134
+ ]
+ }
+ ],
+ "title": "CLIP Text Encode (Positive Prompt)",
+ "properties": {
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45",
+ "Node name for S&R": "CLIPTextEncode"
+ },
+ "widgets_values": [
+ "The white dragon warrior stands still, eyes full of determination and strength. The camera slowly moves closer or circles around the warrior, highlighting the powerful presence and heroic spirit of the character."
+ ],
+ "color": "#232",
+ "bgcolor": "#353"
+ },
+ {
+ "id": 62,
+ "type": "LoadImage",
+ "pos": [
+ 50,
+ 570
+ ],
+ "size": [
+ 315,
+ 314
+ ],
+ "flags": {},
+ "order": 3,
+ "mode": 0,
+ "inputs": [],
+ "outputs": [
+ {
+ "name": "IMAGE",
+ "type": "IMAGE",
+ "slot_index": 0,
+ "links": [
+ 133
+ ]
+ },
+ {
+ "name": "MASK",
+ "type": "MASK",
+ "slot_index": 1,
+ "links": null
+ }
+ ],
+ "properties": {
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45",
+ "Node name for S&R": "LoadImage"
+ },
+ "widgets_values": [
+ "example.png",
+ "image"
+ ]
+ },
+ {
+ "id": 60,
+ "type": "CreateVideo",
+ "pos": [
+ 1240,
+ 60
+ ],
+ "size": [
+ 270,
+ 78
+ ],
+ "flags": {},
+ "order": 14,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "images",
+ "type": "IMAGE",
+ "link": 131
+ },
+ {
+ "name": "audio",
+ "shape": 7,
+ "type": "AUDIO",
+ "link": null
+ }
+ ],
+ "outputs": [
+ {
+ "name": "VIDEO",
+ "type": "VIDEO",
+ "links": [
+ 132
+ ]
+ }
+ ],
+ "properties": {
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45",
+ "Node name for S&R": "CreateVideo"
+ },
+ "widgets_values": [
+ 16
+ ]
+ },
+ {
+ "id": 63,
+ "type": "WanImageToVideo",
+ "pos": [
+ 450,
+ 690
+ ],
+ "size": [
+ 342.5999755859375,
+ 210
+ ],
+ "flags": {},
+ "order": 10,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "positive",
+ "type": "CONDITIONING",
+ "link": 134
+ },
+ {
+ "name": "negative",
+ "type": "CONDITIONING",
+ "link": 135
+ },
+ {
+ "name": "vae",
+ "type": "VAE",
+ "link": 141
+ },
+ {
+ "name": "clip_vision_output",
+ "shape": 7,
+ "type": "CLIP_VISION_OUTPUT",
+ "link": null
+ },
+ {
+ "name": "start_image",
+ "shape": 7,
+ "type": "IMAGE",
+ "link": 133
+ }
+ ],
+ "outputs": [
+ {
+ "name": "positive",
+ "type": "CONDITIONING",
+ "slot_index": 0,
+ "links": [
+ 136,
+ 138
+ ]
+ },
+ {
+ "name": "negative",
+ "type": "CONDITIONING",
+ "slot_index": 1,
+ "links": [
+ 137,
+ 139
+ ]
+ },
+ {
+ "name": "latent",
+ "type": "LATENT",
+ "slot_index": 2,
+ "links": [
+ 140
+ ]
+ }
+ ],
+ "properties": {
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45",
+ "Node name for S&R": "WanImageToVideo"
+ },
+ "widgets_values": [
+ 1280,
+ 704,
+ 81,
+ 1
+ ]
+ },
+ {
+ "id": 37,
+ "type": "UNETLoader",
+ "pos": [
+ 34.225364685058594,
+ -71.77911376953125
+ ],
+ "size": [
+ 346.7470703125,
+ 82
+ ],
+ "flags": {},
+ "order": 4,
+ "mode": 0,
+ "inputs": [],
+ "outputs": [
+ {
+ "name": "MODEL",
+ "type": "MODEL",
+ "slot_index": 0,
+ "links": [
+ 110
+ ]
+ }
+ ],
+ "properties": {
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45",
+ "Node name for S&R": "UNETLoader",
+ "models": [
+ {
+ "name": "wan2.2_i2v_high_noise_14B_fp8_scaled.safetensors",
+ "url": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_i2v_high_noise_14B_fp8_scaled.safetensors",
+ "directory": "diffusion_models"
+ }
+ ]
+ },
+ "widgets_values": [
+ "wan2.2_i2v_high_noise_14B_fp16.safetensors",
+ "default"
+ ]
+ },
+ {
+ "id": 56,
+ "type": "UNETLoader",
+ "pos": [
+ 34.70310592651367,
+ 57.175601959228516
+ ],
+ "size": [
+ 346.7470703125,
+ 82
+ ],
+ "flags": {},
+ "order": 5,
+ "mode": 0,
+ "inputs": [],
+ "outputs": [
+ {
+ "name": "MODEL",
+ "type": "MODEL",
+ "slot_index": 0,
+ "links": [
+ 112
+ ]
+ }
+ ],
+ "properties": {
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45",
+ "Node name for S&R": "UNETLoader",
+ "models": [
+ {
+ "name": "wan2.2_i2v_low_noise_14B_fp8_scaled.safetensors",
+ "url": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_i2v_low_noise_14B_fp8_scaled.safetensors",
+ "directory": "diffusion_models"
+ }
+ ]
+ },
+ "widgets_values": [
+ "wan2.2_i2v_low_noise_14B_fp16.safetensors",
+ "default"
+ ]
+ }
+ ],
+ "links": [
+ [
+ 74,
+ 38,
+ 0,
+ 6,
+ 0,
+ "CLIP"
+ ],
+ [
+ 75,
+ 38,
+ 0,
+ 7,
+ 0,
+ "CLIP"
+ ],
+ [
+ 76,
+ 39,
+ 0,
+ 8,
+ 1,
+ "VAE"
+ ],
+ [
+ 110,
+ 37,
+ 0,
+ 54,
+ 0,
+ "MODEL"
+ ],
+ [
+ 112,
+ 56,
+ 0,
+ 55,
+ 0,
+ "MODEL"
+ ],
+ [
+ 113,
+ 57,
+ 0,
+ 58,
+ 3,
+ "LATENT"
+ ],
+ [
+ 124,
+ 58,
+ 0,
+ 8,
+ 0,
+ "LATENT"
+ ],
+ [
+ 131,
+ 8,
+ 0,
+ 60,
+ 0,
+ "IMAGE"
+ ],
+ [
+ 132,
+ 60,
+ 0,
+ 61,
+ 0,
+ "VIDEO"
+ ],
+ [
+ 133,
+ 62,
+ 0,
+ 63,
+ 4,
+ "IMAGE"
+ ],
+ [
+ 134,
+ 6,
+ 0,
+ 63,
+ 0,
+ "CONDITIONING"
+ ],
+ [
+ 135,
+ 7,
+ 0,
+ 63,
+ 1,
+ "CONDITIONING"
+ ],
+ [
+ 136,
+ 63,
+ 0,
+ 57,
+ 1,
+ "CONDITIONING"
+ ],
+ [
+ 137,
+ 63,
+ 1,
+ 57,
+ 2,
+ "CONDITIONING"
+ ],
+ [
+ 138,
+ 63,
+ 0,
+ 58,
+ 1,
+ "CONDITIONING"
+ ],
+ [
+ 139,
+ 63,
+ 1,
+ 58,
+ 2,
+ "CONDITIONING"
+ ],
+ [
+ 140,
+ 63,
+ 2,
+ 57,
+ 3,
+ "LATENT"
+ ],
+ [
+ 141,
+ 39,
+ 0,
+ 63,
+ 2,
+ "VAE"
+ ],
+ [
+ 147,
+ 54,
+ 0,
+ 57,
+ 0,
+ "MODEL"
+ ],
+ [
+ 148,
+ 55,
+ 0,
+ 58,
+ 0,
+ "MODEL"
+ ]
+ ],
+ "groups": [
+ {
+ "id": 1,
+ "title": "Step1 - Load models",
+ "bounding": [
+ 20,
+ -150,
+ 371.0310363769531,
+ 571.3974609375
+ ],
+ "color": "#3f789e",
+ "font_size": 24,
+ "flags": {}
+ },
+ {
+ "id": 2,
+ "title": "Step2 - Upload start_image",
+ "bounding": [
+ 20,
+ 450,
+ 370,
+ 470
+ ],
+ "color": "#3f789e",
+ "font_size": 24,
+ "flags": {}
+ },
+ {
+ "id": 3,
+ "title": "Step4 - Prompt",
+ "bounding": [
+ 410,
+ 140,
+ 445.27801513671875,
+ 464.2060852050781
+ ],
+ "color": "#3f789e",
+ "font_size": 24,
+ "flags": {}
+ },
+ {
+ "id": 4,
+ "title": "Step3 - Video size & length",
+ "bounding": [
+ 410,
+ 620,
+ 440,
+ 300
+ ],
+ "color": "#3f789e",
+ "font_size": 24,
+ "flags": {}
+ }
+ ],
+ "config": {},
+ "extra": {
+ "ds": {
+ "scale": 2.633312543060961,
+ "offset": [
+ 219.21866831960668,
+ 167.340112436342
+ ]
+ },
+ "frontendVersion": "1.23.4",
+ "VHS_latentpreview": false,
+ "VHS_latentpreviewrate": 0,
+ "VHS_MetadataImage": true,
+ "VHS_KeepIntermediate": true
+ },
+ "version": 0.4
+}
\ No newline at end of file
diff --git a/episode_20/comfyui_wan2_2_14B_t2v.json b/episode_20/comfyui_wan2_2_14B_t2v.json
new file mode 100644
index 0000000..2390931
--- /dev/null
+++ b/episode_20/comfyui_wan2_2_14B_t2v.json
@@ -0,0 +1,840 @@
+{
+ "id": "ec7da562-7e21-4dac-a0d2-f4441e1efd3b",
+ "revision": 0,
+ "last_node_id": 62,
+ "last_link_id": 132,
+ "nodes": [
+ {
+ "id": 38,
+ "type": "CLIPLoader",
+ "pos": [
+ 38.86457061767578,
+ 189.26513671875
+ ],
+ "size": [
+ 346.391845703125,
+ 106
+ ],
+ "flags": {},
+ "order": 0,
+ "mode": 0,
+ "inputs": [],
+ "outputs": [
+ {
+ "name": "CLIP",
+ "type": "CLIP",
+ "slot_index": 0,
+ "links": [
+ 74,
+ 75
+ ]
+ }
+ ],
+ "properties": {
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45",
+ "Node name for S&R": "CLIPLoader",
+ "models": [
+ {
+ "name": "umt5_xxl_fp8_e4m3fn_scaled.safetensors",
+ "url": "https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors",
+ "directory": "text_encoders"
+ }
+ ]
+ },
+ "widgets_values": [
+ "umt5_xxl_fp8_e4m3fn_scaled.safetensors",
+ "wan",
+ "default"
+ ]
+ },
+ {
+ "id": 7,
+ "type": "CLIPTextEncode",
+ "pos": [
+ 420,
+ 480
+ ],
+ "size": [
+ 425.27801513671875,
+ 180.6060791015625
+ ],
+ "flags": {},
+ "order": 7,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "clip",
+ "type": "CLIP",
+ "link": 75
+ }
+ ],
+ "outputs": [
+ {
+ "name": "CONDITIONING",
+ "type": "CONDITIONING",
+ "slot_index": 0,
+ "links": [
+ 129,
+ 130
+ ]
+ }
+ ],
+ "title": "CLIP Text Encode (Negative Prompt)",
+ "properties": {
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45",
+ "Node name for S&R": "CLIPTextEncode"
+ },
+ "widgets_values": [
+ "色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走"
+ ],
+ "color": "#322",
+ "bgcolor": "#533"
+ },
+ {
+ "id": 39,
+ "type": "VAELoader",
+ "pos": [
+ 40,
+ 350
+ ],
+ "size": [
+ 344.731689453125,
+ 59.98149108886719
+ ],
+ "flags": {},
+ "order": 1,
+ "mode": 0,
+ "inputs": [],
+ "outputs": [
+ {
+ "name": "VAE",
+ "type": "VAE",
+ "slot_index": 0,
+ "links": [
+ 76
+ ]
+ }
+ ],
+ "properties": {
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45",
+ "Node name for S&R": "VAELoader",
+ "models": [
+ {
+ "name": "wan_2.1_vae.safetensors",
+ "url": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/vae/wan_2.1_vae.safetensors",
+ "directory": "vae"
+ }
+ ]
+ },
+ "widgets_values": [
+ "wan_2.1_vae.safetensors"
+ ]
+ },
+ {
+ "id": 54,
+ "type": "ModelSamplingSD3",
+ "pos": [
+ 640,
+ -70
+ ],
+ "size": [
+ 210,
+ 60
+ ],
+ "flags": {},
+ "order": 8,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "model",
+ "type": "MODEL",
+ "link": 110
+ }
+ ],
+ "outputs": [
+ {
+ "name": "MODEL",
+ "type": "MODEL",
+ "slot_index": 0,
+ "links": [
+ 125
+ ]
+ }
+ ],
+ "properties": {
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45",
+ "Node name for S&R": "ModelSamplingSD3"
+ },
+ "widgets_values": [
+ 8.000000000000002
+ ]
+ },
+ {
+ "id": 55,
+ "type": "ModelSamplingSD3",
+ "pos": [
+ 640,
+ 60
+ ],
+ "size": [
+ 210,
+ 58
+ ],
+ "flags": {},
+ "order": 9,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "model",
+ "type": "MODEL",
+ "link": 112
+ }
+ ],
+ "outputs": [
+ {
+ "name": "MODEL",
+ "type": "MODEL",
+ "slot_index": 0,
+ "links": [
+ 123
+ ]
+ }
+ ],
+ "properties": {
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45",
+ "Node name for S&R": "ModelSamplingSD3"
+ },
+ "widgets_values": [
+ 8
+ ]
+ },
+ {
+ "id": 58,
+ "type": "KSamplerAdvanced",
+ "pos": [
+ 890,
+ 360
+ ],
+ "size": [
+ 304.748046875,
+ 498.6905822753906
+ ],
+ "flags": {},
+ "order": 11,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "model",
+ "type": "MODEL",
+ "link": 123
+ },
+ {
+ "name": "positive",
+ "type": "CONDITIONING",
+ "link": 128
+ },
+ {
+ "name": "negative",
+ "type": "CONDITIONING",
+ "link": 130
+ },
+ {
+ "name": "latent_image",
+ "type": "LATENT",
+ "link": 113
+ }
+ ],
+ "outputs": [
+ {
+ "name": "LATENT",
+ "type": "LATENT",
+ "links": [
+ 124
+ ]
+ }
+ ],
+ "properties": {
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45",
+ "Node name for S&R": "KSamplerAdvanced"
+ },
+ "widgets_values": [
+ "disable",
+ 0,
+ "fixed",
+ 20,
+ 3.5,
+ "euler",
+ "simple",
+ 10,
+ 10000,
+ "disable"
+ ]
+ },
+ {
+ "id": 57,
+ "type": "KSamplerAdvanced",
+ "pos": [
+ 890,
+ -60
+ ],
+ "size": [
+ 304.748046875,
+ 334
+ ],
+ "flags": {},
+ "order": 10,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "model",
+ "type": "MODEL",
+ "link": 125
+ },
+ {
+ "name": "positive",
+ "type": "CONDITIONING",
+ "link": 127
+ },
+ {
+ "name": "negative",
+ "type": "CONDITIONING",
+ "link": 129
+ },
+ {
+ "name": "latent_image",
+ "type": "LATENT",
+ "link": 126
+ }
+ ],
+ "outputs": [
+ {
+ "name": "LATENT",
+ "type": "LATENT",
+ "links": [
+ 113
+ ]
+ }
+ ],
+ "properties": {
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45",
+ "Node name for S&R": "KSamplerAdvanced"
+ },
+ "widgets_values": [
+ "enable",
+ 774388746670969,
+ "randomize",
+ 20,
+ 3.5,
+ "euler",
+ "simple",
+ 0,
+ 10,
+ "enable"
+ ]
+ },
+ {
+ "id": 8,
+ "type": "VAEDecode",
+ "pos": [
+ 1240,
+ -40
+ ],
+ "size": [
+ 210,
+ 46
+ ],
+ "flags": {},
+ "order": 12,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "samples",
+ "type": "LATENT",
+ "link": 124
+ },
+ {
+ "name": "vae",
+ "type": "VAE",
+ "link": 76
+ }
+ ],
+ "outputs": [
+ {
+ "name": "IMAGE",
+ "type": "IMAGE",
+ "slot_index": 0,
+ "links": [
+ 131
+ ]
+ }
+ ],
+ "properties": {
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45",
+ "Node name for S&R": "VAEDecode"
+ },
+ "widgets_values": []
+ },
+ {
+ "id": 61,
+ "type": "SaveVideo",
+ "pos": [
+ 1240,
+ 190
+ ],
+ "size": [
+ 710,
+ 660
+ ],
+ "flags": {},
+ "order": 14,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "video",
+ "type": "VIDEO",
+ "link": 132
+ }
+ ],
+ "outputs": [],
+ "properties": {
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45",
+ "Node name for S&R": "SaveVideo"
+ },
+ "widgets_values": [
+ "video/ComfyUI",
+ "auto",
+ "auto"
+ ]
+ },
+ {
+ "id": 6,
+ "type": "CLIPTextEncode",
+ "pos": [
+ 420,
+ 280
+ ],
+ "size": [
+ 422.84503173828125,
+ 164.31304931640625
+ ],
+ "flags": {},
+ "order": 6,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "clip",
+ "type": "CLIP",
+ "link": 74
+ }
+ ],
+ "outputs": [
+ {
+ "name": "CONDITIONING",
+ "type": "CONDITIONING",
+ "slot_index": 0,
+ "links": [
+ 127,
+ 128
+ ]
+ }
+ ],
+ "title": "CLIP Text Encode (Positive Prompt)",
+ "properties": {
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45",
+ "Node name for S&R": "CLIPTextEncode"
+ },
+ "widgets_values": [
+ "A close-up of a young woman smiling gently in the rain, raindrops glistening on her face and eyelashes. The video captures the delicate details of her expression and the water droplets, with soft light reflecting off her skin in the rainy atmosphere."
+ ],
+ "color": "#232",
+ "bgcolor": "#353"
+ },
+ {
+ "id": 62,
+ "type": "MarkdownNote",
+ "pos": [
+ -480,
+ -120
+ ],
+ "size": [
+ 480,
+ 350
+ ],
+ "flags": {},
+ "order": 2,
+ "mode": 0,
+ "inputs": [],
+ "outputs": [],
+ "title": "Model Links",
+ "properties": {},
+ "widgets_values": [
+ "[Tutorial](https://docs.comfy.org/tutorials/video/wan/wan2_2\n) | [教程](https://docs.comfy.org/zh-CN/tutorials/video/wan/wan2_2\n)\n\n**Diffusion Model**\n- [wan2.2_t2v_high_noise_14B_fp8_scaled.safetensors](https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_t2v_high_noise_14B_fp8_scaled.safetensors)\n- [wan2.2_t2v_low_noise_14B_fp8_scaled.safetensors](https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_t2v_low_noise_14B_fp8_scaled.safetensors)\n\n**VAE**\n- [wan_2.1_vae.safetensors](https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/vae/wan_2.1_vae.safetensors)\n\n**Text Encoder** \n- [umt5_xxl_fp8_e4m3fn_scaled.safetensors](https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors)\n\n\nFile save location\n\n```\nComfyUI/\n├───📂 models/\n│ ├───📂 diffusion_models/\n│ │ ├─── wan2.2_t2v_low_noise_14B_fp8_scaled.safetensors\n│ │ └─── wan2.2_t2v_high_noise_14B_fp8_scaled.safetensors\n│ ├───📂 text_encoders/\n│ │ └─── umt5_xxl_fp8_e4m3fn_scaled.safetensors \n│ └───📂 vae/\n│ └── wan_2.1_vae.safetensors\n```\n"
+ ],
+ "color": "#432",
+ "bgcolor": "#653"
+ },
+ {
+ "id": 60,
+ "type": "CreateVideo",
+ "pos": [
+ 1240,
+ 60
+ ],
+ "size": [
+ 270,
+ 78
+ ],
+ "flags": {},
+ "order": 13,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "images",
+ "type": "IMAGE",
+ "link": 131
+ },
+ {
+ "name": "audio",
+ "shape": 7,
+ "type": "AUDIO",
+ "link": null
+ }
+ ],
+ "outputs": [
+ {
+ "name": "VIDEO",
+ "type": "VIDEO",
+ "links": [
+ 132
+ ]
+ }
+ ],
+ "properties": {
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45",
+ "Node name for S&R": "CreateVideo"
+ },
+ "widgets_values": [
+ 16
+ ]
+ },
+ {
+ "id": 59,
+ "type": "EmptyHunyuanLatentVideo",
+ "pos": [
+ 50,
+ 530
+ ],
+ "size": [
+ 315,
+ 130
+ ],
+ "flags": {},
+ "order": 3,
+ "mode": 0,
+ "inputs": [],
+ "outputs": [
+ {
+ "name": "LATENT",
+ "type": "LATENT",
+ "slot_index": 0,
+ "links": [
+ 126
+ ]
+ }
+ ],
+ "properties": {
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45",
+ "Node name for S&R": "EmptyHunyuanLatentVideo"
+ },
+ "widgets_values": [
+ 1280,
+ 704,
+ 81,
+ 1
+ ]
+ },
+ {
+ "id": 37,
+ "type": "UNETLoader",
+ "pos": [
+ 34.225364685058594,
+ -71.77911376953125
+ ],
+ "size": [
+ 346.7470703125,
+ 82
+ ],
+ "flags": {},
+ "order": 4,
+ "mode": 0,
+ "inputs": [],
+ "outputs": [
+ {
+ "name": "MODEL",
+ "type": "MODEL",
+ "slot_index": 0,
+ "links": [
+ 110
+ ]
+ }
+ ],
+ "properties": {
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45",
+ "Node name for S&R": "UNETLoader",
+ "models": [
+ {
+ "name": "wan2.2_t2v_high_noise_14B_fp8_scaled.safetensors",
+ "url": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_t2v_high_noise_14B_fp8_scaled.safetensors",
+ "directory": "diffusion_models"
+ }
+ ]
+ },
+ "widgets_values": [
+ "wan2.2_t2v_high_noise_14B_fp16.safetensors",
+ "default"
+ ]
+ },
+ {
+ "id": 56,
+ "type": "UNETLoader",
+ "pos": [
+ 34.70310592651367,
+ 57.175601959228516
+ ],
+ "size": [
+ 346.7470703125,
+ 82
+ ],
+ "flags": {},
+ "order": 5,
+ "mode": 0,
+ "inputs": [],
+ "outputs": [
+ {
+ "name": "MODEL",
+ "type": "MODEL",
+ "slot_index": 0,
+ "links": [
+ 112
+ ]
+ }
+ ],
+ "properties": {
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45",
+ "Node name for S&R": "UNETLoader",
+ "models": [
+ {
+ "name": "wan2.2_t2v_low_noise_14B_fp8_scaled.safetensors",
+ "url": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_t2v_low_noise_14B_fp8_scaled.safetensors",
+ "directory": "diffusion_models"
+ }
+ ]
+ },
+ "widgets_values": [
+ "wan2.2_t2v_low_noise_14B_fp16.safetensors",
+ "default"
+ ]
+ }
+ ],
+ "links": [
+ [
+ 74,
+ 38,
+ 0,
+ 6,
+ 0,
+ "CLIP"
+ ],
+ [
+ 75,
+ 38,
+ 0,
+ 7,
+ 0,
+ "CLIP"
+ ],
+ [
+ 76,
+ 39,
+ 0,
+ 8,
+ 1,
+ "VAE"
+ ],
+ [
+ 110,
+ 37,
+ 0,
+ 54,
+ 0,
+ "MODEL"
+ ],
+ [
+ 112,
+ 56,
+ 0,
+ 55,
+ 0,
+ "MODEL"
+ ],
+ [
+ 113,
+ 57,
+ 0,
+ 58,
+ 3,
+ "LATENT"
+ ],
+ [
+ 123,
+ 55,
+ 0,
+ 58,
+ 0,
+ "MODEL"
+ ],
+ [
+ 124,
+ 58,
+ 0,
+ 8,
+ 0,
+ "LATENT"
+ ],
+ [
+ 125,
+ 54,
+ 0,
+ 57,
+ 0,
+ "MODEL"
+ ],
+ [
+ 126,
+ 59,
+ 0,
+ 57,
+ 3,
+ "LATENT"
+ ],
+ [
+ 127,
+ 6,
+ 0,
+ 57,
+ 1,
+ "CONDITIONING"
+ ],
+ [
+ 128,
+ 6,
+ 0,
+ 58,
+ 1,
+ "CONDITIONING"
+ ],
+ [
+ 129,
+ 7,
+ 0,
+ 57,
+ 2,
+ "CONDITIONING"
+ ],
+ [
+ 130,
+ 7,
+ 0,
+ 58,
+ 2,
+ "CONDITIONING"
+ ],
+ [
+ 131,
+ 8,
+ 0,
+ 60,
+ 0,
+ "IMAGE"
+ ],
+ [
+ 132,
+ 60,
+ 0,
+ 61,
+ 0,
+ "VIDEO"
+ ]
+ ],
+ "groups": [
+ {
+ "id": 1,
+ "title": "Step1 - Load models",
+ "bounding": [
+ 20,
+ -150,
+ 371.0310363769531,
+ 571.3974609375
+ ],
+ "color": "#3f789e",
+ "font_size": 24,
+ "flags": {}
+ },
+ {
+ "id": 2,
+ "title": "Step2 - Video size",
+ "bounding": [
+ 20,
+ 450,
+ 367.5572814941406,
+ 222.82713317871094
+ ],
+ "color": "#3f789e",
+ "font_size": 24,
+ "flags": {}
+ },
+ {
+ "id": 3,
+ "title": "Step3 Prompt",
+ "bounding": [
+ 410,
+ 210,
+ 445.27801513671875,
+ 464.2060852050781
+ ],
+ "color": "#3f789e",
+ "font_size": 24,
+ "flags": {}
+ }
+ ],
+ "config": {},
+ "extra": {
+ "ds": {
+ "scale": 0.7627768444385938,
+ "offset": [
+ 545.8648234389126,
+ 129.25002062964947
+ ]
+ },
+ "frontendVersion": "1.23.4",
+ "VHS_latentpreview": false,
+ "VHS_latentpreviewrate": 0,
+ "VHS_MetadataImage": true,
+ "VHS_KeepIntermediate": true
+ },
+ "version": 0.4
+}
\ No newline at end of file
diff --git a/episode_20/comfyui_wan2_2_5B_ti2v.json b/episode_20/comfyui_wan2_2_5B_ti2v.json
new file mode 100644
index 0000000..3234654
--- /dev/null
+++ b/episode_20/comfyui_wan2_2_5B_ti2v.json
@@ -0,0 +1,733 @@
+{
+ "id": "91f6bbe2-ed41-4fd6-bac7-71d5b5864ecb",
+ "revision": 0,
+ "last_node_id": 59,
+ "last_link_id": 108,
+ "nodes": [
+ {
+ "id": 37,
+ "type": "UNETLoader",
+ "pos": [
+ -30,
+ 50
+ ],
+ "size": [
+ 346.7470703125,
+ 82
+ ],
+ "flags": {},
+ "order": 0,
+ "mode": 0,
+ "inputs": [],
+ "outputs": [
+ {
+ "name": "MODEL",
+ "type": "MODEL",
+ "slot_index": 0,
+ "links": [
+ 94
+ ]
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "UNETLoader",
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45",
+ "models": [
+ {
+ "name": "wan2.2_ti2v_5B_fp16.safetensors",
+ "url": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_ti2v_5B_fp16.safetensors",
+ "directory": "diffusion_models"
+ }
+ ]
+ },
+ "widgets_values": [
+ "wan2.2_ti2v_5B_fp16.safetensors",
+ "default"
+ ]
+ },
+ {
+ "id": 38,
+ "type": "CLIPLoader",
+ "pos": [
+ -30,
+ 190
+ ],
+ "size": [
+ 350,
+ 110
+ ],
+ "flags": {},
+ "order": 1,
+ "mode": 0,
+ "inputs": [],
+ "outputs": [
+ {
+ "name": "CLIP",
+ "type": "CLIP",
+ "slot_index": 0,
+ "links": [
+ 74,
+ 75
+ ]
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "CLIPLoader",
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45",
+ "models": [
+ {
+ "name": "umt5_xxl_fp8_e4m3fn_scaled.safetensors",
+ "url": "https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors",
+ "directory": "text_encoders"
+ }
+ ]
+ },
+ "widgets_values": [
+ "umt5_xxl_fp8_e4m3fn_scaled.safetensors",
+ "wan",
+ "default"
+ ]
+ },
+ {
+ "id": 39,
+ "type": "VAELoader",
+ "pos": [
+ -30,
+ 350
+ ],
+ "size": [
+ 350,
+ 60
+ ],
+ "flags": {},
+ "order": 2,
+ "mode": 0,
+ "inputs": [],
+ "outputs": [
+ {
+ "name": "VAE",
+ "type": "VAE",
+ "slot_index": 0,
+ "links": [
+ 76,
+ 105
+ ]
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "VAELoader",
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45",
+ "models": [
+ {
+ "name": "wan2.2_vae.safetensors",
+ "url": "https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/vae/wan2.2_vae.safetensors",
+ "directory": "vae"
+ }
+ ]
+ },
+ "widgets_values": [
+ "wan2.2_vae.safetensors"
+ ]
+ },
+ {
+ "id": 8,
+ "type": "VAEDecode",
+ "pos": [
+ 1190,
+ 150
+ ],
+ "size": [
+ 210,
+ 46
+ ],
+ "flags": {},
+ "order": 10,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "samples",
+ "type": "LATENT",
+ "link": 35
+ },
+ {
+ "name": "vae",
+ "type": "VAE",
+ "link": 76
+ }
+ ],
+ "outputs": [
+ {
+ "name": "IMAGE",
+ "type": "IMAGE",
+ "slot_index": 0,
+ "links": [
+ 107
+ ]
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "VAEDecode",
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45"
+ },
+ "widgets_values": []
+ },
+ {
+ "id": 57,
+ "type": "CreateVideo",
+ "pos": [
+ 1200,
+ 240
+ ],
+ "size": [
+ 270,
+ 78
+ ],
+ "flags": {},
+ "order": 11,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "images",
+ "type": "IMAGE",
+ "link": 107
+ },
+ {
+ "name": "audio",
+ "shape": 7,
+ "type": "AUDIO",
+ "link": null
+ }
+ ],
+ "outputs": [
+ {
+ "name": "VIDEO",
+ "type": "VIDEO",
+ "links": [
+ 108
+ ]
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "CreateVideo",
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45"
+ },
+ "widgets_values": [
+ 24
+ ]
+ },
+ {
+ "id": 58,
+ "type": "SaveVideo",
+ "pos": [
+ 1200,
+ 370
+ ],
+ "size": [
+ 660,
+ 450
+ ],
+ "flags": {},
+ "order": 12,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "video",
+ "type": "VIDEO",
+ "link": 108
+ }
+ ],
+ "outputs": [],
+ "properties": {
+ "Node name for S&R": "SaveVideo",
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45"
+ },
+ "widgets_values": [
+ "video/ComfyUI",
+ "auto",
+ "auto"
+ ]
+ },
+ {
+ "id": 55,
+ "type": "Wan22ImageToVideoLatent",
+ "pos": [
+ 380,
+ 540
+ ],
+ "size": [
+ 271.9126892089844,
+ 150
+ ],
+ "flags": {},
+ "order": 8,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "vae",
+ "type": "VAE",
+ "link": 105
+ },
+ {
+ "name": "start_image",
+ "shape": 7,
+ "type": "IMAGE",
+ "link": 106
+ }
+ ],
+ "outputs": [
+ {
+ "name": "LATENT",
+ "type": "LATENT",
+ "links": [
+ 104
+ ]
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "Wan22ImageToVideoLatent",
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45"
+ },
+ "widgets_values": [
+ 1280,
+ 704,
+ 121,
+ 1
+ ]
+ },
+ {
+ "id": 56,
+ "type": "LoadImage",
+ "pos": [
+ 0,
+ 540
+ ],
+ "size": [
+ 274.080078125,
+ 314
+ ],
+ "flags": {},
+ "order": 3,
+ "mode": 4,
+ "inputs": [],
+ "outputs": [
+ {
+ "name": "IMAGE",
+ "type": "IMAGE",
+ "links": [
+ 106
+ ]
+ },
+ {
+ "name": "MASK",
+ "type": "MASK",
+ "links": null
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "LoadImage",
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45"
+ },
+ "widgets_values": [
+ "example.png",
+ "image"
+ ]
+ },
+ {
+ "id": 7,
+ "type": "CLIPTextEncode",
+ "pos": [
+ 380,
+ 260
+ ],
+ "size": [
+ 425.27801513671875,
+ 180.6060791015625
+ ],
+ "flags": {},
+ "order": 7,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "clip",
+ "type": "CLIP",
+ "link": 75
+ }
+ ],
+ "outputs": [
+ {
+ "name": "CONDITIONING",
+ "type": "CONDITIONING",
+ "slot_index": 0,
+ "links": [
+ 52
+ ]
+ }
+ ],
+ "title": "CLIP Text Encode (Negative Prompt)",
+ "properties": {
+ "Node name for S&R": "CLIPTextEncode",
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45"
+ },
+ "widgets_values": [
+ "色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走"
+ ],
+ "color": "#322",
+ "bgcolor": "#533"
+ },
+ {
+ "id": 59,
+ "type": "MarkdownNote",
+ "pos": [
+ -550,
+ 10
+ ],
+ "size": [
+ 480,
+ 340
+ ],
+ "flags": {},
+ "order": 4,
+ "mode": 0,
+ "inputs": [],
+ "outputs": [],
+ "title": "Model Links",
+ "properties": {},
+ "widgets_values": [
+ "[Tutorial](https://docs.comfy.org/tutorials/video/wan/wan2_2\n) | [教程](https://docs.comfy.org/zh-CN/tutorials/video/wan/wan2_2\n)\n\n**Diffusion Model**\n- [wan2.2_ti2v_5B_fp16.safetensors](https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/diffusion_models/wan2.2_ti2v_5B_fp16.safetensors)\n\n**VAE**\n- [wan2.2_vae.safetensors](https://huggingface.co/Comfy-Org/Wan_2.2_ComfyUI_Repackaged/resolve/main/split_files/vae/wan2.2_vae.safetensors)\n\n**Text Encoder** \n- [umt5_xxl_fp8_e4m3fn_scaled.safetensors](https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors)\n\n\nFile save location\n\n```\nComfyUI/\n├───📂 models/\n│ ├───📂 diffusion_models/\n│ │ └───wan2.2_ti2v_5B_fp16.safetensors\n│ ├───📂 text_encoders/\n│ │ └─── umt5_xxl_fp8_e4m3fn_scaled.safetensors \n│ └───📂 vae/\n│ └── wan2.2_vae.safetensors\n```\n"
+ ],
+ "color": "#432",
+ "bgcolor": "#653"
+ },
+ {
+ "id": 6,
+ "type": "CLIPTextEncode",
+ "pos": [
+ 380,
+ 50
+ ],
+ "size": [
+ 422.84503173828125,
+ 164.31304931640625
+ ],
+ "flags": {},
+ "order": 6,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "clip",
+ "type": "CLIP",
+ "link": 74
+ }
+ ],
+ "outputs": [
+ {
+ "name": "CONDITIONING",
+ "type": "CONDITIONING",
+ "slot_index": 0,
+ "links": [
+ 46
+ ]
+ }
+ ],
+ "title": "CLIP Text Encode (Positive Prompt)",
+ "properties": {
+ "Node name for S&R": "CLIPTextEncode",
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45"
+ },
+ "widgets_values": [
+ "Low contrast. In a retro 1970s-style subway station, a street musician plays in dim colors and rough textures. He wears an old jacket, playing guitar with focus. Commuters hurry by, and a small crowd gathers to listen. The camera slowly moves right, capturing the blend of music and city noise, with old subway signs and mottled walls in the background."
+ ],
+ "color": "#232",
+ "bgcolor": "#353"
+ },
+ {
+ "id": 3,
+ "type": "KSampler",
+ "pos": [
+ 850,
+ 130
+ ],
+ "size": [
+ 315,
+ 262
+ ],
+ "flags": {},
+ "order": 9,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "model",
+ "type": "MODEL",
+ "link": 95
+ },
+ {
+ "name": "positive",
+ "type": "CONDITIONING",
+ "link": 46
+ },
+ {
+ "name": "negative",
+ "type": "CONDITIONING",
+ "link": 52
+ },
+ {
+ "name": "latent_image",
+ "type": "LATENT",
+ "link": 104
+ }
+ ],
+ "outputs": [
+ {
+ "name": "LATENT",
+ "type": "LATENT",
+ "slot_index": 0,
+ "links": [
+ 35
+ ]
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "KSampler",
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45"
+ },
+ "widgets_values": [
+ 898471028164125,
+ "randomize",
+ 20,
+ 5,
+ "uni_pc",
+ "simple",
+ 1
+ ]
+ },
+ {
+ "id": 48,
+ "type": "ModelSamplingSD3",
+ "pos": [
+ 850,
+ 20
+ ],
+ "size": [
+ 210,
+ 58
+ ],
+ "flags": {
+ "collapsed": false
+ },
+ "order": 5,
+ "mode": 0,
+ "inputs": [
+ {
+ "name": "model",
+ "type": "MODEL",
+ "link": 94
+ }
+ ],
+ "outputs": [
+ {
+ "name": "MODEL",
+ "type": "MODEL",
+ "slot_index": 0,
+ "links": [
+ 95
+ ]
+ }
+ ],
+ "properties": {
+ "Node name for S&R": "ModelSamplingSD3",
+ "cnr_id": "comfy-core",
+ "ver": "0.3.45"
+ },
+ "widgets_values": [
+ 8
+ ]
+ }
+ ],
+ "links": [
+ [
+ 35,
+ 3,
+ 0,
+ 8,
+ 0,
+ "LATENT"
+ ],
+ [
+ 46,
+ 6,
+ 0,
+ 3,
+ 1,
+ "CONDITIONING"
+ ],
+ [
+ 52,
+ 7,
+ 0,
+ 3,
+ 2,
+ "CONDITIONING"
+ ],
+ [
+ 74,
+ 38,
+ 0,
+ 6,
+ 0,
+ "CLIP"
+ ],
+ [
+ 75,
+ 38,
+ 0,
+ 7,
+ 0,
+ "CLIP"
+ ],
+ [
+ 76,
+ 39,
+ 0,
+ 8,
+ 1,
+ "VAE"
+ ],
+ [
+ 94,
+ 37,
+ 0,
+ 48,
+ 0,
+ "MODEL"
+ ],
+ [
+ 95,
+ 48,
+ 0,
+ 3,
+ 0,
+ "MODEL"
+ ],
+ [
+ 104,
+ 55,
+ 0,
+ 3,
+ 3,
+ "LATENT"
+ ],
+ [
+ 105,
+ 39,
+ 0,
+ 55,
+ 0,
+ "VAE"
+ ],
+ [
+ 106,
+ 56,
+ 0,
+ 55,
+ 1,
+ "IMAGE"
+ ],
+ [
+ 107,
+ 8,
+ 0,
+ 57,
+ 0,
+ "IMAGE"
+ ],
+ [
+ 108,
+ 57,
+ 0,
+ 58,
+ 0,
+ "VIDEO"
+ ]
+ ],
+ "groups": [
+ {
+ "id": 1,
+ "title": "Step1 - Load models",
+ "bounding": [
+ -50,
+ -20,
+ 400,
+ 453.6000061035156
+ ],
+ "color": "#3f789e",
+ "font_size": 24,
+ "flags": {}
+ },
+ {
+ "id": 2,
+ "title": "Step3 - Prompt",
+ "bounding": [
+ 370,
+ -20,
+ 448.27801513671875,
+ 473.2060852050781
+ ],
+ "color": "#3f789e",
+ "font_size": 24,
+ "flags": {}
+ },
+ {
+ "id": 3,
+ "title": "For i2v, use Ctrl + B to enable",
+ "bounding": [
+ -50,
+ 450,
+ 400,
+ 420
+ ],
+ "color": "#3f789e",
+ "font_size": 24,
+ "flags": {}
+ },
+ {
+ "id": 4,
+ "title": "Video Size & length",
+ "bounding": [
+ 370,
+ 470,
+ 291.9127197265625,
+ 233.60000610351562
+ ],
+ "color": "#3f789e",
+ "font_size": 24,
+ "flags": {}
+ }
+ ],
+ "config": {},
+ "extra": {
+ "ds": {
+ "scale": 0.8390545288824454,
+ "offset": [
+ 252.56402822629002,
+ 99.17599442262053
+ ]
+ },
+ "frontendVersion": "1.25.1",
+ "VHS_latentpreview": false,
+ "VHS_latentpreviewrate": 0,
+ "VHS_MetadataImage": true,
+ "VHS_KeepIntermediate": true
+ },
+ "version": 0.4
+}
\ No newline at end of file
diff --git a/episode_20/modal_wan_comfyui_14b_i2v.py b/episode_20/modal_wan_comfyui_14b_i2v.py
new file mode 100644
index 0000000..27deb4c
--- /dev/null
+++ b/episode_20/modal_wan_comfyui_14b_i2v.py
@@ -0,0 +1,107 @@
+import subprocess
+import os
+import modal
+
+image = ( # build up a Modal Image to run ComfyUI, step by step
+ modal.Image.debian_slim(python_version="3.11") # start from basic Linux with Python
+ .apt_install("git") # install git to clone ComfyUI
+ .pip_install("fastapi[standard]==0.115.4") # install web dependencies
+ .pip_install("comfy-cli==1.4.1") # install comfy-cli
+ .run_commands( # use comfy-cli to install ComfyUI and its dependencies
+ "comfy --skip-prompt install --fast-deps --nvidia --version 0.3.47"
+ )
+)
+
+# ## Downloading custom nodes
+image = image.run_commands( # download a custom node
+ "comfy node install --fast-deps [email protected]",
+ "git clone https://github.com/ChenDarYen/ComfyUI-NAG.git /root/comfy/ComfyUI/custom_nodes/ComfyUI-NAG",
+ "git clone https://github.com/kijai/ComfyUI-KJNodes.git /root/comfy/ComfyUI/custom_nodes/ComfyUI-KJNodes",
+ "git clone https://github.com/cubiq/ComfyUI_essentials.git /root/comfy/ComfyUI/custom_nodes/ComfyUI_essentials",
+)
+
+
+def hf_download():
+ from huggingface_hub import hf_hub_download
+
+ wan_model = hf_hub_download(
+ repo_id="Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
+ filename="split_files/diffusion_models/wan2.2_i2v_high_noise_14B_fp16.safetensors",
+ cache_dir="/cache",
+ )
+
+ subprocess.run(
+ f"ln -s {wan_model} /root/comfy/ComfyUI/models/diffusion_models/wan2.2_i2v_high_noise_14B_fp16.safetensors",
+ shell=True,
+ check=True,
+ )
+
+ wan_model_low_noise = hf_hub_download(
+ repo_id="Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
+ filename="split_files/diffusion_models/wan2.2_i2v_low_noise_14B_fp16.safetensors",
+ cache_dir="/cache",
+ )
+
+ subprocess.run(
+ f"ln -s {wan_model_low_noise} /root/comfy/ComfyUI/models/diffusion_models/wan2.2_i2v_low_noise_14B_fp16.safetensors",
+ shell=True,
+ check=True,
+ )
+
+ vae_model = hf_hub_download(
+ repo_id="Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
+ filename="split_files/vae/wan_2.1_vae.safetensors",
+ cache_dir="/cache",
+ )
+
+ subprocess.run(
+ f"ln -s {vae_model} /root/comfy/ComfyUI/models/vae/wan_2.1_vae.safetensors",
+ shell=True,
+ check=True,
+ )
+
+ t5_model = hf_hub_download(
+ repo_id="Comfy-Org/Wan_2.1_ComfyUI_repackaged",
+ filename="split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors",
+ cache_dir="/cache",
+ )
+
+ subprocess.run(
+ f"ln -s {t5_model} /root/comfy/ComfyUI/models/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors",
+ shell=True,
+ check=True,
+ )
+
+
+vol = modal.Volume.from_name("hf-hub-cache", create_if_missing=True)
+
+image = (
+ # install huggingface_hub with hf_transfer support to speed up downloads
+ image.pip_install("huggingface_hub[hf_transfer]>=0.34.0,<1.0")
+ .env({"HF_HUB_ENABLE_HF_TRANSFER": "1"})
+ .run_function(
+ hf_download,
+ # persist the HF cache to a Modal Volume so future runs don't re-download models
+ volumes={"/cache": vol},
+ )
+)
+
+## Running ComfyUI interactively
+
+# Spin up an interactive ComfyUI server by wrapping the `comfy launch` command in a Modal Function
+# and serving it as a [web server](https://modal.com/docs/guide/webhooks#non-asgi-web-servers).
+
+app = modal.App(name="example-comfyui", image=image)
+
+
+ max_containers=1, # limit interactive session to 1 container
+ gpu="L40S", # good starter GPU for inference
+ volumes={"/cache": vol}, # mounts our cached models
+)
+ max_inputs=10
+) # required for UI startup process which runs several API calls concurrently
[email protected]_server(8000, startup_timeout=60)
+def ui():
+ subprocess.Popen("comfy launch -- --listen 0.0.0.0 --port 8000", shell=True)
diff --git a/episode_20/modal_wan_comfyui_14b_t2v.py b/episode_20/modal_wan_comfyui_14b_t2v.py
new file mode 100644
index 0000000..a20a38d
--- /dev/null
+++ b/episode_20/modal_wan_comfyui_14b_t2v.py
@@ -0,0 +1,108 @@
+import subprocess
+import os
+import modal
+
+image = ( # build up a Modal Image to run ComfyUI, step by step
+ modal.Image.debian_slim(python_version="3.11") # start from basic Linux with Python
+ .apt_install("git") # install git to clone ComfyUI
+ .pip_install("fastapi[standard]==0.115.4") # install web dependencies
+ .pip_install("comfy-cli==1.4.1") # install comfy-cli
+ .run_commands( # use comfy-cli to install ComfyUI and its dependencies
+ "comfy --skip-prompt install --fast-deps --nvidia --version 0.3.47"
+ )
+)
+
+## Downloading custom nodes
+image = image.run_commands( # download a custom node
+ "comfy node install --fast-deps [email protected]",
+ "git clone https://github.com/ChenDarYen/ComfyUI-NAG.git /root/comfy/ComfyUI/custom_nodes/ComfyUI-NAG",
+ "git clone https://github.com/kijai/ComfyUI-KJNodes.git /root/comfy/ComfyUI/custom_nodes/ComfyUI-KJNodes",
+ "git clone https://github.com/cubiq/ComfyUI_essentials.git /root/comfy/ComfyUI/custom_nodes/ComfyUI_essentials",
+)
+
+
+def hf_download():
+ from huggingface_hub import hf_hub_download
+
+ wan_model = hf_hub_download(
+ repo_id="Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
+ filename="split_files/diffusion_models/wan2.2_t2v_high_noise_14B_fp16.safetensors",
+ cache_dir="/cache",
+ )
+
+ subprocess.run(
+ f"ln -s {wan_model} /root/comfy/ComfyUI/models/diffusion_models/wan2.2_t2v_high_noise_14B_fp16.safetensors",
+ shell=True,
+ check=True,
+ )
+
+ wan_model_low_noise = hf_hub_download(
+ repo_id="Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
+ filename="split_files/diffusion_models/wan2.2_t2v_low_noise_14B_fp16.safetensors",
+ cache_dir="/cache",
+ )
+
+ subprocess.run(
+ f"ln -s {wan_model_low_noise} /root/comfy/ComfyUI/models/diffusion_models/wan2.2_t2v_low_noise_14B_fp16.safetensors",
+ shell=True,
+ check=True,
+ )
+
+ vae_model = hf_hub_download(
+ repo_id="Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
+ filename="split_files/vae/wan_2.1_vae.safetensors",
+ cache_dir="/cache",
+ token=hf_token,
+ )
+
+ subprocess.run(
+ f"ln -s {vae_model} /root/comfy/ComfyUI/models/vae/wan_2.1_vae.safetensors",
+ shell=True,
+ check=True,
+ )
+
+ t5_model = hf_hub_download(
+ repo_id="Comfy-Org/Wan_2.1_ComfyUI_repackaged",
+ filename="split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors",
+ cache_dir="/cache",
+ )
+
+ subprocess.run(
+ f"ln -s {t5_model} /root/comfy/ComfyUI/models/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors",
+ shell=True,
+ check=True,
+ )
+
+
+vol = modal.Volume.from_name("hf-hub-cache", create_if_missing=True)
+
+image = (
+ # install huggingface_hub with hf_transfer support to speed up downloads
+ image.pip_install("huggingface_hub[hf_transfer]>=0.34.0,<1.0")
+ .env({"HF_HUB_ENABLE_HF_TRANSFER": "1"})
+ .run_function(
+ hf_download,
+ # persist the HF cache to a Modal Volume so future runs don't re-download models
+ volumes={"/cache": vol},
+ )
+)
+
+## Running ComfyUI interactively
+
+# Spin up an interactive ComfyUI server by wrapping the `comfy launch` command in a Modal Function
+# and serving it as a [web server](https://modal.com/docs/guide/webhooks#non-asgi-web-servers).
+
+app = modal.App(name="example-comfyui", image=image)
+
+
+ max_containers=1, # limit interactive session to 1 container
+ gpu="L40S", # good starter GPU for inference
+ volumes={"/cache": vol}, # mounts our cached models
+)
+ max_inputs=10
+) # required for UI startup process which runs several API calls concurrently
[email protected]_server(8000, startup_timeout=60)
+def ui():
+ subprocess.Popen("comfy launch -- --listen 0.0.0.0 --port 8000", shell=True)
diff --git a/episode_20/modal_wan_comfyui_5b.py b/episode_20/modal_wan_comfyui_5b.py
new file mode 100644
index 0000000..f3c6746
--- /dev/null
+++ b/episode_20/modal_wan_comfyui_5b.py
@@ -0,0 +1,96 @@
+import subprocess
+import modal
+
+image = ( # build up a Modal Image to run ComfyUI, step by step
+ modal.Image.debian_slim(python_version="3.11") # start from basic Linux with Python
+ .apt_install("git") # install git to clone ComfyUI
+ .pip_install("fastapi[standard]==0.115.4") # install web dependencies
+ .pip_install("comfy-cli==1.4.1") # install comfy-cli
+ .run_commands( # use comfy-cli to install ComfyUI and its dependencies
+ "comfy --skip-prompt install --fast-deps --nvidia --version 0.3.47"
+ )
+)
+
+## Downloading custom nodes
+image = image.run_commands( # download a custom node
+ "comfy node install --fast-deps [email protected]",
+ "git clone https://github.com/ChenDarYen/ComfyUI-NAG.git /root/comfy/ComfyUI/custom_nodes/ComfyUI-NAG",
+ "git clone https://github.com/kijai/ComfyUI-KJNodes.git /root/comfy/ComfyUI/custom_nodes/ComfyUI-KJNodes",
+ "git clone https://github.com/cubiq/ComfyUI_essentials.git /root/comfy/ComfyUI/custom_nodes/ComfyUI_essentials",
+)
+
+
+def hf_download():
+ from huggingface_hub import hf_hub_download
+
+ wan_model = hf_hub_download(
+ repo_id="Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
+ filename="split_files/diffusion_models/wan2.2_ti2v_5B_fp16.safetensors",
+ cache_dir="/cache",
+ )
+
+ subprocess.run(
+ f"ln -s {wan_model} /root/comfy/ComfyUI/models/diffusion_models/wan2.2_ti2v_5B_fp16.safetensors",
+ shell=True,
+ check=True,
+ )
+
+ vae_model = hf_hub_download(
+ repo_id="Comfy-Org/Wan_2.2_ComfyUI_Repackaged",
+ filename="split_files/vae/wan2.2_vae.safetensors",
+ cache_dir="/cache",
+ )
+
+ subprocess.run(
+ f"ln -s {vae_model} /root/comfy/ComfyUI/models/vae/wan2.2_vae.safetensors",
+ shell=True,
+ check=True,
+ )
+
+ # https://huggingface.co/Comfy-Org/Wan_2.1_ComfyUI_repackaged/resolve/main/split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors
+ text_encoder_model = hf_hub_download(
+ repo_id="Comfy-Org/Wan_2.1_ComfyUI_repackaged",
+ filename="split_files/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors",
+ cache_dir="/cache",
+ )
+
+ subprocess.run(
+ f"ln -s {text_encoder_model} /root/comfy/ComfyUI/models/text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors",
+ shell=True,
+ check=True,
+ )
+
+
+vol = modal.Volume.from_name("hf-hub-cache", create_if_missing=True)
+
+image = (
+ # install huggingface_hub with hf_transfer support to speed up downloads
+ image.pip_install("huggingface_hub[hf_transfer]>=0.34.0,<1.0")
+ .env({"HF_HUB_ENABLE_HF_TRANSFER": "1"})
+ .run_function(
+ hf_download,
+ # persist the HF cache to a Modal Volume so future runs don't re-download models
+ volumes={"/cache": vol},
+ )
+)
+
+
+# ## Running ComfyUI interactively
+
+# Spin up an interactive ComfyUI server by wrapping the `comfy launch` command in a Modal Function
+# and serving it as a [web server](https://modal.com/docs/guide/webhooks#non-asgi-web-servers).
+
+app = modal.App(name="example-comfyui", image=image)
+
+
+ max_containers=1, # limit interactive session to 1 container
+ gpu="L40S", # good starter GPU for inference
+ volumes={"/cache": vol}, # mounts our cached models
+)
+ max_inputs=10
+) # required for UI startup process which runs several API calls concurrently
[email protected]_server(8000, startup_timeout=60)
+def ui():
+ subprocess.Popen("comfy launch -- --listen 0.0.0.0 --port 8000", shell=True)
diff --git a/episode_20/n8n_wan_2.2_14b_i2v.json b/episode_20/n8n_wan_2.2_14b_i2v.json
new file mode 100644
index 0000000..8dd0e21
--- /dev/null
+++ b/episode_20/n8n_wan_2.2_14b_i2v.json
@@ -0,0 +1,487 @@
+{
+ "name": "ComfyUI: wan 2.2 14b - image 2 video",
+ "nodes": [
+ {
+ "parameters": {
+ "formTitle": "Upload reference images",
+ "formFields": {
+ "values": [
+ {
+ "fieldLabel": "Image",
+ "fieldType": "file",
+ "multipleFiles": false,
+ "acceptFileTypes": ".jpg, .png, .jpeg",
+ "requiredField": true
+ },
+ {
+ "fieldLabel": "prompt",
+ "fieldType": "textarea",
+ "placeholder": "what should happen on the video",
+ "requiredField": true
+ },
+ {
+ "fieldLabel": "Negative prompt",
+ "placeholder": "optional"
+ }
+ ]
+ },
+ "options": {}
+ },
+ "type": "n8n-nodes-base.formTrigger",
+ "typeVersion": 2.2,
+ "position": [
+ -1100,
+ -60
+ ],
+ "id": "833656f6-2f4a-4ae7-b989-3d8e541a420e",
+ "name": "On form submission",
+ "webhookId": "1446697c-ec54-4b3a-b0a4-d326809cbfe6"
+ },
+ {
+ "parameters": {
+ "assignments": {
+ "assignments": [
+ {
+ "id": "7d55d6da-a78c-4a28-9343-0ea9035a0aa3",
+ "name": "COMFY_URL",
+ "value": "={{ ((u) => { let s = u.trim(); if (!/^https?:\\/\\//i.test(s)) s = 'https://' + s; const parts = s.split('/'); return parts[0] + '//' + parts[2]; })($json.comfyui_url) }}",
+ "type": "string"
+ },
+ {
+ "id": "c491a696-6081-4e42-98f5-0c3b75c16edc",
+ "name": "NEGATIVE_PROMPT",
+ "value": "={{ $('On form submission').item.json['Negative prompt'] || $json.negative_prompt }}",
+ "type": "string"
+ },
+ {
+ "id": "e179a11b-ab0b-4772-b151-10b0b7d49a8c",
+ "name": "PROMPT",
+ "value": "={{ $('On form submission').item.json.prompt }}",
+ "type": "string"
+ }
+ ]
+ },
+ "options": {}
+ },
+ "type": "n8n-nodes-base.set",
+ "typeVersion": 3.4,
+ "position": [
+ -580,
+ -60
+ ],
+ "id": "a473f66e-ded6-43b2-a5ff-6a2f3e08012f",
+ "name": "Setup defaults"
+ },
+ {
+ "parameters": {
+ "url": "={{ $('Setup defaults').first().json.COMFY_URL }}/history/{{ $('Start the workflow with ComfyUI').first().json.prompt_id }}",
+ "options": {}
+ },
+ "type": "n8n-nodes-base.httpRequest",
+ "typeVersion": 4.2,
+ "position": [
+ 520,
+ -60
+ ],
+ "id": "caf89a6f-7097-4a86-9149-01ba95f19eac",
+ "name": "Get video generation status",
+ "retryOnFail": true
+ },
+ {
+ "parameters": {
+ "amount": 10
+ },
+ "type": "n8n-nodes-base.wait",
+ "typeVersion": 1.1,
+ "position": [
+ 320,
+ -60
+ ],
+ "id": "8bc5f8d0-7dc9-4531-aac6-81bda2471184",
+ "name": "Wait until the video gets generated",
+ "webhookId": "113055f5-52c2-43cf-b507-f09f6426d3e2"
+ },
+ {
+ "parameters": {
+ "conditions": {
+ "options": {
+ "caseSensitive": true,
+ "leftValue": "",
+ "typeValidation": "strict",
+ "version": 2
+ },
+ "conditions": [
+ {
+ "id": "5e89df7d-4c0e-4bd4-8a84-b1e28bdb1f7e",
+ "leftValue": "={{ $json.keys().length > 0 && $json[$('Start the workflow with ComfyUI').item.json.prompt_id] && $json[$('Start the workflow with ComfyUI').item.json.prompt_id].status.completed }}",
+ "rightValue": "",
+ "operator": {
+ "type": "boolean",
+ "operation": "true",
+ "singleValue": true
+ }
+ },
+ {
+ "id": "354e3206-bbe3-481d-876b-255eed39f7cf",
+ "leftValue": "",
+ "rightValue": "",
+ "operator": {
+ "type": "string",
+ "operation": "equals",
+ "name": "filter.operator.equals"
+ }
+ }
+ ],
+ "combinator": "and"
+ },
+ "options": {}
+ },
+ "type": "n8n-nodes-base.if",
+ "typeVersion": 2.2,
+ "position": [
+ 740,
+ -60
+ ],
+ "id": "54f97d31-3354-4eb9-8625-3de629717080",
+ "name": "Completed?"
+ },
+ {
+ "parameters": {
+ "conditions": {
+ "options": {
+ "caseSensitive": true,
+ "leftValue": "",
+ "typeValidation": "strict",
+ "version": 2
+ },
+ "conditions": [
+ {
+ "id": "9bfcdffd-8c7c-407d-b95c-83f8aa104845",
+ "leftValue": "={{ $json[$('Start the workflow with ComfyUI').item.json.prompt_id].status.status_str === 'success' }}",
+ "rightValue": "",
+ "operator": {
+ "type": "boolean",
+ "operation": "true",
+ "singleValue": true
+ }
+ }
+ ],
+ "combinator": "and"
+ },
+ "options": {}
+ },
+ "type": "n8n-nodes-base.if",
+ "typeVersion": 2.2,
+ "position": [
+ 1040,
+ -80
+ ],
+ "id": "76c35ad6-b3a6-426b-9d43-bdcffb46d53c",
+ "name": "Success?"
+ },
+ {
+ "parameters": {
+ "url": "={{ $('Setup defaults').first().json.COMFY_URL }}/view",
+ "sendQuery": true,
+ "queryParameters": {
+ "parameters": [
+ {
+ "name": "type",
+ "value": "output"
+ },
+ {
+ "name": "filename",
+ "value": "={{ $('Get video generation status').last().json[$('Start the workflow with ComfyUI').item.json.prompt_id].outputs.values().map(item => item.images).flat(Infinity).find(item => item.type === 'output').filename }}"
+ },
+ {
+ "name": "subfolder",
+ "value": "={{ $('Get video generation status').last().json[$('Start the workflow with ComfyUI').item.json.prompt_id].outputs['58'].images[0].subfolder }}"
+ }
+ ]
+ },
+ "sendBody": true,
+ "contentType": "form-urlencoded",
+ "bodyParameters": {
+ "parameters": [
+ {}
+ ]
+ },
+ "options": {
+ "redirect": {
+ "redirect": {}
+ }
+ }
+ },
+ "type": "n8n-nodes-base.httpRequest",
+ "typeVersion": 4.2,
+ "position": [
+ 1340,
+ -220
+ ],
+ "id": "b7d84c1b-1798-449c-ae1b-8ef0c1c91740",
+ "name": "HTTP Request"
+ },
+ {
+ "parameters": {
+ "errorMessage": "An error occoured while generating the image"
+ },
+ "type": "n8n-nodes-base.stopAndError",
+ "typeVersion": 1,
+ "position": [
+ 1340,
+ 0
+ ],
+ "id": "6c3f42d5-f2c5-43a7-ac58-3f142205150f",
+ "name": "Stop and Error"
+ },
+ {
+ "parameters": {
+ "content": "# Configure me",
+ "height": 420,
+ "width": 260,
+ "color": 3
+ },
+ "type": "n8n-nodes-base.stickyNote",
+ "typeVersion": 1,
+ "position": [
+ -900,
+ -260
+ ],
+ "id": "10c5a682-4743-4af4-bbb9-972639b2bb81",
+ "name": "Sticky Note"
+ },
+ {
+ "parameters": {
+ "assignments": {
+ "assignments": [
+ {
+ "id": "1ece166a-0536-4c3e-bf1f-e0d4ff300169",
+ "name": "workflow",
+ "value": "={\n \"6\": {\n \"inputs\": {\n \"text\": \"${PROMPT}\",\n \"clip\": [\n \"38\",\n 0\n ]\n },\n \"class_type\": \"CLIPTextEncode\",\n \"_meta\": {\n \"title\": \"CLIP Text Encode (Positive Prompt)\"\n }\n },\n \"7\": {\n \"inputs\": {\n \"text\": \"${NEGATIVE_PROMPT}\",\n \"clip\": [\n \"38\",\n 0\n ]\n },\n \"class_type\": \"CLIPTextEncode\",\n \"_meta\": {\n \"title\": \"CLIP Text Encode (Negative Prompt)\"\n }\n },\n \"8\": {\n \"inputs\": {\n \"samples\": [\n \"58\",\n 0\n ],\n \"vae\": [\n \"39\",\n 0\n ]\n },\n \"class_type\": \"VAEDecode\",\n \"_meta\": {\n \"title\": \"VAE Decode\"\n }\n },\n \"37\": {\n \"inputs\": {\n \"unet_name\": \"wan2.2_i2v_high_noise_14B_fp16.safetensors\",\n \"weight_dtype\": \"default\"\n },\n \"class_type\": \"UNETLoader\",\n \"_meta\": {\n \"title\": \"Load Diffusion Model\"\n }\n },\n \"38\": {\n \"inputs\": {\n \"clip_name\": \"umt5_xxl_fp8_e4m3fn_scaled.safetensors\",\n \"type\": \"wan\",\n \"device\": \"default\"\n },\n \"class_type\": \"CLIPLoader\",\n \"_meta\": {\n \"title\": \"Load CLIP\"\n }\n },\n \"39\": {\n \"inputs\": {\n \"vae_name\": \"wan_2.1_vae.safetensors\"\n },\n \"class_type\": \"VAELoader\",\n \"_meta\": {\n \"title\": \"Load VAE\"\n }\n },\n \"54\": {\n \"inputs\": {\n \"shift\": 8.000000000000002,\n \"model\": [\n \"37\",\n 0\n ]\n },\n \"class_type\": \"ModelSamplingSD3\",\n \"_meta\": {\n \"title\": \"ModelSamplingSD3\"\n }\n },\n \"55\": {\n \"inputs\": {\n \"shift\": 8,\n \"model\": [\n \"56\",\n 0\n ]\n },\n \"class_type\": \"ModelSamplingSD3\",\n \"_meta\": {\n \"title\": \"ModelSamplingSD3\"\n }\n },\n \"56\": {\n \"inputs\": {\n \"unet_name\": \"wan2.2_i2v_low_noise_14B_fp16.safetensors\",\n \"weight_dtype\": \"default\"\n },\n \"class_type\": \"UNETLoader\",\n \"_meta\": {\n \"title\": \"Load Diffusion Model\"\n }\n },\n \"57\": {\n \"inputs\": {\n \"add_noise\": \"enable\",\n \"noise_seed\": {{ (() => {\n const max = 0xFFFFFFFF - 1;\n const seed = Math.floor(Math.random() * max) + 1;\n return seed;\n})() }},\n \"steps\": 20,\n \"cfg\": 3.5,\n \"sampler_name\": \"euler\",\n \"scheduler\": \"simple\",\n \"start_at_step\": 0,\n \"end_at_step\": 10,\n \"return_with_leftover_noise\": \"enable\",\n \"model\": [\n \"54\",\n 0\n ],\n \"positive\": [\n \"63\",\n 0\n ],\n \"negative\": [\n \"63\",\n 1\n ],\n \"latent_image\": [\n \"63\",\n 2\n ]\n },\n \"class_type\": \"KSamplerAdvanced\",\n \"_meta\": {\n \"title\": \"KSampler (Advanced)\"\n }\n },\n \"58\": {\n \"inputs\": {\n \"add_noise\": \"disable\",\n \"noise_seed\": 0,\n \"steps\": 20,\n \"cfg\": 3.5,\n \"sampler_name\": \"euler\",\n \"scheduler\": \"simple\",\n \"start_at_step\": 10,\n \"end_at_step\": 10000,\n \"return_with_leftover_noise\": \"disable\",\n \"model\": [\n \"55\",\n 0\n ],\n \"positive\": [\n \"63\",\n 0\n ],\n \"negative\": [\n \"63\",\n 1\n ],\n \"latent_image\": [\n \"57\",\n 0\n ]\n },\n \"class_type\": \"KSamplerAdvanced\",\n \"_meta\": {\n \"title\": \"KSampler (Advanced)\"\n }\n },\n \"60\": {\n \"inputs\": {\n \"fps\": 16,\n \"images\": [\n \"8\",\n 0\n ]\n },\n \"class_type\": \"CreateVideo\",\n \"_meta\": {\n \"title\": \"Create Video\"\n }\n },\n \"61\": {\n \"inputs\": {\n \"filename_prefix\": \"video/ComfyUI\",\n \"format\": \"auto\",\n \"codec\": \"auto\",\n \"video\": [\n \"60\",\n 0\n ]\n },\n \"class_type\": \"SaveVideo\",\n \"_meta\": {\n \"title\": \"Save Video\"\n }\n },\n \"62\": {\n \"inputs\": {\n \"image\": \"${IMAGE}\"\n },\n \"class_type\": \"LoadImage\",\n \"_meta\": {\n \"title\": \"Load Image\"\n }\n },\n \"63\": {\n \"inputs\": {\n \"width\": 1280,\n \"height\": 704,\n \"length\": 81,\n \"batch_size\": 1,\n \"positive\": [\n \"6\",\n 0\n ],\n \"negative\": [\n \"7\",\n 0\n ],\n \"vae\": [\n \"39\",\n 0\n ],\n \"start_image\": [\n \"62\",\n 0\n ]\n },\n \"class_type\": \"WanImageToVideo\",\n \"_meta\": {\n \"title\": \"WanImageToVideo\"\n }\n }\n}",
+ "type": "string"
+ },
+ {
+ "id": "92df0709-c03c-400e-b2ac-1a8e3aff7416",
+ "name": "comfyui_url",
+ "value": "YOUR_COMFYUI_URL",
+ "type": "string"
+ },
+ {
+ "id": "fb621130-6eac-41ab-b514-576a0275f6b1",
+ "name": "negative_prompt",
+ "value": "色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走",
+ "type": "string"
+ }
+ ]
+ },
+ "options": {}
+ },
+ "type": "n8n-nodes-base.set",
+ "typeVersion": 3.4,
+ "position": [
+ -820,
+ -60
+ ],
+ "id": "1211892b-72ce-48ed-a3a2-34b11d860551",
+ "name": "Configure me"
+ },
+ {
+ "parameters": {
+ "jsCode": "return $('On form submission').first()"
+ },
+ "type": "n8n-nodes-base.code",
+ "typeVersion": 2,
+ "position": [
+ -400,
+ -60
+ ],
+ "id": "e3a1c16a-007a-4e13-83eb-74be27b3fb3e",
+ "name": "Relay image"
+ },
+ {
+ "parameters": {
+ "method": "POST",
+ "url": "={{ $('Setup defaults').first().json.COMFY_URL }}/upload/image",
+ "sendBody": true,
+ "contentType": "multipart-form-data",
+ "bodyParameters": {
+ "parameters": [
+ {
+ "parameterType": "formBinaryData",
+ "name": "image",
+ "inputDataFieldName": "Image"
+ }
+ ]
+ },
+ "options": {
+ "redirect": {
+ "redirect": {}
+ }
+ }
+ },
+ "type": "n8n-nodes-base.httpRequest",
+ "typeVersion": 4.2,
+ "position": [
+ -180,
+ -60
+ ],
+ "id": "f1a7c926-1913-40ad-bafe-6a3dd4318e16",
+ "name": "Upload image to ComfyUI"
+ },
+ {
+ "parameters": {
+ "method": "POST",
+ "url": "={{ $('Setup defaults').first().json.COMFY_URL }}/prompt",
+ "sendBody": true,
+ "specifyBody": "json",
+ "jsonBody": "={\n \"client_id\": \"n8n\",\n \"prompt\": {{ \n\n $('Configure me').item.json.workflow\n .replace('${IMAGE}', $json.name)\n .replace('${PROMPT}', $('Setup defaults').first().json.PROMPT)\n .replace('${NEGATIVE_PROMPT}', $('Setup defaults').first().json.NEGATIVE_PROMPT) \n\n}}\n}",
+ "options": {}
+ },
+ "type": "n8n-nodes-base.httpRequest",
+ "typeVersion": 4.2,
+ "position": [
+ 40,
+ -60
+ ],
+ "id": "2270de9b-391c-48c7-b00e-77198113fc5f",
+ "name": "Start the workflow with ComfyUI"
+ }
+ ],
+ "pinData": {},
+ "connections": {
+ "On form submission": {
+ "main": [
+ [
+ {
+ "node": "Configure me",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Setup defaults": {
+ "main": [
+ [
+ {
+ "node": "Relay image",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Get video generation status": {
+ "main": [
+ [
+ {
+ "node": "Completed?",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Wait until the video gets generated": {
+ "main": [
+ [
+ {
+ "node": "Get video generation status",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Completed?": {
+ "main": [
+ [
+ {
+ "node": "Success?",
+ "type": "main",
+ "index": 0
+ }
+ ],
+ [
+ {
+ "node": "Wait until the video gets generated",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Success?": {
+ "main": [
+ [
+ {
+ "node": "HTTP Request",
+ "type": "main",
+ "index": 0
+ }
+ ],
+ [
+ {
+ "node": "Stop and Error",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Configure me": {
+ "main": [
+ [
+ {
+ "node": "Setup defaults",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Relay image": {
+ "main": [
+ [
+ {
+ "node": "Upload image to ComfyUI",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Upload image to ComfyUI": {
+ "main": [
+ [
+ {
+ "node": "Start the workflow with ComfyUI",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Start the workflow with ComfyUI": {
+ "main": [
+ [
+ {
+ "node": "Wait until the video gets generated",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ }
+ },
+ "active": false,
+ "settings": {
+ "executionOrder": "v1"
+ },
+ "versionId": "8aaad365-48d0-440e-95e3-89c0adf56409",
+ "meta": {
+ "instanceId": "636db6b6ab21a21c6458e2137f340e33dc3e49f5a1c560c8d1e2372c227cf40e"
+ },
+ "id": "PxbrEy2tcKlNGO6g",
+ "tags": []
+}
\ No newline at end of file
diff --git a/episode_20/n8n_wan_2.2_14b_t2v.json b/episode_20/n8n_wan_2.2_14b_t2v.json
new file mode 100644
index 0000000..bcce5ff
--- /dev/null
+++ b/episode_20/n8n_wan_2.2_14b_t2v.json
@@ -0,0 +1,415 @@
+{
+ "name": "ComfyUI: wan 2.2 14b - text 2 video",
+ "nodes": [
+ {
+ "parameters": {
+ "formTitle": "Upload reference images",
+ "formFields": {
+ "values": [
+ {
+ "fieldLabel": "prompt",
+ "fieldType": "textarea",
+ "placeholder": "what should happen on the video",
+ "requiredField": true
+ },
+ {
+ "fieldLabel": "Negative prompt",
+ "placeholder": "optional"
+ }
+ ]
+ },
+ "options": {}
+ },
+ "type": "n8n-nodes-base.formTrigger",
+ "typeVersion": 2.2,
+ "position": [
+ -640,
+ -60
+ ],
+ "id": "0d1fcd46-f8f4-427c-9907-71b8b64d77b3",
+ "name": "On form submission",
+ "webhookId": "9e872a4a-2a30-40b1-bb41-eb874528121d"
+ },
+ {
+ "parameters": {
+ "assignments": {
+ "assignments": [
+ {
+ "id": "7d55d6da-a78c-4a28-9343-0ea9035a0aa3",
+ "name": "COMFY_URL",
+ "value": "={{ ((u) => { let s = u.trim(); if (!/^https?:\\/\\//i.test(s)) s = 'https://' + s; const parts = s.split('/'); return parts[0] + '//' + parts[2]; })($json.comfyui_url) }}",
+ "type": "string"
+ },
+ {
+ "id": "c491a696-6081-4e42-98f5-0c3b75c16edc",
+ "name": "NEGATIVE_PROMPT",
+ "value": "={{ $('On form submission').item.json['Negative prompt'] || $json.negative_prompt }}",
+ "type": "string"
+ },
+ {
+ "id": "e179a11b-ab0b-4772-b151-10b0b7d49a8c",
+ "name": "PROMPT",
+ "value": "={{ $('On form submission').item.json.prompt }}",
+ "type": "string"
+ }
+ ]
+ },
+ "options": {}
+ },
+ "type": "n8n-nodes-base.set",
+ "typeVersion": 3.4,
+ "position": [
+ -140,
+ -60
+ ],
+ "id": "bf6f0f6b-1c91-4d15-b628-682dc8fa5e8a",
+ "name": "Setup defaults"
+ },
+ {
+ "parameters": {
+ "url": "={{ $('Setup defaults').first().json.COMFY_URL }}/history/{{ $('Start the workflow with ComfyUI').first().json.prompt_id }}",
+ "options": {}
+ },
+ "type": "n8n-nodes-base.httpRequest",
+ "typeVersion": 4.2,
+ "position": [
+ 480,
+ -60
+ ],
+ "id": "6852c01c-1b88-44ef-9668-01ab6e3bea05",
+ "name": "Get video generation status",
+ "retryOnFail": true
+ },
+ {
+ "parameters": {
+ "amount": 10
+ },
+ "type": "n8n-nodes-base.wait",
+ "typeVersion": 1.1,
+ "position": [
+ 280,
+ -60
+ ],
+ "id": "ef85797e-33d5-4df8-9839-a391b59d5b38",
+ "name": "Wait until the video gets generated",
+ "webhookId": "98e946eb-34c7-4817-b94e-9c4d5c8182c6"
+ },
+ {
+ "parameters": {
+ "conditions": {
+ "options": {
+ "caseSensitive": true,
+ "leftValue": "",
+ "typeValidation": "strict",
+ "version": 2
+ },
+ "conditions": [
+ {
+ "id": "5e89df7d-4c0e-4bd4-8a84-b1e28bdb1f7e",
+ "leftValue": "={{ $json.keys().length > 0 && $json[$('Start the workflow with ComfyUI').item.json.prompt_id] && $json[$('Start the workflow with ComfyUI').item.json.prompt_id].status.completed }}",
+ "rightValue": "",
+ "operator": {
+ "type": "boolean",
+ "operation": "true",
+ "singleValue": true
+ }
+ },
+ {
+ "id": "354e3206-bbe3-481d-876b-255eed39f7cf",
+ "leftValue": "",
+ "rightValue": "",
+ "operator": {
+ "type": "string",
+ "operation": "equals",
+ "name": "filter.operator.equals"
+ }
+ }
+ ],
+ "combinator": "and"
+ },
+ "options": {}
+ },
+ "type": "n8n-nodes-base.if",
+ "typeVersion": 2.2,
+ "position": [
+ 700,
+ -60
+ ],
+ "id": "a3e3063e-be10-4a04-9485-f8d2138304b2",
+ "name": "Completed?"
+ },
+ {
+ "parameters": {
+ "conditions": {
+ "options": {
+ "caseSensitive": true,
+ "leftValue": "",
+ "typeValidation": "strict",
+ "version": 2
+ },
+ "conditions": [
+ {
+ "id": "9bfcdffd-8c7c-407d-b95c-83f8aa104845",
+ "leftValue": "={{ $json[$('Start the workflow with ComfyUI').item.json.prompt_id].status.status_str === 'success' }}",
+ "rightValue": "",
+ "operator": {
+ "type": "boolean",
+ "operation": "true",
+ "singleValue": true
+ }
+ }
+ ],
+ "combinator": "and"
+ },
+ "options": {}
+ },
+ "type": "n8n-nodes-base.if",
+ "typeVersion": 2.2,
+ "position": [
+ 980,
+ -80
+ ],
+ "id": "41f90dd6-3849-4bdc-b6e5-d9d653eda93a",
+ "name": "Success?"
+ },
+ {
+ "parameters": {
+ "url": "={{ $('Setup defaults').first().json.COMFY_URL }}/view",
+ "sendQuery": true,
+ "queryParameters": {
+ "parameters": [
+ {
+ "name": "type",
+ "value": "output"
+ },
+ {
+ "name": "filename",
+ "value": "={{ $('Get video generation status').last().json[$('Start the workflow with ComfyUI').item.json.prompt_id].outputs.values().map(item => item.images).flat(Infinity).find(item => item.type === 'output').filename }}"
+ },
+ {
+ "name": "subfolder",
+ "value": "={{ $('Get video generation status').last().json[$('Start the workflow with ComfyUI').item.json.prompt_id].outputs.values().map(item => item.images).flat(Infinity).find(item => item.type === 'output').subfolder }}"
+ }
+ ]
+ },
+ "sendBody": true,
+ "contentType": "form-urlencoded",
+ "bodyParameters": {
+ "parameters": [
+ {}
+ ]
+ },
+ "options": {
+ "redirect": {
+ "redirect": {}
+ }
+ }
+ },
+ "type": "n8n-nodes-base.httpRequest",
+ "typeVersion": 4.2,
+ "position": [
+ 1220,
+ -240
+ ],
+ "id": "29bbb40d-bee6-4125-9483-8aee0d75cc08",
+ "name": "HTTP Request"
+ },
+ {
+ "parameters": {
+ "errorMessage": "An error occoured while generating the image"
+ },
+ "type": "n8n-nodes-base.stopAndError",
+ "typeVersion": 1,
+ "position": [
+ 1220,
+ 20
+ ],
+ "id": "07743972-4f0e-407e-a6c2-0273578c80a3",
+ "name": "Stop and Error"
+ },
+ {
+ "parameters": {
+ "content": "# Configure me",
+ "height": 420,
+ "width": 260,
+ "color": 3
+ },
+ "type": "n8n-nodes-base.stickyNote",
+ "typeVersion": 1,
+ "position": [
+ -460,
+ -240
+ ],
+ "id": "1ea93eb9-a495-4b5f-8423-04d7cd406abe",
+ "name": "Sticky Note"
+ },
+ {
+ "parameters": {
+ "assignments": {
+ "assignments": [
+ {
+ "id": "1ece166a-0536-4c3e-bf1f-e0d4ff300169",
+ "name": "workflow",
+ "value": "={\n \"6\": {\n \"inputs\": {\n \"text\": \"${PROMPT}\",\n \"clip\": [\n \"38\",\n 0\n ]\n },\n \"class_type\": \"CLIPTextEncode\",\n \"_meta\": {\n \"title\": \"CLIP Text Encode (Positive Prompt)\"\n }\n },\n \"7\": {\n \"inputs\": {\n \"text\": \"${NEGATIVE_PROMPT}\",\n \"clip\": [\n \"38\",\n 0\n ]\n },\n \"class_type\": \"CLIPTextEncode\",\n \"_meta\": {\n \"title\": \"CLIP Text Encode (Negative Prompt)\"\n }\n },\n \"8\": {\n \"inputs\": {\n \"samples\": [\n \"58\",\n 0\n ],\n \"vae\": [\n \"39\",\n 0\n ]\n },\n \"class_type\": \"VAEDecode\",\n \"_meta\": {\n \"title\": \"VAE Decode\"\n }\n },\n \"37\": {\n \"inputs\": {\n \"unet_name\": \"wan2.2_t2v_high_noise_14B_fp16.safetensors\",\n \"weight_dtype\": \"default\"\n },\n \"class_type\": \"UNETLoader\",\n \"_meta\": {\n \"title\": \"Load Diffusion Model\"\n }\n },\n \"38\": {\n \"inputs\": {\n \"clip_name\": \"umt5_xxl_fp8_e4m3fn_scaled.safetensors\",\n \"type\": \"wan\",\n \"device\": \"default\"\n },\n \"class_type\": \"CLIPLoader\",\n \"_meta\": {\n \"title\": \"Load CLIP\"\n }\n },\n \"39\": {\n \"inputs\": {\n \"vae_name\": \"wan_2.1_vae.safetensors\"\n },\n \"class_type\": \"VAELoader\",\n \"_meta\": {\n \"title\": \"Load VAE\"\n }\n },\n \"54\": {\n \"inputs\": {\n \"shift\": 8.000000000000002,\n \"model\": [\n \"37\",\n 0\n ]\n },\n \"class_type\": \"ModelSamplingSD3\",\n \"_meta\": {\n \"title\": \"ModelSamplingSD3\"\n }\n },\n \"55\": {\n \"inputs\": {\n \"shift\": 8,\n \"model\": [\n \"56\",\n 0\n ]\n },\n \"class_type\": \"ModelSamplingSD3\",\n \"_meta\": {\n \"title\": \"ModelSamplingSD3\"\n }\n },\n \"56\": {\n \"inputs\": {\n \"unet_name\": \"wan2.2_t2v_low_noise_14B_fp16.safetensors\",\n \"weight_dtype\": \"default\"\n },\n \"class_type\": \"UNETLoader\",\n \"_meta\": {\n \"title\": \"Load Diffusion Model\"\n }\n },\n \"57\": {\n \"inputs\": {\n \"add_noise\": \"enable\",\n \"noise_seed\": {{ (() => {\n const max = 0xFFFFFFFF - 1;\n const seed = Math.floor(Math.random() * max) + 1;\n return seed;\n})() }},\n \"steps\": 20,\n \"cfg\": 3.5,\n \"sampler_name\": \"euler\",\n \"scheduler\": \"simple\",\n \"start_at_step\": 0,\n \"end_at_step\": 10,\n \"return_with_leftover_noise\": \"enable\",\n \"model\": [\n \"54\",\n 0\n ],\n \"positive\": [\n \"6\",\n 0\n ],\n \"negative\": [\n \"7\",\n 0\n ],\n \"latent_image\": [\n \"59\",\n 0\n ]\n },\n \"class_type\": \"KSamplerAdvanced\",\n \"_meta\": {\n \"title\": \"KSampler (Advanced)\"\n }\n },\n \"58\": {\n \"inputs\": {\n \"add_noise\": \"disable\",\n \"noise_seed\": 0,\n \"steps\": 20,\n \"cfg\": 3.5,\n \"sampler_name\": \"euler\",\n \"scheduler\": \"simple\",\n \"start_at_step\": 10,\n \"end_at_step\": 10000,\n \"return_with_leftover_noise\": \"disable\",\n \"model\": [\n \"55\",\n 0\n ],\n \"positive\": [\n \"6\",\n 0\n ],\n \"negative\": [\n \"7\",\n 0\n ],\n \"latent_image\": [\n \"57\",\n 0\n ]\n },\n \"class_type\": \"KSamplerAdvanced\",\n \"_meta\": {\n \"title\": \"KSampler (Advanced)\"\n }\n },\n \"59\": {\n \"inputs\": {\n \"width\": 1280,\n \"height\": 704,\n \"length\": 81,\n \"batch_size\": 1\n },\n \"class_type\": \"EmptyHunyuanLatentVideo\",\n \"_meta\": {\n \"title\": \"EmptyHunyuanLatentVideo\"\n }\n },\n \"60\": {\n \"inputs\": {\n \"fps\": 16,\n \"images\": [\n \"8\",\n 0\n ]\n },\n \"class_type\": \"CreateVideo\",\n \"_meta\": {\n \"title\": \"Create Video\"\n }\n },\n \"61\": {\n \"inputs\": {\n \"filename_prefix\": \"video/ComfyUI\",\n \"format\": \"auto\",\n \"codec\": \"auto\",\n \"video\": [\n \"60\",\n 0\n ]\n },\n \"class_type\": \"SaveVideo\",\n \"_meta\": {\n \"title\": \"Save Video\"\n }\n }\n}",
+ "type": "string"
+ },
+ {
+ "id": "92df0709-c03c-400e-b2ac-1a8e3aff7416",
+ "name": "comfyui_url",
+ "value": "YOUR_COMFYUI_URL",
+ "type": "string"
+ },
+ {
+ "id": "fb621130-6eac-41ab-b514-576a0275f6b1",
+ "name": "negative_prompt",
+ "value": "色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走",
+ "type": "string"
+ }
+ ]
+ },
+ "options": {}
+ },
+ "type": "n8n-nodes-base.set",
+ "typeVersion": 3.4,
+ "position": [
+ -380,
+ -60
+ ],
+ "id": "0d28019c-dab7-4b1c-96e7-e770e044bf98",
+ "name": "Configure me"
+ },
+ {
+ "parameters": {
+ "method": "POST",
+ "url": "={{ $('Setup defaults').first().json.COMFY_URL }}/prompt",
+ "sendBody": true,
+ "specifyBody": "json",
+ "jsonBody": "={\n \"client_id\": \"n8n\",\n \"prompt\": {{ \n\n $('Configure me').item.json.workflow\n .replace('${PROMPT}', $('Setup defaults').first().json.PROMPT)\n .replace('${NEGATIVE_PROMPT}', $('Setup defaults').first().json.NEGATIVE_PROMPT) \n\n}}\n}",
+ "options": {}
+ },
+ "type": "n8n-nodes-base.httpRequest",
+ "typeVersion": 4.2,
+ "position": [
+ 40,
+ -60
+ ],
+ "id": "f03fab10-b7b1-4d08-8ef4-f109286f130f",
+ "name": "Start the workflow with ComfyUI"
+ }
+ ],
+ "pinData": {},
+ "connections": {
+ "On form submission": {
+ "main": [
+ [
+ {
+ "node": "Configure me",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Setup defaults": {
+ "main": [
+ [
+ {
+ "node": "Start the workflow with ComfyUI",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Get video generation status": {
+ "main": [
+ [
+ {
+ "node": "Completed?",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Wait until the video gets generated": {
+ "main": [
+ [
+ {
+ "node": "Get video generation status",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Completed?": {
+ "main": [
+ [
+ {
+ "node": "Success?",
+ "type": "main",
+ "index": 0
+ }
+ ],
+ [
+ {
+ "node": "Wait until the video gets generated",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Success?": {
+ "main": [
+ [
+ {
+ "node": "HTTP Request",
+ "type": "main",
+ "index": 0
+ }
+ ],
+ [
+ {
+ "node": "Stop and Error",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Configure me": {
+ "main": [
+ [
+ {
+ "node": "Setup defaults",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Start the workflow with ComfyUI": {
+ "main": [
+ [
+ {
+ "node": "Wait until the video gets generated",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ }
+ },
+ "active": false,
+ "settings": {
+ "executionOrder": "v1"
+ },
+ "versionId": "6cc26083-05dc-450e-a35f-f267b21830c5",
+ "meta": {
+ "instanceId": "636db6b6ab21a21c6458e2137f340e33dc3e49f5a1c560c8d1e2372c227cf40e"
+ },
+ "id": "kQz7bt4LsJxe0z4A",
+ "tags": []
+}
\ No newline at end of file
diff --git a/episode_20/n8n_wan_2.2_5b_i2v.json b/episode_20/n8n_wan_2.2_5b_i2v.json
new file mode 100644
index 0000000..c30c4a2
--- /dev/null
+++ b/episode_20/n8n_wan_2.2_5b_i2v.json
@@ -0,0 +1,487 @@
+{
+ "name": "ComfyUI: wan 2.2 5b - image 2 video",
+ "nodes": [
+ {
+ "parameters": {
+ "formTitle": "Upload reference images",
+ "formFields": {
+ "values": [
+ {
+ "fieldLabel": "Image",
+ "fieldType": "file",
+ "multipleFiles": false,
+ "acceptFileTypes": ".jpg, .png, .jpeg",
+ "requiredField": true
+ },
+ {
+ "fieldLabel": "prompt",
+ "fieldType": "textarea",
+ "placeholder": "what should happen on the video",
+ "requiredField": true
+ },
+ {
+ "fieldLabel": "Negative prompt",
+ "placeholder": "optional"
+ }
+ ]
+ },
+ "options": {}
+ },
+ "type": "n8n-nodes-base.formTrigger",
+ "typeVersion": 2.2,
+ "position": [
+ -1200,
+ -60
+ ],
+ "id": "17826ac5-175e-4358-b686-3feb7feda0f8",
+ "name": "On form submission",
+ "webhookId": "6efb0a07-f4e5-43dc-8a12-041b8c601617"
+ },
+ {
+ "parameters": {
+ "assignments": {
+ "assignments": [
+ {
+ "id": "7d55d6da-a78c-4a28-9343-0ea9035a0aa3",
+ "name": "COMFY_URL",
+ "value": "={{ ((u) => { let s = u.trim(); if (!/^https?:\\/\\//i.test(s)) s = 'https://' + s; const parts = s.split('/'); return parts[0] + '//' + parts[2]; })($json.comfyui_url) }}",
+ "type": "string"
+ },
+ {
+ "id": "c491a696-6081-4e42-98f5-0c3b75c16edc",
+ "name": "NEGATIVE_PROMPT",
+ "value": "={{ $('On form submission').item.json['Negative prompt'] || $json.negative_prompt }}",
+ "type": "string"
+ },
+ {
+ "id": "e179a11b-ab0b-4772-b151-10b0b7d49a8c",
+ "name": "PROMPT",
+ "value": "={{ $('On form submission').item.json.prompt }}",
+ "type": "string"
+ }
+ ]
+ },
+ "options": {}
+ },
+ "type": "n8n-nodes-base.set",
+ "typeVersion": 3.4,
+ "position": [
+ -640,
+ -60
+ ],
+ "id": "e93451b4-9100-4bbd-b67c-bcc28fd23344",
+ "name": "Setup defaults"
+ },
+ {
+ "parameters": {
+ "url": "={{ $('Setup defaults').first().json.COMFY_URL }}/history/{{ $('Start the workflow with ComfyUI').first().json.prompt_id }}",
+ "options": {}
+ },
+ "type": "n8n-nodes-base.httpRequest",
+ "typeVersion": 4.2,
+ "position": [
+ 360,
+ -60
+ ],
+ "id": "0211ed19-3112-4182-a384-c49ceaa52a31",
+ "name": "Get video generation status",
+ "retryOnFail": true
+ },
+ {
+ "parameters": {
+ "amount": 10
+ },
+ "type": "n8n-nodes-base.wait",
+ "typeVersion": 1.1,
+ "position": [
+ 160,
+ -60
+ ],
+ "id": "dadbc73d-4d95-4d84-adb2-96348c66fa37",
+ "name": "Wait until the video gets generated",
+ "webhookId": "02422510-48e7-431d-84df-b83964ad4943"
+ },
+ {
+ "parameters": {
+ "conditions": {
+ "options": {
+ "caseSensitive": true,
+ "leftValue": "",
+ "typeValidation": "strict",
+ "version": 2
+ },
+ "conditions": [
+ {
+ "id": "5e89df7d-4c0e-4bd4-8a84-b1e28bdb1f7e",
+ "leftValue": "={{ $json.keys().length > 0 && $json[$('Start the workflow with ComfyUI').item.json.prompt_id] && $json[$('Start the workflow with ComfyUI').item.json.prompt_id].status.completed }}",
+ "rightValue": "",
+ "operator": {
+ "type": "boolean",
+ "operation": "true",
+ "singleValue": true
+ }
+ },
+ {
+ "id": "354e3206-bbe3-481d-876b-255eed39f7cf",
+ "leftValue": "",
+ "rightValue": "",
+ "operator": {
+ "type": "string",
+ "operation": "equals",
+ "name": "filter.operator.equals"
+ }
+ }
+ ],
+ "combinator": "and"
+ },
+ "options": {}
+ },
+ "type": "n8n-nodes-base.if",
+ "typeVersion": 2.2,
+ "position": [
+ 580,
+ -60
+ ],
+ "id": "4f467ba5-292f-425f-894d-6bedfa8e3f84",
+ "name": "Completed?"
+ },
+ {
+ "parameters": {
+ "conditions": {
+ "options": {
+ "caseSensitive": true,
+ "leftValue": "",
+ "typeValidation": "strict",
+ "version": 2
+ },
+ "conditions": [
+ {
+ "id": "9bfcdffd-8c7c-407d-b95c-83f8aa104845",
+ "leftValue": "={{ $json[$('Start the workflow with ComfyUI').item.json.prompt_id].status.status_str === 'success' }}",
+ "rightValue": "",
+ "operator": {
+ "type": "boolean",
+ "operation": "true",
+ "singleValue": true
+ }
+ }
+ ],
+ "combinator": "and"
+ },
+ "options": {}
+ },
+ "type": "n8n-nodes-base.if",
+ "typeVersion": 2.2,
+ "position": [
+ 860,
+ -80
+ ],
+ "id": "bdd2f36a-6eee-4131-917a-504ef25f1e70",
+ "name": "Success?"
+ },
+ {
+ "parameters": {
+ "url": "={{ $('Setup defaults').first().json.COMFY_URL }}/view",
+ "sendQuery": true,
+ "queryParameters": {
+ "parameters": [
+ {
+ "name": "type",
+ "value": "output"
+ },
+ {
+ "name": "filename",
+ "value": "={{ $('Get video generation status').last().json[$('Start the workflow with ComfyUI').item.json.prompt_id].outputs.values().map(item => item.images).flat(Infinity).find(item => item.type === 'output').filename }}"
+ },
+ {
+ "name": "subfolder",
+ "value": "={{ $('Get video generation status').last().json[$('Start the workflow with ComfyUI').item.json.prompt_id].outputs['58'].images[0].subfolder }}"
+ }
+ ]
+ },
+ "sendBody": true,
+ "contentType": "form-urlencoded",
+ "bodyParameters": {
+ "parameters": [
+ {}
+ ]
+ },
+ "options": {
+ "redirect": {
+ "redirect": {}
+ }
+ }
+ },
+ "type": "n8n-nodes-base.httpRequest",
+ "typeVersion": 4.2,
+ "position": [
+ 1100,
+ -220
+ ],
+ "id": "d15a677b-531d-47b5-904c-15112134365b",
+ "name": "HTTP Request"
+ },
+ {
+ "parameters": {
+ "errorMessage": "An error occoured while generating the image"
+ },
+ "type": "n8n-nodes-base.stopAndError",
+ "typeVersion": 1,
+ "position": [
+ 1100,
+ 0
+ ],
+ "id": "5a79f39c-006b-4e9f-ab9d-0db64d680fdc",
+ "name": "Stop and Error"
+ },
+ {
+ "parameters": {
+ "content": "# Configure me",
+ "height": 420,
+ "width": 260,
+ "color": 3
+ },
+ "type": "n8n-nodes-base.stickyNote",
+ "typeVersion": 1,
+ "position": [
+ -960,
+ -240
+ ],
+ "id": "cacd5767-91ac-4ae0-8116-479a6c50590a",
+ "name": "Sticky Note"
+ },
+ {
+ "parameters": {
+ "assignments": {
+ "assignments": [
+ {
+ "id": "1ece166a-0536-4c3e-bf1f-e0d4ff300169",
+ "name": "workflow",
+ "value": "={\n \"3\": {\n \"inputs\": {\n \"seed\": {{ (() => {\n const max = 0xFFFFFFFF - 1;\n const seed = Math.floor(Math.random() * max) + 1;\n return seed;\n})() }},\n \"steps\": 20,\n \"cfg\": 5,\n \"sampler_name\": \"uni_pc\",\n \"scheduler\": \"simple\",\n \"denoise\": 1,\n \"model\": [\n \"48\",\n 0\n ],\n \"positive\": [\n \"6\",\n 0\n ],\n \"negative\": [\n \"7\",\n 0\n ],\n \"latent_image\": [\n \"55\",\n 0\n ]\n },\n \"class_type\": \"KSampler\",\n \"_meta\": {\n \"title\": \"KSampler\"\n }\n },\n \"6\": {\n \"inputs\": {\n \"text\": \"${PROMPT}\",\n \"clip\": [\n \"38\",\n 0\n ]\n },\n \"class_type\": \"CLIPTextEncode\",\n \"_meta\": {\n \"title\": \"CLIP Text Encode (Positive Prompt)\"\n }\n },\n \"7\": {\n \"inputs\": {\n \"text\": \"${NEGATIVE_PROMPT}\",\n \"clip\": [\n \"38\",\n 0\n ]\n },\n \"class_type\": \"CLIPTextEncode\",\n \"_meta\": {\n \"title\": \"CLIP Text Encode (Negative Prompt)\"\n }\n },\n \"8\": {\n \"inputs\": {\n \"samples\": [\n \"3\",\n 0\n ],\n \"vae\": [\n \"39\",\n 0\n ]\n },\n \"class_type\": \"VAEDecode\",\n \"_meta\": {\n \"title\": \"VAE Decode\"\n }\n },\n \"37\": {\n \"inputs\": {\n \"unet_name\": \"wan2.2_ti2v_5B_fp16.safetensors\",\n \"weight_dtype\": \"default\"\n },\n \"class_type\": \"UNETLoader\",\n \"_meta\": {\n \"title\": \"Load Diffusion Model\"\n }\n },\n \"38\": {\n \"inputs\": {\n \"clip_name\": \"umt5_xxl_fp8_e4m3fn_scaled.safetensors\",\n \"type\": \"wan\",\n \"device\": \"default\"\n },\n \"class_type\": \"CLIPLoader\",\n \"_meta\": {\n \"title\": \"Load CLIP\"\n }\n },\n \"39\": {\n \"inputs\": {\n \"vae_name\": \"wan2.2_vae.safetensors\"\n },\n \"class_type\": \"VAELoader\",\n \"_meta\": {\n \"title\": \"Load VAE\"\n }\n },\n \"48\": {\n \"inputs\": {\n \"shift\": 8,\n \"model\": [\n \"37\",\n 0\n ]\n },\n \"class_type\": \"ModelSamplingSD3\",\n \"_meta\": {\n \"title\": \"ModelSamplingSD3\"\n }\n },\n \"55\": {\n \"inputs\": {\n \"width\": 1280,\n \"height\": 704,\n \"length\": 121,\n \"batch_size\": 1,\n \"vae\": [\n \"39\",\n 0\n ],\n \"start_image\": [\n \"56\",\n 0\n ]\n },\n \"class_type\": \"Wan22ImageToVideoLatent\",\n \"_meta\": {\n \"title\": \"Wan22ImageToVideoLatent\"\n }\n },\n \"56\": {\n \"inputs\": {\n \"image\": \"${IMAGE}\"\n },\n \"class_type\": \"LoadImage\",\n \"_meta\": {\n \"title\": \"Load Image\"\n }\n },\n \"57\": {\n \"inputs\": {\n \"fps\": 24,\n \"images\": [\n \"8\",\n 0\n ]\n },\n \"class_type\": \"CreateVideo\",\n \"_meta\": {\n \"title\": \"Create Video\"\n }\n },\n \"58\": {\n \"inputs\": {\n \"filename_prefix\": \"video/ComfyUI\",\n \"format\": \"auto\",\n \"codec\": \"auto\",\n \"video-preview\": \"\",\n \"video\": [\n \"57\",\n 0\n ]\n },\n \"class_type\": \"SaveVideo\",\n \"_meta\": {\n \"title\": \"Save Video\"\n }\n }\n}",
+ "type": "string"
+ },
+ {
+ "id": "92df0709-c03c-400e-b2ac-1a8e3aff7416",
+ "name": "comfyui_url",
+ "value": "YOUR_COMFYUI_URL",
+ "type": "string"
+ },
+ {
+ "id": "fb621130-6eac-41ab-b514-576a0275f6b1",
+ "name": "negative_prompt",
+ "value": "色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走",
+ "type": "string"
+ }
+ ]
+ },
+ "options": {}
+ },
+ "type": "n8n-nodes-base.set",
+ "typeVersion": 3.4,
+ "position": [
+ -880,
+ -60
+ ],
+ "id": "dbae31f4-adbe-4295-b8aa-f5f1b228cb84",
+ "name": "Configure me"
+ },
+ {
+ "parameters": {
+ "jsCode": "return $('On form submission').first()"
+ },
+ "type": "n8n-nodes-base.code",
+ "typeVersion": 2,
+ "position": [
+ -500,
+ -60
+ ],
+ "id": "b3a85695-fa30-4c83-a30c-6de8795017f8",
+ "name": "Relay image"
+ },
+ {
+ "parameters": {
+ "method": "POST",
+ "url": "={{ $('Setup defaults').first().json.COMFY_URL }}/upload/image",
+ "sendBody": true,
+ "contentType": "multipart-form-data",
+ "bodyParameters": {
+ "parameters": [
+ {
+ "parameterType": "formBinaryData",
+ "name": "image",
+ "inputDataFieldName": "Image"
+ }
+ ]
+ },
+ "options": {
+ "redirect": {
+ "redirect": {}
+ }
+ }
+ },
+ "type": "n8n-nodes-base.httpRequest",
+ "typeVersion": 4.2,
+ "position": [
+ -340,
+ -60
+ ],
+ "id": "ad3ec3d9-22a3-400e-b4ad-73aa6c3f18e4",
+ "name": "Upload the image to ComfyUI"
+ },
+ {
+ "parameters": {
+ "method": "POST",
+ "url": "={{ $('Setup defaults').first().json.COMFY_URL }}/prompt",
+ "sendBody": true,
+ "specifyBody": "json",
+ "jsonBody": "={\n \"client_id\": \"n8n\",\n \"prompt\": {{ \n\n $('Configure me').item.json.workflow\n .replace('${IMAGE}', $json.name)\n .replace('${PROMPT}', $('Setup defaults').first().json.PROMPT)\n .replace('${NEGATIVE_PROMPT}', $('Setup defaults').first().json.NEGATIVE_PROMPT) \n\n}}\n}",
+ "options": {}
+ },
+ "type": "n8n-nodes-base.httpRequest",
+ "typeVersion": 4.2,
+ "position": [
+ -140,
+ -60
+ ],
+ "id": "07a2c24e-bfb2-4e74-a726-468dd23c7364",
+ "name": "Start the workflow with ComfyUI"
+ }
+ ],
+ "pinData": {},
+ "connections": {
+ "On form submission": {
+ "main": [
+ [
+ {
+ "node": "Configure me",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Setup defaults": {
+ "main": [
+ [
+ {
+ "node": "Relay image",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Get video generation status": {
+ "main": [
+ [
+ {
+ "node": "Completed?",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Wait until the video gets generated": {
+ "main": [
+ [
+ {
+ "node": "Get video generation status",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Completed?": {
+ "main": [
+ [
+ {
+ "node": "Success?",
+ "type": "main",
+ "index": 0
+ }
+ ],
+ [
+ {
+ "node": "Wait until the video gets generated",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Success?": {
+ "main": [
+ [
+ {
+ "node": "HTTP Request",
+ "type": "main",
+ "index": 0
+ }
+ ],
+ [
+ {
+ "node": "Stop and Error",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Configure me": {
+ "main": [
+ [
+ {
+ "node": "Setup defaults",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Relay image": {
+ "main": [
+ [
+ {
+ "node": "Upload the image to ComfyUI",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Upload the image to ComfyUI": {
+ "main": [
+ [
+ {
+ "node": "Start the workflow with ComfyUI",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Start the workflow with ComfyUI": {
+ "main": [
+ [
+ {
+ "node": "Wait until the video gets generated",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ }
+ },
+ "active": false,
+ "settings": {
+ "executionOrder": "v1"
+ },
+ "versionId": "4f782197-9b40-4431-bb3f-c49c8cd2ff1d",
+ "meta": {
+ "instanceId": "636db6b6ab21a21c6458e2137f340e33dc3e49f5a1c560c8d1e2372c227cf40e"
+ },
+ "id": "AV7iCymx5DJbqx67",
+ "tags": []
+}
\ No newline at end of file
diff --git a/episode_20/n8n_wan_2.2_5b_t2v.json b/episode_20/n8n_wan_2.2_5b_t2v.json
new file mode 100644
index 0000000..c7d7a3d
--- /dev/null
+++ b/episode_20/n8n_wan_2.2_5b_t2v.json
@@ -0,0 +1,415 @@
+{
+ "name": "ComfyUI: wan 2.2 5b - text 2 video",
+ "nodes": [
+ {
+ "parameters": {
+ "formTitle": "Upload reference images",
+ "formFields": {
+ "values": [
+ {
+ "fieldLabel": "prompt",
+ "fieldType": "textarea",
+ "placeholder": "what should happen on the video",
+ "requiredField": true
+ },
+ {
+ "fieldLabel": "Negative prompt",
+ "placeholder": "optional"
+ }
+ ]
+ },
+ "options": {}
+ },
+ "type": "n8n-nodes-base.formTrigger",
+ "typeVersion": 2.2,
+ "position": [
+ -620,
+ -60
+ ],
+ "id": "f7de41fc-a563-4e92-82ba-d5f3b877fa36",
+ "name": "On form submission",
+ "webhookId": "e0a61b98-84e7-42ab-9c8c-e5b130a8adc4"
+ },
+ {
+ "parameters": {
+ "assignments": {
+ "assignments": [
+ {
+ "id": "7d55d6da-a78c-4a28-9343-0ea9035a0aa3",
+ "name": "COMFY_URL",
+ "value": "={{ ((u) => { let s = u.trim(); if (!/^https?:\\/\\//i.test(s)) s = 'https://' + s; const parts = s.split('/'); return parts[0] + '//' + parts[2]; })($json.comfyui_url) }}",
+ "type": "string"
+ },
+ {
+ "id": "c491a696-6081-4e42-98f5-0c3b75c16edc",
+ "name": "NEGATIVE_PROMPT",
+ "value": "={{ $('On form submission').item.json['Negative prompt'] || $json.negative_prompt }}",
+ "type": "string"
+ },
+ {
+ "id": "e179a11b-ab0b-4772-b151-10b0b7d49a8c",
+ "name": "PROMPT",
+ "value": "={{ $('On form submission').item.json.prompt }}",
+ "type": "string"
+ }
+ ]
+ },
+ "options": {}
+ },
+ "type": "n8n-nodes-base.set",
+ "typeVersion": 3.4,
+ "position": [
+ -100,
+ -60
+ ],
+ "id": "677e7deb-bf71-48b6-bea7-46b46ba6b18c",
+ "name": "Setup defaults"
+ },
+ {
+ "parameters": {
+ "url": "={{ $('Setup defaults').first().json.COMFY_URL }}/history/{{ $('Start the workflow with ComfyUI').first().json.prompt_id }}",
+ "options": {}
+ },
+ "type": "n8n-nodes-base.httpRequest",
+ "typeVersion": 4.2,
+ "position": [
+ 520,
+ -60
+ ],
+ "id": "0fb73fc5-555b-49e1-8370-990732971fee",
+ "name": "Get video generation status",
+ "retryOnFail": true
+ },
+ {
+ "parameters": {
+ "amount": 10
+ },
+ "type": "n8n-nodes-base.wait",
+ "typeVersion": 1.1,
+ "position": [
+ 320,
+ -60
+ ],
+ "id": "ec329f92-0ca2-499b-900f-391da62266ba",
+ "name": "Wait until the video gets generated",
+ "webhookId": "e785aaa5-76f0-473d-bbc9-bd05b1c1565c"
+ },
+ {
+ "parameters": {
+ "conditions": {
+ "options": {
+ "caseSensitive": true,
+ "leftValue": "",
+ "typeValidation": "strict",
+ "version": 2
+ },
+ "conditions": [
+ {
+ "id": "5e89df7d-4c0e-4bd4-8a84-b1e28bdb1f7e",
+ "leftValue": "={{ $json.keys().length > 0 && $json[$('Start the workflow with ComfyUI').item.json.prompt_id] && $json[$('Start the workflow with ComfyUI').item.json.prompt_id].status.completed }}",
+ "rightValue": "",
+ "operator": {
+ "type": "boolean",
+ "operation": "true",
+ "singleValue": true
+ }
+ },
+ {
+ "id": "354e3206-bbe3-481d-876b-255eed39f7cf",
+ "leftValue": "",
+ "rightValue": "",
+ "operator": {
+ "type": "string",
+ "operation": "equals",
+ "name": "filter.operator.equals"
+ }
+ }
+ ],
+ "combinator": "and"
+ },
+ "options": {}
+ },
+ "type": "n8n-nodes-base.if",
+ "typeVersion": 2.2,
+ "position": [
+ 680,
+ -60
+ ],
+ "id": "7f8edbdb-0dd2-46c7-83a2-2fce33dd7058",
+ "name": "Completed?"
+ },
+ {
+ "parameters": {
+ "conditions": {
+ "options": {
+ "caseSensitive": true,
+ "leftValue": "",
+ "typeValidation": "strict",
+ "version": 2
+ },
+ "conditions": [
+ {
+ "id": "9bfcdffd-8c7c-407d-b95c-83f8aa104845",
+ "leftValue": "={{ $json[$('Start the workflow with ComfyUI').item.json.prompt_id].status.status_str === 'success' }}",
+ "rightValue": "",
+ "operator": {
+ "type": "boolean",
+ "operation": "true",
+ "singleValue": true
+ }
+ }
+ ],
+ "combinator": "and"
+ },
+ "options": {}
+ },
+ "type": "n8n-nodes-base.if",
+ "typeVersion": 2.2,
+ "position": [
+ 980,
+ -80
+ ],
+ "id": "14c2f182-2eee-4420-86dd-f2d7244db30d",
+ "name": "Success?"
+ },
+ {
+ "parameters": {
+ "url": "={{ $('Setup defaults').first().json.COMFY_URL }}/view",
+ "sendQuery": true,
+ "queryParameters": {
+ "parameters": [
+ {
+ "name": "type",
+ "value": "output"
+ },
+ {
+ "name": "filename",
+ "value": "={{ $('Get video generation status').last().json[$('Start the workflow with ComfyUI').item.json.prompt_id].outputs.values().map(item => item.images).flat(Infinity).find(item => item.type === 'output').filename }}"
+ },
+ {
+ "name": "subfolder",
+ "value": "={{ $('Get video generation status').last().json[$('Start the workflow with ComfyUI').item.json.prompt_id].outputs['58'].images[0].subfolder }}"
+ }
+ ]
+ },
+ "sendBody": true,
+ "contentType": "form-urlencoded",
+ "bodyParameters": {
+ "parameters": [
+ {}
+ ]
+ },
+ "options": {
+ "redirect": {
+ "redirect": {}
+ }
+ }
+ },
+ "type": "n8n-nodes-base.httpRequest",
+ "typeVersion": 4.2,
+ "position": [
+ 1260,
+ -240
+ ],
+ "id": "f5d3ffcf-e9b2-4417-a489-ecdf46be67f6",
+ "name": "HTTP Request"
+ },
+ {
+ "parameters": {
+ "errorMessage": "An error occoured while generating the image"
+ },
+ "type": "n8n-nodes-base.stopAndError",
+ "typeVersion": 1,
+ "position": [
+ 1280,
+ 80
+ ],
+ "id": "42b6898a-7150-4c4e-9098-fc96865f1dc6",
+ "name": "Stop and Error"
+ },
+ {
+ "parameters": {
+ "assignments": {
+ "assignments": [
+ {
+ "id": "1ece166a-0536-4c3e-bf1f-e0d4ff300169",
+ "name": "workflow",
+ "value": "={\n \"3\": {\n \"inputs\": {\n \"seed\": {{ (() => {\n const max = 0xFFFFFFFF - 1;\n const seed = Math.floor(Math.random() * max) + 1;\n return seed;\n})() }},\n \"steps\": 20,\n \"cfg\": 5,\n \"sampler_name\": \"uni_pc\",\n \"scheduler\": \"simple\",\n \"denoise\": 1,\n \"model\": [\n \"48\",\n 0\n ],\n \"positive\": [\n \"6\",\n 0\n ],\n \"negative\": [\n \"7\",\n 0\n ],\n \"latent_image\": [\n \"55\",\n 0\n ]\n },\n \"class_type\": \"KSampler\",\n \"_meta\": {\n \"title\": \"KSampler\"\n }\n },\n \"6\": {\n \"inputs\": {\n \"text\": \"${PROMPT}\",\n \"clip\": [\n \"38\",\n 0\n ]\n },\n \"class_type\": \"CLIPTextEncode\",\n \"_meta\": {\n \"title\": \"CLIP Text Encode (Positive Prompt)\"\n }\n },\n \"7\": {\n \"inputs\": {\n \"text\": \"${NEGATIVE_PROMPT}\",\n \"clip\": [\n \"38\",\n 0\n ]\n },\n \"class_type\": \"CLIPTextEncode\",\n \"_meta\": {\n \"title\": \"CLIP Text Encode (Negative Prompt)\"\n }\n },\n \"8\": {\n \"inputs\": {\n \"samples\": [\n \"3\",\n 0\n ],\n \"vae\": [\n \"39\",\n 0\n ]\n },\n \"class_type\": \"VAEDecode\",\n \"_meta\": {\n \"title\": \"VAE Decode\"\n }\n },\n \"37\": {\n \"inputs\": {\n \"unet_name\": \"wan2.2_ti2v_5B_fp16.safetensors\",\n \"weight_dtype\": \"default\"\n },\n \"class_type\": \"UNETLoader\",\n \"_meta\": {\n \"title\": \"Load Diffusion Model\"\n }\n },\n \"38\": {\n \"inputs\": {\n \"clip_name\": \"umt5_xxl_fp8_e4m3fn_scaled.safetensors\",\n \"type\": \"wan\",\n \"device\": \"default\"\n },\n \"class_type\": \"CLIPLoader\",\n \"_meta\": {\n \"title\": \"Load CLIP\"\n }\n },\n \"39\": {\n \"inputs\": {\n \"vae_name\": \"wan2.2_vae.safetensors\"\n },\n \"class_type\": \"VAELoader\",\n \"_meta\": {\n \"title\": \"Load VAE\"\n }\n },\n \"48\": {\n \"inputs\": {\n \"shift\": 8,\n \"model\": [\n \"37\",\n 0\n ]\n },\n \"class_type\": \"ModelSamplingSD3\",\n \"_meta\": {\n \"title\": \"ModelSamplingSD3\"\n }\n },\n \"55\": {\n \"inputs\": {\n \"width\": 1280,\n \"height\": 704,\n \"length\": 121,\n \"batch_size\": 1,\n \"vae\": [\n \"39\",\n 0\n ]\n },\n \"class_type\": \"Wan22ImageToVideoLatent\",\n \"_meta\": {\n \"title\": \"Wan22ImageToVideoLatent\"\n }\n },\n \"57\": {\n \"inputs\": {\n \"fps\": 24,\n \"images\": [\n \"8\",\n 0\n ]\n },\n \"class_type\": \"CreateVideo\",\n \"_meta\": {\n \"title\": \"Create Video\"\n }\n },\n \"58\": {\n \"inputs\": {\n \"filename_prefix\": \"video/ComfyUI\",\n \"format\": \"auto\",\n \"codec\": \"auto\",\n \"video-preview\": \"\",\n \"video\": [\n \"57\",\n 0\n ]\n },\n \"class_type\": \"SaveVideo\",\n \"_meta\": {\n \"title\": \"Save Video\"\n }\n }\n}",
+ "type": "string"
+ },
+ {
+ "id": "92df0709-c03c-400e-b2ac-1a8e3aff7416",
+ "name": "comfyui_url",
+ "value": "YOUR_COMFYUI_URL",
+ "type": "string"
+ },
+ {
+ "id": "fb621130-6eac-41ab-b514-576a0275f6b1",
+ "name": "negative_prompt",
+ "value": "色调艳丽,过曝,静态,细节模糊不清,字幕,风格,作品,画作,画面,静止,整体发灰,最差质量,低质量,JPEG压缩残留,丑陋的,残缺的,多余的手指,画得不好的手部,画得不好的脸部,畸形的,毁容的,形态畸形的肢体,手指融合,静止不动的画面,杂乱的背景,三条腿,背景人很多,倒着走",
+ "type": "string"
+ }
+ ]
+ },
+ "options": {}
+ },
+ "type": "n8n-nodes-base.set",
+ "typeVersion": 3.4,
+ "position": [
+ -380,
+ -60
+ ],
+ "id": "1f08ab0e-14b2-4ed9-a83a-722a1f9b0ea4",
+ "name": "Configuration"
+ },
+ {
+ "parameters": {
+ "content": "# Configure me",
+ "height": 420,
+ "width": 260,
+ "color": 3
+ },
+ "type": "n8n-nodes-base.stickyNote",
+ "typeVersion": 1,
+ "position": [
+ -460,
+ -280
+ ],
+ "id": "2c275d22-12c7-420f-b172-920b69ab1288",
+ "name": "Sticky Note"
+ },
+ {
+ "parameters": {
+ "method": "POST",
+ "url": "={{ $('Setup defaults').first().json.COMFY_URL }}/prompt",
+ "sendBody": true,
+ "specifyBody": "json",
+ "jsonBody": "={\n \"client_id\": \"n8n\",\n \"prompt\": {{ \n\n $('Configuration').item.json.workflow\n .replace('${PROMPT}', $('Setup defaults').first().json.PROMPT)\n .replace('${NEGATIVE_PROMPT}', $('Setup defaults').first().json.NEGATIVE_PROMPT) \n\n}}\n}",
+ "options": {}
+ },
+ "type": "n8n-nodes-base.httpRequest",
+ "typeVersion": 4.2,
+ "position": [
+ 60,
+ -60
+ ],
+ "id": "a3d6ad94-891f-4e4d-861b-543a424f45d9",
+ "name": "Start the workflow with ComfyUI"
+ }
+ ],
+ "pinData": {},
+ "connections": {
+ "On form submission": {
+ "main": [
+ [
+ {
+ "node": "Configuration",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Setup defaults": {
+ "main": [
+ [
+ {
+ "node": "Start the workflow with ComfyUI",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Get video generation status": {
+ "main": [
+ [
+ {
+ "node": "Completed?",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Wait until the video gets generated": {
+ "main": [
+ [
+ {
+ "node": "Get video generation status",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Completed?": {
+ "main": [
+ [
+ {
+ "node": "Success?",
+ "type": "main",
+ "index": 0
+ }
+ ],
+ [
+ {
+ "node": "Wait until the video gets generated",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Success?": {
+ "main": [
+ [
+ {
+ "node": "HTTP Request",
+ "type": "main",
+ "index": 0
+ }
+ ],
+ [
+ {
+ "node": "Stop and Error",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Configuration": {
+ "main": [
+ [
+ {
+ "node": "Setup defaults",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ },
+ "Start the workflow with ComfyUI": {
+ "main": [
+ [
+ {
+ "node": "Wait until the video gets generated",
+ "type": "main",
+ "index": 0
+ }
+ ]
+ ]
+ }
+ },
+ "active": false,
+ "settings": {
+ "executionOrder": "v1"
+ },
+ "versionId": "30c27d48-00d5-4979-b1b5-6643267727b3",
+ "meta": {
+ "instanceId": "636db6b6ab21a21c6458e2137f340e33dc3e49f5a1c560c8d1e2372c227cf40e"
+ },
+ "id": "DuIW59NyIFVGq0C4",
+ "tags": []
+}
\ No newline at end of file