From b3ced2c4c5b9c9a028a577741b8f5e078c622d00 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Wed, 8 Nov 2023 10:57:37 +0200 Subject: [PATCH] Rename SD extension to "Image Generation" --- public/index.html | 2 +- .../extensions/stable-diffusion/index.js | 18 +++++++++--------- .../extensions/stable-diffusion/manifest.json | 2 +- .../extensions/stable-diffusion/settings.html | 6 +++--- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/public/index.html b/public/index.html index d6b8d1d3d..05020fe7a 100644 --- a/public/index.html +++ b/public/index.html @@ -3205,7 +3205,7 @@ Chat Backgrounds
- Chat backgrounds generated with the  Stable Diffusion extension will appear here. + Chat backgrounds generated with the  Image Generation extension will appear here.
diff --git a/public/scripts/extensions/stable-diffusion/index.js b/public/scripts/extensions/stable-diffusion/index.js index 8fbc3f491..e7c1928b6 100644 --- a/public/scripts/extensions/stable-diffusion/index.js +++ b/public/scripts/extensions/stable-diffusion/index.js @@ -120,8 +120,8 @@ const promptTemplates = { } const helpString = [ - `${m('(argument)')} – requests SD to make an image. Supported arguments: ${m(j(Object.values(triggerWords).flat()))}.`, - `Anything else would trigger a "free mode" to make SD generate whatever you prompted. Example: '/sd apple tree' would generate a picture of an apple tree.`, + `${m('(argument)')} – requests to generate an image. Supported arguments: ${m(j(Object.values(triggerWords).flat()))}.`, + `Anything else would trigger a "free mode" to make generate whatever you prompted. Example: '/imagine apple tree' would generate a picture of an apple tree.`, ].join(' '); const defaultPrefix = 'best quality, absurdres, aesthetic,'; @@ -776,7 +776,7 @@ async function onModelChange() { if (extension_settings.sd.source === sources.auto || extension_settings.sd.source === sources.vlad) { await updateAutoRemoteModel(); } - toastr.success('Model successfully loaded!', 'Stable Diffusion'); + toastr.success('Model successfully loaded!', 'Image Generation'); } async function getAutoRemoteModel() { @@ -1251,7 +1251,7 @@ function getRawLastMessage() { return message.mes; } - toastr.warning('No usable messages found.', 'Stable Diffusion'); + toastr.warning('No usable messages found.', 'Image Generation'); throw new Error('No usable messages found.'); } @@ -1304,7 +1304,7 @@ async function generatePicture(_, trigger, message, callback) { try { const prompt = await getPrompt(generationType, message, trigger, quiet_prompt); - console.log('Processed Stable Diffusion prompt:', prompt); + console.log('Processed image prompt:', prompt); context.deactivateSendButtons(); hideSwipeButtons(); @@ -1412,13 +1412,13 @@ async function sendGenerationRequest(generationType, prompt, characterName = nul } } catch (err) { console.error(err); - toastr.error('Image generation failed. Please try again.' + '\n\n' + String(err), 'Stable Diffusion'); + toastr.error('Image generation failed. Please try again.' + '\n\n' + String(err), 'Image Generation'); return; } if (currentChatId !== getCurrentChatId()) { console.warn('Chat changed, aborting SD result saving'); - toastr.warning('Chat changed, generated image discarded.', 'Stable Diffusion'); + toastr.warning('Chat changed, generated image discarded.', 'Image Generation'); return; } @@ -1714,7 +1714,7 @@ function addSDGenButtons() { const buttonHtml = `
- Stable Diffusion + Generate Image
`; @@ -1888,7 +1888,7 @@ $("#sd_dropdown [id]").on("click", function () { }); jQuery(async () => { - getContext().registerSlashCommand('sd', generatePicture, [], helpString, true, true); + getContext().registerSlashCommand('imagine', generatePicture, ['sd'], helpString, true, true); $('#extensions_settings').append(renderExtensionTemplate('stable-diffusion', 'settings', defaultSettings)); $('#sd_source').on('change', onSourceChange); diff --git a/public/scripts/extensions/stable-diffusion/manifest.json b/public/scripts/extensions/stable-diffusion/manifest.json index 9d340650f..79223483c 100644 --- a/public/scripts/extensions/stable-diffusion/manifest.json +++ b/public/scripts/extensions/stable-diffusion/manifest.json @@ -1,5 +1,5 @@ { - "display_name": "Stable Diffusion", + "display_name": "Image Generation", "loading_order": 10, "requires": [], "optional": [ diff --git a/public/scripts/extensions/stable-diffusion/settings.html b/public/scripts/extensions/stable-diffusion/settings.html index eee6016cd..f84ed1000 100644 --- a/public/scripts/extensions/stable-diffusion/settings.html +++ b/public/scripts/extensions/stable-diffusion/settings.html @@ -2,7 +2,7 @@
- Stable Diffusion + Image Generation ? @@ -120,7 +120,7 @@ - + @@ -171,7 +171,7 @@
- SD Prompt Templates + Image Prompt Templates