BetterWaifu Logo
betterwaifu
BetterWaifu
ModelsBlogPricingDiscord
Generate

Footer

BetterWaifu

  • About
  • Guides
  • Models
  • Contact

Tools

  • Prompt Detector
  • Hentai Generator

Use Cases

  • BSDM AI Generator
  • Futanari AI Generator
  • AI Feet Generator
  • Gay AI Generator
  • Furry AI Generator
  • Femboy AI Generator

Legal

  • Privacy
  • Terms

Subscribe to BetterWaifu

The latest updates on NSFW AI

FacebookInstagramXGitHubYouTube

© 2025 BetterWaifu.com. All rights reserved.

    How to install and use Wan 2.1 (hentai video generation)

    How to install and use Wan 2.1 (hentai video generation)

    Guides
    Video
    g

    By gerogero

    Updated: April 4, 2025

    This is a beginner’s guide to help you install Wan and implement every available optimization to maximize the speed of video generation.

    Now achieving this involves trade-offs in quality, but you can easily disable any of the optimizations if you prefer to prioritize quality over speed.

    The included guide and workflows are tailored for GPUs with 24GB or more of VRAM, typically utilizing 21-23GB during generation. While it’s possible to use a GPU with less than 24GB, you’ll need to make adjustments. For example, a 16GB GPU can use FP8/Q8 models, provided you increase the virtual_vram_gb or block swapping settings in the provided workflows. We’ll get to these later.

    If you’re under 16GB, you’ll probably want to use the models quantized below Q8, but keep in mind that using a lower quantization level will reduce the quality of your outputs. In general, the lower you go, the lower the quality you get.

    1. /ldg/ Wan 2.1 Install and Optimization Guide
      1. Prerequisites – INSTALL FIRST
      2. Choose Implementation
      3. Option 1 – Kijai’s Wrapper
      4. Option 2 – Comfy Native
      5. General Install Steps
      6. Important Notes Before You Gen
      7. Supported Resolutions
      8. Generating at 720P
      9. The Optimizations

    Prerequisites – INSTALL FIRST

    ComfyUI Portable
    ComfyUI Manager
    CUDA 12.6

    Choose Implementation

    Wan 2.1 can be integrated into ComfyUI through two approaches: Native support or Kijai’s Wrapper. Kijai’s Wrapper has additional features that Native does not (flowedit, vid2vid, etc), while Native boasts several advantages unavailable in Kijai’s version. These are; support for gguf models, Adaptive Guidance (a method to speed up generations at the cost of quality), and TorchCompile compatibility across not only the 40XX and 50XX GPU series, but also the 30XX series, which speeds up generations by an additional 30% or so. So if you’re using less than 24GB of VRAM and/or want to the fastest gen speeds, Native is likely the better option.

    Once you’ve settled on a method and its associated workflow, proceed to the general installation steps.

    Option 1 – Kijai’s Wrapper

    Download these modified versions of Kijai’s default workflows. Beyond the optimizations and a few extra features, they use Alibaba’s default settings as a baseline. The workflow outputs two videos, raw 16 fps and an interpolated 32 fps version. You can easily adapt these to use the 720P model/setting. See Generating at 720P.

    /ldg/ KJ i2v 480p workflow: ldg_kj_i2v_14b_480p.json
    (updated 17th March 2025)

    /ldg/ KJ t2v 480p workflow: ldg_kj_t2v_14b_480p.json
    (updated 17th March 2025)

    1. Ensure that ComfyUI is updated to the very latest version. (update_comfyui.bat in ComfyUI_windows_portable\update)
    2. Download these models.

    Do NOT use Comfy model files with KJ’s! You MUST use these or you will encounter issues!

    • Wan2_1-I2V-14B-480P_fp8_e4m3fn.safetensors goes in ComfyUI\models\diffusion_models\WanVideo
    • Wan2_1-I2V-14B-720P_fp8_e4m3fn.safetensors goes in ComfyUI\models\diffusion_models\WanVideo
    • Wan2_1-T2V-14B_fp8_e4m3fn.safetensors goes in ComfyUI\models\diffusion_models\WanVideo
    • umt5-xxl-enc-bf16.safetensors goes in ComfyUI\models\text_encoders
    • open-clip-xlm-roberta-large-vit-huge-14_fp16.safetensors goes in ComfyUI\models\text_encoders
    • Wan2_1_VAE_bf16.safetensors goes in ComfyUI_windows_portable\ComfyUI\models\vae\wanvideo
    1. Move to General Install Steps.

    Option 2 – Comfy Native

    Download these modified versions of Comfy’s workflows, based on an anon’s from /ldg/. Beyond the optimizations and a few extra features, they use Alibaba’s default settings as a baseline. The workflow outputs two videos, raw 16 fps and an interpolated 32 fps version. You can easily adapt these to use the 720P model/setting. See Generating at 720P.

    /ldg/ Comfy i2v 480p workflow: ldg_cc_i2v_14b_480p.json
    (updated 17th March 2025)

    /ldg/ Comfy t2v 480p workflow: ldg_cc_t2v_14b_480p.json
    (updated 17th March 2025)

    1. Ensure that ComfyUI is updated to the very latest version. (update_comfyui.bat in ComfyUI_windows_portable\update)
    2. Download these models. If you have less than 24GB of VRAM, you could also swap out the Q8 models for Q6/Q5/Q4, though you’ll see a progressively larger drop in output quality the lower you go.

    Do NOT use Kijai’s text encoder files with these models! You MUST use these text encoders or it will error out before generating with Exception during processing !!! mat1 and mat2 shapes cannot be multiplied (77x768 and 4096x5120)

    • wan2.1-i2v-14b-480p-Q8_0.gguf goes in ComfyUI\models\diffusion_models\
    • wan2.1-i2v-14b-720p-Q8_0.gguf goes in ComfyUI\models\diffusion_models\
    • wan2.1-t2v-14b-Q8_0.gguf goes in ComfyUI\models\diffusion_models\
    • umt5_xxl_fp16.safetensors goes in ComfyUI\models\text_encoders
    • clip_vision_h.safetensors goes in ComfyUI\models\clip_vision\
    • wan_2.1_vae.safetensors goes in ComfyUI_windows_portable\ComfyUI\models\vae\
    1. Move to General Install Steps.

    General Install Steps

    1. Download and run this as instructed to automatically install Triton and Sage, which will drastically speed up your generations.
    2. Open a cmd.exe prompt in ComfyUI_windows_portable\ and run the following command. This installs a recent pytorch nightly for CUDA 12.6, which lets you use fp16 accumulation, an optimization that decreases generation time..\python_embeded\python.exe -s -m pip install torch==2.7.0.dev20250306+cu126 torchvision torchaudio –index-url https://download.pytorch.org/whl/nightly/cu126 –force-reinstall
    3. Edit run_nvidia_gpu.bat in ComfyUI_windows_portable and change the first line to this :.\python_embeded\python.exe -s ComfyUI\main.py –windows-standalone-build –use-sage-attention –fast
    4. Run ComfyUI. Look in the cmd.exe console window and make sure pytorch version: 2.7.0.dev20250306+cu126 is shown during startup. You should also see Enabled fp16 accumulation and Using sage attention.

    There’s a possible bug when you update extensions or restart which reports an incorrect version of pytorch. If that happens, close Comfy and restart. This seems to happen most often if you use the “Restart” button in comfy after updating extensions, so close it manually and start it up manually after updating extensions. It can also happen after updating Comfy. If upon a second restart it still isn’t 2.7.0dev, do step 5 again.

    1. Open one of the workflows. Open Manager and install Missing Custom Nodes. Finally, install the ComfyUI-GGUF extension.

    If it still complains about missing nodes after installing them and restarting Comfy, you might need to install the missing nodes manually. If this happens using KJ’s wrapper, install the wrapper manually from his repo, deleting the old version from custom_nodes beforehand. Same goes for KJNodes if it complains about missing WanVideoEnhanceAVideoKJ. Make sure you follow the install instructions for the portable install.

    1. For the video interpolation model, go to this repo and download film_net_fp32.pt, placing it in ComfyUI\custom_nodes\comfyui-frame-interpolation\ckpts\film
    2. Make sure that every time you start Comfy, pytorch version reads 2.7.0dev or fp16_fast / fp16 accumulation won’t work.
    3. Run your first gen. If it freezes during model loading with “Press any key to continue” in the cmd.exe window, you need to restart your computer. If you get this error when running the workflow :ImportError: DLL load failed while importing cuda_utils: The specified module could not be found.Go to \users\username\ and open the .triton directory. Delete the cache subdirectory inside of it. Do not delete the entire .triton directory.

    Important Notes Before You Gen

    The initial generation time you get is NOT accurate. Teacache kicks in during the gen, and Adaptive about midway through if you’re on Comfy Native/Core.

    When a video finishes generating, you’ll get two files in their own i2v or t2v directories and subdirectories. The raw files are the 16 frame outputs while the int files are interpolated to 32 frames which gives you much smoother motion.

    It is highly recommended you enable previews during generation. If you followed the guide, you’ll have the extension required. Go to ComfyUI Settings (the cog icon at the bottom left) and search for “Display animated previews when sampling”. Enable it. Then open Comfy Manager and set Preview method to TAESD (slow). The output will become clearer by about step 10, and you’ll get a general sense of the composition and movement. This can and will save you a lot of time, as you can cancel gens early if you don’t like how they look.

    NEVER use the 720p i2v model at 480p resolutions and vice versa. If you use the 720p i2v model and set your res to 832×480 for example, the output you get will be much worse than simply using the 480p i2v model. You won’t ever improve quality by genning 480p on the 720p model, so don’t do it. The only model which allows you to mix 480p and 720p resolutions is t2v 14B.

    Supported Resolutions

    Each model is trained and fine-tuned for specific resolutions. In theory, deviating from these precise resolutions may produce poorer results compared to sticking with the supported ones, especially for i2v.

    However, in my experience, I’ve successfully used non-standard resolutions with i2v without noticeable problems, as long as the adjustments remained reasonable. For example, you should avoid making drastic departures from 480p or 720p, and always anchor one dimension – either 480 for 480p models or 720 for 720p models – while scaling the other dimension downward (never upward) to adjust the aspect ratio. This means one dimension should consistently be fixed at either 480 or 720, depending on the model, with the other dimension adjusted lower as needed. And you never want to exceed the maximum set value of 832 for 480p and 1280 for 720p, as you’ll drastically increase generation time and go outside the bounds of the resolution limits set by the model’s developers.

    These are the ‘supported’ resolutions as listed in Wan’s official repo :

    Text to Video – 1.3BText to Video – 14BImage to Video – 480pImage to Video – 720p
    480*832720*1280832*4801280*720
    832*4801280*720480*832720*1280
    624*624960*960
    704*5441088*832
    544*704832*1088
    480*832
    832*480
    624*624
    704*544
    544*704

    Generating at 720P

    If you want to use the 720p model in i2v or 720p res on t2v, you’ll need to:

    • On t2v, you need to increase the resolution to 720p (1280×720 / 720×1280). The single 14B t2v model supports both 480p and 720p.
    • When using i2v on Wan, start by selecting the i2v 720P model in the model loader. Next, adjust the width and height settings of your input image to 1280×720 or 720×1280. This model is optimized and performs best at this exact resolution, but you can tweak it slightly to accommodate different aspect ratios. For the best results, always maintain either the height or width at 720, while proportionally scaling the other dimension down (e.g., 1152×720, 1024×720, or 720×960). What you don’t want to do is exceed 1280 on either dimension.
    • On Comfy Native, set Teacache coefficients to i2v_720. Kijai’s wrapper automatically selects the correct coefficients.
    • Set Teacache threshold to 0.2, which is the medium setting. Increase it to 0.3 for faster gens at the expense of a hit to output quality.
    • Increase virtual_vram_gb (Comfy Native) or block swaps (Kijai’s Wrapper) depending on which implementation you use.
      On a 24GB GPU, you want to increase it until you’re using just under 23GB in total. You never want to exceed 23.5GB use total, or gen times will massively increase.

    The Optimizations

    Several options in this guide speed up inference time. They are fp16_fast (fp16 accumulation), TeaCache, Torch Compile, AdaptiveGuidance (exclusive to Comfy Native) and Sage Attention. If you wish to disable them for testing or to increase quality at the expense of time, do the following :

    • fp16_fast : remove –fast from run_nvidia_gpu.bat. If you’re using KJ’s, you also need to set WanVideo Model Loader’s base_precision from fp16_fast to fp16
    • Sage Attention : remove –use-sage-attention from run_nvidia_gpu.bat
    • AdaptiveGuidance : set the AdaptiveGuidance node to a threshold of 1
    • Torch Compile : right click on the TorchCompileModelWanVideo node and click Bypass
    • TeaCache : right click the TeaCache node and click Bypass

    Related Posts

    Guide to Prompting with Illustrious Models

    Complicated desired outputs = Complex prompts with mix of natural language and tags Complex prompt structure and order: Simple Prompt Example: Resu...

    Read more

    Guide to AI Pose Prompting (NSFW)

    This guide was created to bring inspiration to this visual vocabulary. There is a short description for each pose so that you can connect the word ...

    Read more

    Can Chatgpt GPT-4o image generation do NSFW/nudity? GPT-4o massive nerf and other findings

    GPT-4o, released on March 25, 2025 went viral soon after release, bolstered by the Studio Ghibli animation style trend. Most people are curious if ...

    Read more

    Automatic1111 Stable Diffusion WebUI for Hentai Generation (SD1.5 Tutorial)

    This guide is intended to get you generating quality NSFW images as quickly as possible with Automatic1111 Stable Diffusion WebUI. We’ll be u...

    Read more

    Hunyuan Video Generation Guide (ComfyUI)

    This tutorial will provide a comprehensive guide on using Tencent’s Hunyuan Video model in ComfyUI for text-to-video generation. We will walk you t...

    Read more

    Ultimate Guide to NoobAI

    Welcome to the NoobAI guide This document provides a comprehensive, complete and up-to-date introduction to the NoobAI-XL model. What is Noob? Noob...

    Read more