Skip to content

[Bug]: deforum has broken forge neo #24

Closed

Description

@dees-sp

What happened and why was it ungood?

My forge neo was working well, then I tried to install sd-forge-deforum.
I followed the instruction (git clone, setup.sh, installed dependencies). I skipped downloading models because command didnt work. I tried launching forge, and this is what I get now :

Traceback (most recent call last):
  File "sd-webui-forge-neo\venv\Lib\site-packages\diffusers\utils\import_utils.py", line 1016, in _get_module
    return importlib.import_module("." + module_name, self.__name__)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "Users\g\AppData\Roaming\uv\python\cpython-3.11.14-windows-x86_64-none\Lib\importlib\__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1147, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 690, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "sd-webui-forge-neo\venv\Lib\site-packages\diffusers\loaders\ip_adapter.py", line 40, in <module>
    from ..models.attention_processor import (
  File "sd-webui-forge-neo\venv\Lib\site-packages\diffusers\models\attention_processor.py", line 35, in <module>
    import xformers.ops
  File "sd-webui-forge-neo\venv\Lib\site-packages\xformers\ops\__init__.py", line 9, in <module>
    from .fmha import (
  File "sd-webui-forge-neo\venv\Lib\site-packages\xformers\ops\fmha\__init__.py", line 10, in <module>
    from . import (
  File "sd-webui-forge-neo\venv\Lib\site-packages\xformers\ops\fmha\flash3.py", line 110, in <module>
    from ...flash_attn_3 import _C  # type: ignore[attr-defined]  # noqa: F401
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: DLL load failed while importing _C: The specified module could not be found.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "sd-webui-forge-neo\launch.py", line 54, in <module>
    main()
  File "sd-webui-forge-neo\launch.py", line 50, in main
    start()
  File "sd-webui-forge-neo\modules\launch_utils.py", line 512, in start
    import webui
  File "sd-webui-forge-neo\webui.py", line 23, in <module>
    initialize.imports()
  File "sd-webui-forge-neo\modules\initialize.py", line 37, in imports
    from modules import gradio_extensions, processing, ui  # noqa: F401
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "sd-webui-forge-neo\modules\processing.py", line 22, in <module>
    import modules.sd_models as sd_models
  File "sd-webui-forge-neo\modules\sd_models.py", line 11, in <module>
    from backend.loader import forge_loader
  File "sd-webui-forge-neo\backend\loader.py", line 12, in <module>
    from backend.diffusion_engine.chroma import Chroma
  File "sd-webui-forge-neo\backend\diffusion_engine\chroma.py", line 6, in <module>
    from backend.modules.k_prediction import PredictionFlux
  File "sd-webui-forge-neo\backend\modules\k_prediction.py", line 6, in <module>
    from diffusers.pipelines.flux.pipeline_flux import calculate_shift
  File "sd-webui-forge-neo\venv\Lib\site-packages\diffusers\pipelines\flux\pipeline_flux.py", line 30, in <module>
    from ...loaders import FluxIPAdapterMixin, FluxLoraLoaderMixin, FromSingleFileMixin, TextualInversionLoaderMixin
  File "<frozen importlib._bootstrap>", line 1229, in _handle_fromlist
  File "\sd-webui-forge-neo\venv\Lib\site-packages\diffusers\utils\import_utils.py", line 1006, in __getattr__
    module = self._get_module(self._class_to_module[name])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "sd-webui-forge-neo\venv\Lib\site-packages\diffusers\utils\import_utils.py", line 1018, in _get_module
    raise RuntimeError(
RuntimeError: Failed to import diffusers.loaders.ip_adapter because of the following error (look up to see its traceback):
DLL load failed while importing _C: The specified module could not be found.

and forge won't start anymore

Activity

  1. added 2 commits that reference this issue on Jan 29, 2026
    3070acd
    10700bc
  2. Tok commented on Jan 29, 2026

    @Tok
    Owner

    ✅ Fixed in commits 3070acd and 10700bc

    Thank you @dees-sp for reporting this critical issue! You've helped identify a dependency conflict that was breaking Forge Neo installations for users.

    Root Cause

    The extension was auto-installing Depth-Anything V3, which has optional dependencies (xformers, flash-attn) that require compiled CUDA extensions. When these fail to install properly on systems without CUDA toolkit or on Python 3.12+, they create partial installations that break Forge's entire import chain.

    What's Fixed

    1. requirements.txt changes:

    • ✅ Disabled DA3 auto-install (now optional, must be manually installed)
    • ✅ Pinned diffusers>=0.36.0,<0.37.0 (matches Forge Neo 0.36.0)
    • ✅ Pinned transformers>=4.36.0,<=4.56.2 (matches Forge Neo 4.56.2)
    • ✅ Added comprehensive documentation explaining the changes

    2. New documentation:

    • ✅ docs/TROUBLESHOOTING.md - Comprehensive troubleshooting guide
    • ✅ docs/ISSUE_24_FIX.md - Step-by-step repair instructions
    • ✅ Updated CLAUDE.md and setup.sh with dependency notes

    How to Fix Your Installation

    Quick Repair (5 minutes)

    # 1. Update Forge Neo
    cd /path/to/forge-neo
    git pull origin neo
    
    # 2. Remove broken packages
    source venv/bin/activate  # Linux/Mac
    # OR: venv\Scripts\activate on Windows
    pip uninstall xformers flash-attn flash-attn-3 depth-anything-3 -y
    
    # 3. Reinstall Forge requirements
    pip install -r requirements.txt --force-reinstall
    
    # 4. Update Deforum with fixes
    cd extensions/sd-forge-deforum
    git pull origin dev
    pip install -r requirements.txt
    
    # 5. Test launch
    cd /path/to/forge-neo
    python webui.py

    Forge should now launch successfully! 🎉

    Detailed Guide

    See docs/ISSUE_24_FIX.md for comprehensive repair instructions, troubleshooting, and clean reinstall options.

    What Still Works (Everything!)

    ✅ All animation modes:

    • 3D mode with depth warping
    • Flux + Interpolation mode
    • All keyframe distribution modes

    ✅ All depth features:

    • Depth-Anything V2 (default, excellent quality)
    • All depth-based transformations
    • Camera movement and warping

    ✅ All video features:

    • Wan video generation (TI2V, FLF2V)
    • FILM interpolation
    • Qwen prompt enhancement
    • Camera Shakify

    ✅ All models:

    • Flux.1 Dev/Schnell
    • Lumina 2.0
    • Z-Image Turbo
    • SDXL

    What Requires Manual DA3 Install (Advanced Features Only)

    ❌ Only if you need:

    • Multi-view depth estimation
    • 3D Gaussian Splatting (3DGS)
    • Depth-ray pose estimation

    To install DA3 (optional):

    # Only if you have Python 3.11 + CUDA toolkit!
    pip install git+https://github.com/ByteDance-Seed/Depth-Anything-3.git

    Impact

    • Core Deforum functionality: Unchanged, uses Depth-Anything V2 (always available)
    • Breaking change: DA3 features require manual installation (to prevent breaking Forge)
    • Compatibility: Fixed dependency conflicts with Forge Neo's pinned versions

    Testing

    • ✅ Verified DA3/xformers/flash-attn are not in active requirements
    • ✅ Verified diffusers and transformers versions match Forge Neo
    • ✅ Verified graceful error handling in deforum/depth/depth.py:117-128
    • ✅ Verified DA2 continues as default depth model

    Thanks again for the detailed bug report! This fix will prevent many users from experiencing broken installations. If you encounter any issues with the repair steps, please let us know.

    Additional resources:

  3. dees-sp commented on Jan 30, 2026

    @dees-sp
    Author

    wow, you're super fast! Glad I could contribute a little, thanks for your your work

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions