mudler/LocalAI · error

generate_video produced no frames

Error message

generate_video produced no frames

What it means

Video generation completed but produced zero frames. Guard: check frame count after generation and report an internal error instead of muxing an empty video.

Source

Thrown at backend/go/stablediffusion-ggml/cpp/gosd.cpp:1411

        init_buf = load_and_resize_image(init_image, p->width, p->height, &init_img);
        if (!init_buf) { std::free(p); return 1; }
    }
    if (end_image && strlen(end_image) > 0) {
        end_buf = load_and_resize_image(end_image, p->width, p->height, &end_img);
        if (!end_buf) { if (init_buf) free(init_buf); std::free(p); return 1; }
    }
    p->init_image = init_img;
    p->end_image  = end_img;

    // Generate
    int num_frames_out = 0;
    sd_image_t* frames = nullptr;
    sd_audio_t* audio = nullptr;
    bool ok = generate_video(sd_c, p, &frames, &num_frames_out, &audio);
    std::free(p);

    if (!ok || !frames || num_frames_out == 0) {
        fprintf(stderr, "generate_video produced no frames\n");
        if (audio) free_sd_audio(audio);
        if (init_buf) free(init_buf);
        if (end_buf) free(end_buf);
        return 1;
    }

    fprintf(stderr, "Generated %d frames, muxing to %s via ffmpeg\n", num_frames_out, dst);

    int rc = ffmpeg_mux_raw_to_mp4(frames, num_frames_out, fps, audio, dst);

    for (int i = 0; i < num_frames_out; i++) {
        if (frames[i].data) free(frames[i].data);
    }
    free(frames);
    if (audio) free_sd_audio(audio);
    if (init_buf) free(init_buf);
    if (end_buf) free(end_buf);

View on GitHub (pinned to 44413a9d06)

Solutions

  1. Check earlier log lines for frame-generation errors.
  2. Verify the video model loaded correctly and parameters (num frames, resolution) are valid.
  3. Ensure sufficient memory/VRAM to generate frames.

When it happens

Trigger: Thrown at backend/go/stablediffusion-ggml/cpp/gosd.cpp:1411 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of mudler/LocalAI@44413a9d06 (2026-08-15). Data as JSON: /api/errors/a1ed32dad01a7256. Report an issue: GitHub.