Skip to content

Windows DLLs require the MSVC runtime on clean Windows #50

Closed

Description

@leehack

Windows runtime DLLs need the MSVC runtime, which clean Windows lacks.

On a clean Windows Server 2022 VM, ctypes loading of bin/windows-x64/lib/stable-diffusion.dll and bin/windows-x64-vulkan/... fails with "Could not find module" (missing MSVCP140.dll/VCRUNTIME140.dll). After installing the Microsoft-signed vc_redist.x64.exe, both load, and CPU and Vulkan (NVIDIA L4) generation pass.

  • Present since at least v0.3.0-6 (same imports); not a v0.4.0 regression.
  • v0.4.0 documents the prerequisite (maintainer decision 2026-11-17).

Proposed fix: link the static CRT (/MT, CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded) for the Windows targets, or ship the redistributable DLLs app-locally, and add a clean-Windows load check to CI or release validation.

Evidence: v0.4.0 Windows gate run3 (dll-loads-on-clean-windows FAIL, dll-loads-after-redist PASS).

Activity

  1. added
    enhancement
    priority:P3
    on Nov 17, 2026
  2. leehack commented on Nov 22, 2026

    @leehack
    OwnerAuthor

    Decision 2026-11-22 (the user chose "Bundle runtime, defer to 0.20.7"): keep /MD and ship the four VC++ v14 runtime DLLs app-locally, as llamadart-native and litert-lm-native do. /MT was rejected because the public sd_*_params_to_str exports return memory the caller frees, and a private static CRT would break that. The owner rebuild ships as v0.4.0-1; the llamadart repin targets 0.20.7. Plan: llamadart-evidence/release-0.20.6/plan-sdn50/plan.md.

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

    enhancementpriority:P3

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions