Skip to content

Comments

batch generation#34

Merged
nihui merged 2 commits intomasterfrom
batch
Feb 21, 2026
Merged

batch generation#34
nihui merged 2 commits intomasterfrom
batch

Conversation

@nihui
Copy link
Owner

@nihui nihui commented Feb 21, 2026

No description provided.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds batch generation capability to the z-image-ncnn-vulkan tool, allowing users to generate multiple images in a single run with different random seeds. The implementation processes images sequentially using a single model load, where each image in the batch gets a unique seed (seed + batch_index).

Changes:

  • Added -b batch-size command-line option with validation (must be > 0)
  • Modified image generation to use a vector of latents instead of a single latent
  • Restructured the main loop to process each batch item sequentially
  • Implemented automatic filename generation for batch mode (filename-0.ext, filename-1.ext, etc.)

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
src/main.cpp Added batch processing logic, CLI argument parsing for batch size, latent vector handling, and batch-aware progress messages and file naming
README.md Updated usage documentation to include the new -b batch-size option

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nihui nihui merged commit 1c6ac88 into master Feb 21, 2026
3 checks passed
@nihui nihui deleted the batch branch February 21, 2026 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant