{"record":{"id":"c1241194d47dce44","repo":"mudler/LocalAI","slug":"acestep-cpp-fatal-failed-to-load-dit-from-s-n","errorCode":null,"errorMessage":"[acestep-cpp] FATAL: failed to load DiT from %s\\n","messagePattern":"\\[acestep-cpp\\] FATAL: failed to load DiT from (.+?)\\\\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"critical","filePath":"backend/go/acestep-cpp/cpp/goacestepcpp.cpp","lineNumber":77,"sourceCode":"    }\n    fprintf(stderr, \"[%-5s] \", level_str);\n    fputs(log, stderr);\n    fflush(stderr);\n}\n\nint load_model(const char * lm_model_path, const char * text_encoder_path,\n               const char * dit_model_path, const char * vae_model_path) {\n    ggml_log_set(ggml_log_cb, nullptr);\n    ggml_backend_load_all();\n\n    g_lm_path       = lm_model_path;\n    g_text_enc_path = text_encoder_path;\n    g_dit_path      = dit_model_path;\n\n    // Load DiT model (backend init + config are handled inside dit_ggml_load)\n    fprintf(stderr, \"[acestep-cpp] Loading DiT from %s\\n\", dit_model_path);\n    if (!dit_ggml_load(&g_dit, dit_model_path)) {\n        fprintf(stderr, \"[acestep-cpp] FATAL: failed to load DiT from %s\\n\", dit_model_path);\n        return 1;\n    }\n    g_dit_loaded = true;\n\n    // Read DiT GGUF metadata + silence_latent\n    {\n        GGUFModel gf = {};\n        if (gf_load(&gf, dit_model_path)) {\n            g_is_turbo           = gf_get_bool(gf, \"acestep.is_turbo\");\n            const void * sl_data = gf_get_data(gf, \"silence_latent\");\n            if (sl_data) {\n                g_silence_full.resize(15000 * 64);\n                memcpy(g_silence_full.data(), sl_data, 15000 * 64 * sizeof(float));\n                fprintf(stderr, \"[acestep-cpp] silence_latent: [15000, 64] loaded\\n\");\n            } else {\n                fprintf(stderr, \"[acestep-cpp] FATAL: silence_latent not found in %s\\n\", dit_model_path);\n                gf_close(&gf);\n                return 2;","sourceCodeStart":59,"sourceCodeEnd":95,"githubUrl":"https://github.com/mudler/LocalAI/blob/44413a9d06bf5bc52ce088ba8ca74e5a2e8bee26/backend/go/acestep-cpp/cpp/goacestepcpp.cpp#L59-L95","documentation":"acestep-cpp (Go-backed C++ music generation backend) fatal at model load: dit_ggml_load() on the DiT GGUF failed, so load_model returns 1 before text-encoder/VAE stages. dit_ggml_load logs its own reason (unopenable file, bad GGUF magic, unsupported tensor layout); this line is the outer summary. The process should be treated as unable to serve generation.","triggerScenarios":"Calling load_model with a dit_model_path that is missing, truncated mid-download, not actually the DiT GGUF (paths swapped with VAE/text-encoder files), or a DiT file from an incompatible conversion; dit_ggml_load returns false.","commonSituations":"Wrong path order in the four-argument load call; partial downloads; mixing GGUFs from different acestep conversion revisions; moving model dirs after configuration.","solutions":["Check the dit_ggml_load log line above for the precise cause (I/O vs format).","Confirm dit_model_path points at the DiT file specifically and the file is complete (compare size/checksum with the gallery entry).","Keep the matched set of DiT/text-encoder/VAE GGUFs from one conversion; re-download from the model gallery if in doubt.","Verify argument order of load_model(lm, text_encoder, dit, vae) at the call site."],"exampleFix":"// before: paths transposed\nload_model(lm, dit_path, text_enc_path, vae_path);\n\n// after\nload_model(lm_path, text_enc_path, dit_path, vae_path);","handlingStrategy":"validation","validationCode":"// validate the DiT GGUF before load_model\nbool dit_gguf_ok(const char *path) {\n    GGUFModel gf;\n    if (!gf_load(&gf, path)) return false;\n    bool ok = gf_get_data(gf, \"silence_latent\") != nullptr;\n    gf_close(&gf);\n    return ok;\n}\nif (!dit_gguf_ok(dit_path)) return fmt.Errorf(\"DiT GGUF unusable: %s\", dit_path);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Deploy the DiT/text-encoder/VAE set from one gallery artifact; never mix conversion revisions.","Checksum downloads and store the expected digest beside the path config.","Check load_model's four paths in order (lm, text_encoder, dit, vae) at deploy time."],"tags":["cpp","acestep","gguf","model-loading","music-generation"],"backgroundTag":null,"analyzedSha":"44413a9d06bf5bc52ce088ba8ca74e5a2e8bee26","analyzedAt":"2026-08-15T10:13:50.291Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}