LogoWonderful Launcher
  • Home
  • Pricing
  • Docs
  • Download

ModuleNotFoundError: No module named 'pydantic_settings' in ComfyUI

Partially verifiedLow riskLast verified 2026-07-08

Fix ComfyUI No module named pydantic_settings errors by installing pydantic-settings in the exact Python environment that starts ComfyUI.

If ComfyUI repeats No module named 'pydantic_settings', install the package named pydantic-settings in the same Python environment that launches ComfyUI.

The import name uses an underscore: pydantic_settings. The pip package name uses a hyphen: pydantic-settings. That mismatch is the main trap.

In the SEO Lab portable repair, this warning appeared many times while ComfyUI tried to parse pyproject.toml files. Installing pydantic-settings did not fix every remaining warning by itself, but it removed a large block of repeated noise and exposed the next real missing package.

Fast answer

For the GitHub Windows portable package:

.\python_embeded\python.exe -s -m pip show pydantic-settings
.\python_embeded\python.exe -s -m pip install pydantic-settings
.\python_embeded\python.exe -s -c "import pydantic_settings; print('import ok')"
.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build

Do not run pip install pydantic_settings. Use pydantic-settings.

What The Log Looks Like

The repeated warning often looks like this:

Unable to parse pyproject.toml due to lack dependency pydantic-settings,
please run 'pip install -r requirements.txt': No module named 'pydantic_settings'

You may see the same line many times because ComfyUI or a plugin scans multiple package metadata files during startup.

Quick Diagnosis

What You SeeMeaningFirst Action
No module named 'pydantic_settings'The import module is missingInstall pydantic-settings
The log says pip install -r requirements.txtA dependency file may include itStill install into the Python that starts ComfyUI
The line repeats dozens of timesMetadata parsing is noisyFix this package, then restart and read the shorter log
A new missing package appears after restartYou fixed one layerContinue with the new first blocker
pydantic is installed but this still failspydantic-settings is a separate packageInstall the separate package

Step 1: Confirm The Active Python

For Windows portable, run from the folder that contains python_embeded and ComfyUI:

.\python_embeded\python.exe -s -c "import sys; print(sys.executable)"
.\python_embeded\python.exe -s -m pip show pydantic pydantic-settings

For a manual venv:

python -c "import sys; print(sys.executable)"
python -m pip show pydantic pydantic-settings

If the path points to system Python instead of your ComfyUI environment, stop and switch environments before installing.

Step 2: Install The Right Package Name

Windows portable:

.\python_embeded\python.exe -s -m pip install pydantic-settings

Manual venv:

python -m pip install pydantic-settings

Then verify the import name:

.\python_embeded\python.exe -s -c "import pydantic_settings; print('import ok')"

Step 3: Restart And Read The Shorter Log

Restart ComfyUI:

.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build

If the pydantic_settings warnings disappear but a new ModuleNotFoundError appears, treat the new line as the next package in the repair chain. Do not paste a long list of unrelated dependencies into the environment just to silence the first warning.

What Not To Do

  • do not install pydantic_settings; that is the import name, not the pip package name
  • do not assume pydantic includes pydantic-settings
  • do not run system pip when ComfyUI starts from python_embeded
  • do not treat repeated metadata warnings as proof that the whole ComfyUI folder is unrecoverable
  • do not keep installing packages after Torch, CUDA, or OpenCV conflicts appear; switch to the dependency conflict guide

Related Guides

  • Repair ComfyUI Portable Dependencies One Missing Module At A Time
  • Fix No module named errors in ComfyUI
  • ComfyUI Dependency Conflicts
  • ComfyUI Plugin Import Failed
  • No module named 'simpleeval' in ComfyUI

Source References

  • Windows portable SEO Lab repair, May 18, 2026: repeated No module named 'pydantic_settings' while parsing pyproject.toml
  • Same lab cleanup action: pip install pydantic-settings reduced the repeated warning block before the next missing package was handled
  • pydantic-settings on PyPI

Start free with Wonderful Launcher if this affects your real ComfyUI environment. It keeps launcher-native repair, task logs, and runtime checks in one place; credits are only for image generation and metered tools.

Download Wonderful LauncherSee credit packages

Did this fix your issue?

Your answer helps prioritize verified ComfyUI repairs.

Table of Contents

What The Log Looks Like
Quick Diagnosis
Step 1: Confirm The Active Python
Step 2: Install The Right Package Name
Step 3: Restart And Read The Shorter Log
What Not To Do
Related Guides
Source References