Fixing the WanVideoSetLoras Nonetype Object Has No Attribute Lower Error

Fixing the WanVideoSetLoras Nonetype Object Has No Attribute Lower Error

You're deep into a creative flow, trying to generate that perfect video using the new WanVideo architecture, and suddenly everything grinds to a halt. Your terminal or ComfyUI console spits out a wall of red text ending in a frustratingly vague line: wanvideosetloras 'nonetype' object has no attribute 'lower'. It’s annoying. It feels like the code is speaking a different language. Honestly, this specific error is becoming a rite of passage for anyone messing with Wan2.1 or localized video LoRA implementations right now.

Python is trying to tell you something very simple, even if it looks like gibberish. It encountered a variable that it expected to be a piece of text—a string—so it could perform a .lower() function on it to standardize the casing. Instead, it found "None." You can't turn "nothing" into lowercase. In the context of the WanVideoSetLoras node or script, this usually means a path is missing, a model name wasn't selected, or a configuration file is pointing to a void.

Why WanVideoSetLoras Is Throwing This Error

Most of the time, this happens because of a breakdown in how the LoRA (Low-Rank Adaptation) name is being passed to the loader. If you are using ComfyUI, look at your node. Did you actually select a LoRA from the dropdown menu? If the "lora_name" field is empty or says "None," the code attempts to process that "None" as if it were a filename like wan_video_motion_style.safetensors. When the script hits the line of code that tries to check the file extension—often by converting the name to lowercase to see if it ends in .safetensors—it crashes.

It isn't always your fault, though. Sometimes the issue lies in the __init__.py or the specific mapping file of the custom node extension. If the extension is looking for a specific folder structure—say, models/loras/wan—and you have your files just sitting in the root models/loras folder, the search function might return a NoneType result. This is a classic pathing mismatch.

The Logic Behind the Crash

In Python, the .lower() method is a string-only operation. When developers write these nodes, they often include a line like if lora_name.lower().endswith(".safetensors"):. This is great for cleanliness, but it lacks a "null check." A robust script would first check if lora_name is not None:. Without that check, the moment a user leaves a field blank or a file goes missing, the whole stack trace collapses.

Real-World Fixes for the WanVideo Nonetype Issue

First things first: check your inputs. If you’re using a workflow you downloaded from a site like Civitai or OpenArt, the original creator might have had their LoRAs named differently than yours.

  • Refresh your headers. In ComfyUI, click "Refresh" on the sidebar and then re-select the LoRA in the WanVideoSetLoras node. This forces the UI to re-bind the string variable to an actual filename rather than a stale reference.
  • Check the folder paths. Ensure your WanVideo LoRAs are in the directory the extension expects. Some Wan-specific nodes require a dedicated subfolder within your LoRA directory. If the node expects WanVideo/loras/ but you have them in ComfyUI/models/loras/, it might see an empty list and default to None.
  • Update the Custom Node. Use the ComfyUI Manager to fetch the latest updates. Developers working on WanVideo nodes are pushing fixes almost daily right now as the architecture is still relatively fresh. A lot of these AttributeError bugs are being patched with simple "if-then" logic to handle empty inputs.

Editing the Code (The "I'll Do It Myself" Approach)

If you're comfortable opening a .py file, you can often fix this yourself in thirty seconds. Navigate to the custom nodes folder where the WanVideo extension is located. Find the file handling the LoRA set—likely named something like wan_video_nodes.py.

Search for the string .lower(). You’ll probably find a line that looks like if lora_name.lower(). You can wrap this in a protective check. Change it to if lora_name and lora_name.lower(). By adding lora_name and before the call, Python will first check if lora_name has a value. If it's None, it stops right there and doesn't try to run .lower(), preventing the crash.

Misconceptions About WanVideo Errors

People often think this means their LoRA file is corrupted. It almost never means that. A corrupted Safetensors file would usually throw a "Header too large" or "Invalid file format" error. A NoneType error is purely a communication breakdown between the user interface and the backend script.

🔗 Read more: Stream Live TV Free Online: Why Most People Are Still Paying Too Much

Another common mistake is thinking the GPU is out of memory. While Wan2.1 is incredibly heavy on VRAM, an AttributeError is a software logic error, not a hardware limitation. You could have a dual H100 setup and still trigger this if your file path is wrong.

A Nuanced Look at Environment Variables

Sometimes the problem is deeper, tied to how your Python environment sees your file system. If you are running ComfyUI through a Docker container or a portable standalone version, the internal paths might be virtualized.

If the wanvideosetloras 'nonetype' object has no attribute 'lower' error persists even after you've selected a file, check your extra_model_paths.yaml file. If you’ve mapped a custom folder for your models, ensure there aren't any trailing slashes or weird characters that might be confusing the node's ability to "see" the file list. If the list is empty, the default selection becomes None, and we are back at square one.

The Role of Wan2.1 Architecture

Wan2.1 handles LoRAs differently than SDXL or SD1.5. Because the transformer blocks are structured specifically for video temporal consistency, the LoRA injection happens at very specific points in the sampling process. If the node fails to initialize the LoRA weights because it can't find the name string, the entire U-Net (or Transformer) configuration fails to build. That’s why the error happens instantly upon clicking "Queue Prompt" rather than halfway through the generation.

Actionable Steps to Clear the Error

Stop banging your head against the desk and follow this sequence to get back to generating.

🔗 Read more: How to Find Out What MacBook I Have: The Expert Guide

  1. Hard Reset the Node: Delete the WanVideoSetLoras node from your workspace and add a fresh one. Sometimes the internal "hidden" state of a node gets stuck on a null value that isn't visible in the UI.
  2. Verify Filenames: Avoid using special characters or emojis in your LoRA filenames. While modern Python handles UTF-8 well, some older file-walking scripts used in custom nodes still choke on anything that isn't standard alphanumeric text.
  3. Check for "None" in the JSON: If you are a power user, save your workflow as an API JSON. Open it in a text editor and search for the WanVideoSetLoras entry. If the lora_name value is null or empty, manually type the filename there and re-import the JSON.
  4. Check the Console Log: Scroll up in your terminal. Usually, right before the AttributeError, there will be a "File Not Found" or "Warning: LoRA directory empty" message. This is the real clue. The NoneType error is just the final symptom of that earlier failure to find the file.

If all else fails, move your LoRA files to the default ComfyUI/models/loras folder and remove any subdirectories. Some older versions of the Wan loading scripts aren't recursive—they won't look inside folders. Keeping everything flat in the main directory is a "dumb" but effective way to ensure the script finds what it needs.

Fixing the wanvideosetloras 'nonetype' object has no attribute 'lower' error is really about ensuring the data pipeline is unbroken. Once you've confirmed the script is actually seeing a string and not a "None," the error vanishes. You can then get back to the actual work of generating high-quality AI video without the technical roadblocks.