From 59c019a6fbc7940c77caa76727630286bb66b8d3 Mon Sep 17 00:00:00 2001 From: frob Date: Thu, 12 Feb 2026 18:05:42 +0100 Subject: [PATCH] x: configurable model load timeout (#14204) Co-authored-by: rick --- x/imagegen/server.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/x/imagegen/server.go b/x/imagegen/server.go index 8b2be042c..f79b8d3e9 100644 --- a/x/imagegen/server.go +++ b/x/imagegen/server.go @@ -21,6 +21,7 @@ import ( "sync" "time" + "github.com/ollama/ollama/envconfig" "github.com/ollama/ollama/llm" "github.com/ollama/ollama/ml" "github.com/ollama/ollama/x/imagegen/manifest" @@ -195,7 +196,7 @@ func (s *Server) Ping(ctx context.Context) error { // waitUntilRunning waits for the subprocess to be ready. func (s *Server) waitUntilRunning() error { ctx := context.Background() - timeout := time.After(2 * time.Minute) + timeout := time.After(envconfig.LoadTimeout()) ticker := time.NewTicker(100 * time.Millisecond) defer ticker.Stop()