From a690f1ad5636a6cda1fb5063b035a87970846ee3 Mon Sep 17 00:00:00 2001 From: misaka20002 <40714502+misaka20002@users.noreply.github.com> Date: Wed, 9 Oct 2024 22:33:44 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=87=AA=E5=AE=9A=E4=B9=89=E5=AE=BD?= =?UTF-8?q?=E9=AB=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/parse.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/parse.js b/utils/parse.js index d46b428..6ccc0bd 100644 --- a/utils/parse.js +++ b/utils/parse.js @@ -18,10 +18,10 @@ function scaleParam(text) { text = text.replace(new RegExp(size, 'g'), ''); } }); - + let [width, height] = [1024, 1024] const result = /(\d{2,7})[\*×](\d{2,7})/.exec(text); if (result) { - let [width, height] = [Math.floor(Number(result[1]) / 64) * 64, Math.floor(Number(result[2]) / 64) * 64]; + [width, height] = [Math.floor(Number(result[1]) / 64) * 64, Math.floor(Number(result[2]) / 64) * 64]; const FLUXDEV_c = new FLUXDEV(); const config_this = FLUXDEV_c.get_config_this()