Conversation
Summary of ChangesHello @spillai, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly expands the Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new imagegen subcommand to benchmark text-to-image generation models, which is a great addition. The implementation is comprehensive, including support for the vllm-omni backend, new data schemas for image generation results, and well-formatted display panels for configuration and results. The changes are well-integrated with the existing codebase. My feedback includes a couple of suggestions to improve code structure and maintainability by decoupling logic from the CLI framework and reducing code duplication.
| console.print() | ||
| print_error("Warmup failed", result["error"]) | ||
| raise typer.Exit(1) |
There was a problem hiding this comment.
Calling typer.Exit(1) from within this core benchmark function tightly couples it to the typer CLI framework. This can make the function harder to reuse or test in other contexts. A better practice is to raise a custom exception (e.g., BenchmarkWarmupError) and handle the exit gracefully in the imagegen command function that calls it. This would improve separation of concerns.
| if is_imagegen: | ||
| ig_results: list[ImageGenBenchmarkResult] = [] | ||
| for filepath in files: | ||
| path = Path(filepath) | ||
| if not path.exists(): | ||
| console.print(f"[red]File not found: {filepath}[/red]") | ||
| raise typer.Exit(1) | ||
| with open(path) as f: | ||
| data = json.load(f) | ||
| ig_results.append(_dc_from_dict(ImageGenBenchmarkResult, data)) | ||
| print_imagegen_compare_table(ig_results) | ||
| else: | ||
| results: list[BenchmarkResult] = [] | ||
| for filepath in files: | ||
| path = Path(filepath) | ||
| if not path.exists(): | ||
| console.print(f"[red]File not found: {filepath}[/red]") | ||
| raise typer.Exit(1) | ||
| with open(path) as f: | ||
| data = json.load(f) | ||
| results.append(_dc_from_dict(BenchmarkResult, data)) | ||
|
|
||
| print_compare_table(results) | ||
| # Sort by total tokens_per_sec (across workers) descending | ||
| results.sort(key=lambda r: r.results.tokens_per_sec * r.input.max_concurrency, reverse=True) | ||
| print_compare_table(results) |
There was a problem hiding this comment.
The logic for loading and parsing result files is duplicated in the if and else blocks. This can be consolidated to improve maintainability and reduce redundancy. You can determine the result class first, then have a single loop to load all files.
result_cls = ImageGenBenchmarkResult if is_imagegen else BenchmarkResult
all_results = []
for filepath in files:
path = Path(filepath)
if not path.exists():
console.print(f"[red]File not found: {filepath}[/red]")
raise typer.Exit(1)
with open(path) as f:
data = json.load(f)
all_results.append(_dc_from_dict(result_cls, data))
if is_imagegen:
print_imagegen_compare_table(all_results)
else:
# Sort by total tokens_per_sec (across workers) descending
all_results.sort(key=lambda r: r.results.tokens_per_sec * r.input.max_concurrency, reverse=True)
print_compare_table(all_results)49a9102 to
76d6700
Compare
* Merge spillai/init-cli: accept shlex safety fixes, keep imagegen code * Add .subtask to gitignore * Add imagegen subcommand for vllm-omni image generation benchmarking * Update README with configuration details and image Subtask-Task: feat/vllm-omni
e64c629 to
72e6281
Compare
When --backend is explicitly set (e.g. vllm-omni), use it for the monitor session name instead of the auto-detected backend type. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary
imagegensubcommand for benchmarking text-to-image generation models via vllm-omniclient.images.generate()API (/v1/images/generations)NativeVllmServerManagerwithomni=Trueparam forvllm serve --omnicompareauto-detects"type": "imagegen"in JSON files--save-imagesto dump generated PNGsUsage
Models added to MODELS.md
Qwen/Qwen-ImageTongyi-MAI/Z-Image-TurboTest plan
vlmbench imagegen --model Qwen/Qwen-Image --base-url http://localhost:8000/v1 --no-servevlmbench compare results/imagegen-*.json--save-imageswrites PNGs to diskmake lint🤖 Generated with Claude Code