Conversation
Summary of ChangesHello @ilopezluna, 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 refactors the installation process for 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
Ignored Files
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.
Hey - I've left some high level feedback:
- In the diffusers-specific branch, you're unconditionally using
desktopClient.InstallBackend(diffusers.Name)even after handling Moby/Cloud viaensureStandaloneRunnerAvailable; double‑check whetherdesktopClientis the correct client abstraction for non-desktop engine kinds or if this should instead route through the same runner client used elsewhere (similar to how vllm-metal is handled) to avoid environment-specific breakage.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In the diffusers-specific branch, you're unconditionally using `desktopClient.InstallBackend(diffusers.Name)` even after handling Moby/Cloud via `ensureStandaloneRunnerAvailable`; double‑check whether `desktopClient` is the correct client abstraction for non-desktop engine kinds or if this should instead route through the same runner client used elsewhere (similar to how vllm-metal is handled) to avoid environment-specific breakage.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
Code Review
This pull request updates the install-runner command to implement deferred installation for the diffusers backend. This change aligns the diffusers installation process with the existing vllm-metal backend, where the backend is installed on demand via the running model runner's API. The new logic ensures that for standalone contexts (Moby/Cloud), a base runner is available before attempting to install the diffusers backend.
| engineKind := modelRunner.EngineKind() | ||
| if engineKind == types.ModelRunnerEngineKindMoby || engineKind == types.ModelRunnerEngineKindCloud { | ||
| if _, err := ensureStandaloneRunnerAvailable(cmd.Context(), asPrinter(cmd), debug); err != nil { | ||
| return fmt.Errorf("unable to initialize standalone model runner: %w", err) |
There was a problem hiding this comment.
The error message unable to initialize standalone model runner is a bit generic. To provide more specific context for debugging, consider including the backend name in the error message, for example, unable to initialize standalone model runner for diffusers backend.
| return fmt.Errorf("unable to initialize standalone model runner: %w", err) | |
| return fmt.Errorf("unable to initialize standalone model runner for diffusers backend: %w", err) |
Now diffusers is installed on demand (having the model pulled first) :
Or explicitly:
MODEL_RUNNER_HOST=http://localhost:13434 docker model install-runner --backend diffusers