From 641eadb253df6e9ba3dd7ae87bcf1c9b69516d4b Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Tue, 21 Jan 2025 04:05:29 +0000 Subject: [PATCH] Don't keep model in memory, breaks Stable Diffusion --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.py b/main.py index 5b52a38..c0e007f 100644 --- a/main.py +++ b/main.py @@ -23,7 +23,7 @@ def controller_message(message): return False def llama(prompt): - data = dict(model='llama3.1', prompt=prompt, stream=False, keep_alive=-1) + data = dict(model='llama3.1', prompt=prompt, stream=False, keep_alive=25) # don't keep in memory, interferes with Stable Diffusion try: r = requests.post(LLAMA_URL, json=data, timeout=20) r.raise_for_status()