Nodes/ComfyUI-DonutNodes/Donut Dependency Check
ComfyUI Node

Donut Dependency Check

Your Nodes Vanished? This Diagnostic Tells You Why — Without Breaking Anything

By DonutsDelivery·Created about a year ago·Updated 2 days ago· 22
Donut Dependency Check
    • report
    probe_importsfalse

    One day you restart ComfyUI and half the Donut nodes are gone from the palette. The console is full of "numpy.core.umath failed to import" or "numpy.ufunc size changed". The usual advice - force-reinstall NumPy, delete the environment, rebuild the world - is exactly what you should not do. This node exists to keep you from that. It's a read-only doctor's visit for your Python environment, and it never installs, removes, or downgrades anything.

    DonutDependencyCheck comes from ComfyUI-DonutNodes, DonutsDelivery's personal-but-ambitious pack that does block-weighted LoRA stacking, model merging for Z-Image Turbo (ZIT) and Krea 2, detailers, and upscaling. That pack touches a lot of binary wheels - OpenCV, SciPy, Matplotlib, plus whatever PyTorch/NumPy ComfyUI already runs - which is exactly the setup where one bad dependency upgrade takes down a dozen unrelated nodes. So the author built a diagnostic node and, smartly, registers it first, independent of every optional wheel. If a component of the pack fails to import, this node is still there waiting in your node list.

    How it works

    The report is generated in two tiers. First it reads distribution metadata - version numbers for NumPy, PyTorch, SciPy, Matplotlib and any OpenCV variant - using importlib.metadata, which never actually imports a wheel. That catches "what's installed" but not "does it work together", which is the real question.

    That's what the probe_imports toggle is for. Flip it to On and the node runs actual smoke tests - NumPy array math, a PyTorch↔NumPy bridge, an cv2.cvtColor, SciPy FFT plus linear_sum_assignment, a Matplotlib render - each in a short-lived child process with up to 20 seconds each. Broken extension crashes the child, not your ComfyUI session. The tooltip's advice to "use a blank workflow if nodes are missing" matters: if a Donut component failed to load, its node isn't in the palette to drag, but the diagnostic node always is.

    The one input and what you get

    • probe_imports (Boolean, default Off) - the only input. Run the isolated binary-compatibility probes or just read installed versions.

    The single output is a report STRING. It lists your Python version and interpreter path, each installed distribution, and flags the classic gotcha: multiple OpenCV distributions installed at once (opencv-python and opencv-python-headless share the cv2 namespace - keep one). It also shows startup failures the pack logged on import, and - when you've enabled probes - flags whether an error is a genuine NumPy ABI incompatibility rather than a regular bug.

    When to reach for it

    If you're on the pack's Krea2 or ZIT merge/detailer workflows and something stops loading, run this before you touch anything. The report's guidance is the part people ignore: a NumPy 2.x install cannot fix an extension compiled against NumPy 1.x, so don't blindly downgrade NumPy globally - ComfyUI and every other custom node share that interpreter. Repair the specific failing package in ComfyUI's Python, rerun the pack's requirements.txt, and restart. If ComfyUI itself won't start at all, the module supports standalone mode so you can still get the report from a plain terminal.

    Install

    Install the whole pack (this node ships inside it) via ComfyUI Manager - search "DonutNodes" - or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/DonutsDelivery/ComfyUI-DonutNodes.git
    cd ComfyUI-DonutNodes
    python -m pip install -r requirements.txt
    

    Run that pip line with the same Python that launches ComfyUI. The pack's requirements pull in opencv-python-headless, scipy, matplotlib, psutil, tqdm and requests, declared as minimum floors rather than exact pins - just watch the OpenCV variant warning above. You'll rarely need more than one report; keep probe_imports Off for speed and turn it on only when something's actually broken.

    CategoryDonut/diagnostics

    Inputs (1)

    NameTypeDefaultDescription
    probe_importsBOOLEANfalseRead-only checks of NumPy, PyTorch/NumPy, OpenCV, SciPy and Matplotlib in child processes (up to 20 seconds each). Never installs packages. Use a blank workflow if nodes are missing.

    Outputs (1)

    NameTypeDescription
    reportSTRING