diff --git a/public/script.js b/public/script.js index 32895b40e..8adc509d7 100644 --- a/public/script.js +++ b/public/script.js @@ -2096,11 +2096,6 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject, } } - // Add quiet generation prompt at depth 0 - if (quiet_prompt && quiet_prompt.length) { - finalPromt += `\n${quiet_prompt}`; - } - finalPromt = finalPromt.replace(/\r/gm, ''); if (power_user.collapse_newlines) { diff --git a/public/scripts/extensions/stable-diffusion/index.js b/public/scripts/extensions/stable-diffusion/index.js index c4af71d2b..b2a098357 100644 --- a/public/scripts/extensions/stable-diffusion/index.js +++ b/public/scripts/extensions/stable-diffusion/index.js @@ -229,6 +229,10 @@ async function loadHordeSamplers() { } async function loadExtrasSamplers() { + if (!modules.includes('sd')) { + return []; + } + const url = new URL(getApiUrl()); url.pathname = '/api/image/samplers'; const result = await fetch(url, defaultRequestArgs); @@ -276,6 +280,10 @@ async function loadHordeModels() { } async function loadExtrasModels() { + if (!modules.includes('sd')) { + return []; + } + const url = new URL(getApiUrl()); url.pathname = '/api/image/model'; const getCurrentModelResult = await fetch(url, defaultRequestArgs); @@ -401,11 +409,12 @@ async function generateExtrasImage(prompt) { }), }); - if (result.ok) { const data = await result.json(); const base64Image = `data:image/jpeg;base64,${data.image}`; sendMessage(prompt, base64Image); + } else { + callPopup('Image generation has failed. Please try again.', 'text'); } } @@ -431,6 +440,8 @@ async function generateHordeImage(prompt) { const data = await result.text(); const base64Image = `data:image/webp;base64,${data}`; sendMessage(prompt, base64Image); + } else { + callPopup('Image generation has failed. Please try again.', 'text'); } } diff --git a/server.js b/server.js index ccfc29825..f36f38086 100644 --- a/server.js +++ b/server.js @@ -2974,9 +2974,11 @@ app.post('/horde_generateimage', jsonParser, async (request, response) => { return response.send(result.generations[0].img); } + /* if (!check.is_possible) { return response.sendStatus(503); } + */ if (check.faulted) { return response.sendStatus(500);