[PR #13771] [MERGED] server: prevent image generation models from reloading on every request #14381

Closed
opened 2026-04-13 00:52:23 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ollama/ollama/pull/13771
Author: @jmorganca
Created: 1/19/2026
Status: Merged
Merged: 1/19/2026
Merged by: @jmorganca

Base: mainHead: fix-imagegen-reload-every-request


📝 Commits (1)

  • 9a6b066 fix: prevent image generation models from reloading on every request

📊 Changes

1 file changed (+1 additions, -0 deletions)

View changed files

📝 server/sched.go (+1 -0)

📄 Description

The loadImageGen function was not setting Options on the runnerRef, causing needsReload() to always return true (since it checks if runner.Options == nil). This resulted in the image generation subprocess being killed and restarted for every request.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ollama/ollama/pull/13771 **Author:** [@jmorganca](https://github.com/jmorganca) **Created:** 1/19/2026 **Status:** ✅ Merged **Merged:** 1/19/2026 **Merged by:** [@jmorganca](https://github.com/jmorganca) **Base:** `main` ← **Head:** `fix-imagegen-reload-every-request` --- ### 📝 Commits (1) - [`9a6b066`](https://github.com/ollama/ollama/commit/9a6b066fe9963afb120604dfb780a9a37e958dce) fix: prevent image generation models from reloading on every request ### 📊 Changes **1 file changed** (+1 additions, -0 deletions) <details> <summary>View changed files</summary> 📝 `server/sched.go` (+1 -0) </details> ### 📄 Description The loadImageGen function was not setting Options on the runnerRef, causing needsReload() to always return true (since it checks if runner.Options == nil). This resulted in the image generation subprocess being killed and restarted for every request. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-13 00:52:23 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/ollama#14381