{"record":{"id":"8536131792a692f5","repo":"mudler/LocalAI","slug":"gen-video-dst-is-empty","errorCode":null,"errorMessage":"gen_video: dst is empty\n","messagePattern":"gen_video: dst is empty\n","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"backend/go/stablediffusion-ggml/cpp/gosd.cpp","lineNumber":1356,"sourceCode":"    while (waitpid(pid, &status, 0) < 0) {\n        if (errno != EINTR) {\n            perror(\"waitpid\");\n            if (have_audio) unlink(wav_path);\n            return 1;\n        }\n    }\n    if (have_audio) unlink(wav_path);\n    if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {\n        fprintf(stderr, \"ffmpeg exited with status %d\\n\", status);\n        return 1;\n    }\n    return 0;\n}\n\nint gen_video(sd_vid_gen_params_t *p, int steps, char *dst, float cfg_scale, int fps, char *init_image, char *end_image) {\n    if (!p) return 1;\n    if (!dst || strlen(dst) == 0) {\n        fprintf(stderr, \"gen_video: dst is empty\\n\");\n        std::free(p);\n        return 1;\n    }\n\n    std::vector<int> skip_layers = {7, 8, 9};\n\n    fprintf(stderr, \"Generating video: %dx%d, frames=%d, fps=%d, steps=%d, cfg=%.2f\\n\",\n            p->width, p->height, p->video_frames, fps, steps, cfg_scale);\n\n    // Sample params (shared by both low and high-noise passes — MoE models use the high-noise\n    // set during the first phase; single-model Wan2.1 ignores it. Same defaults for both is fine.)\n    p->sample_params.guidance.txt_cfg        = cfg_scale;\n    p->sample_params.guidance.slg.layers     = skip_layers.data();\n    p->sample_params.guidance.slg.layer_count = skip_layers.size();\n    p->sample_params.sample_method           = sample_method;\n    p->sample_params.sample_steps            = steps;\n    p->sample_params.scheduler               = scheduler;\n    p->sample_params.flow_shift              = flow_shift;","sourceCodeStart":1338,"sourceCodeEnd":1374,"githubUrl":"https://github.com/mudler/LocalAI/blob/44413a9d06bf5bc52ce088ba8ca74e5a2e8bee26/backend/go/stablediffusion-ggml/cpp/gosd.cpp#L1338-L1374","documentation":"gen_video was called with an empty destination path. Guard: validate the output path is set before starting video generation; fail fast with an invalid-argument error.","triggerScenarios":"Thrown at backend/go/stablediffusion-ggml/cpp/gosd.cpp:1356 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a valid, non-empty destination path for the video output.","Check the caller passes a dst path before invoking gen_video."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"44413a9d06bf5bc52ce088ba8ca74e5a2e8bee26","analyzedAt":"2026-08-15T10:13:50.291Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}