From 038063d4d1050f1fabb8f53353c1b999503a73b1 Mon Sep 17 00:00:00 2001 From: bsu3338 Date: Mon, 1 Apr 2024 14:55:44 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9EFix:=20Stable=20Diffusion=20User=20?= =?UTF-8?q?Directory=20(#2270)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- api/app/clients/tools/structured/StableDiffusion.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/app/clients/tools/structured/StableDiffusion.js b/api/app/clients/tools/structured/StableDiffusion.js index 6e15db72b8..e891cbb398 100644 --- a/api/app/clients/tools/structured/StableDiffusion.js +++ b/api/app/clients/tools/structured/StableDiffusion.js @@ -103,8 +103,8 @@ class StableDiffusionAPI extends StructuredTool { const filepath = path.join(imageOutputPath, this.userId, imageName); this.relativePath = path.relative(clientPath, imageOutputPath); - if (!fs.existsSync(imageOutputPath)) { - fs.mkdirSync(imageOutputPath, { recursive: true }); + if (!fs.existsSync(path.join(imageOutputPath, this.userId))) { + fs.mkdirSync(path.join(imageOutputPath, this.userId), { recursive: true }); } try {