From 794786da434ac959af091d07207e2ffd67afc1b0 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Fri, 19 Apr 2024 02:08:18 +0300 Subject: [PATCH] Remove unnecessary delays in the prompt builder. This is no longer needed since the async token counter won't block the UI thread during the request preparation. --- public/script.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/public/script.js b/public/script.js index a10f4d1fa..13be91c6f 100644 --- a/public/script.js +++ b/public/script.js @@ -3521,9 +3521,6 @@ async function Generate(type, { automatic_trigger, force_name2, quiet_prompt, qu } else { break; } - - // Prevent UI thread lock on tokenization - await delay(1); } for (let i = 0; i < chat2.length; i++) { @@ -3551,9 +3548,6 @@ async function Generate(type, { automatic_trigger, force_name2, quiet_prompt, qu } else { break; } - - // Prevent UI thread lock on tokenization - await delay(1); } // Add user alignment message if last message is not a user message @@ -3596,7 +3590,6 @@ async function Generate(type, { automatic_trigger, force_name2, quiet_prompt, qu } else { break; } - await delay(1); } }