Responding to PR change reviews

3a2d29b5cbab98e936c727ef37d347783992b2ee

Daryl <daryl.streete@snhu.edu>

1 files changed, +3 -11Showing whitespace changes
public/scripts/extensions/stable-diffusion/index.js+3 -11
@@ -2334,19 +2334,12 @@ function processReply(str) {
2334 }2334 }
23352335
2336 str = str.replaceAll('"', '');2336 str = str.replaceAll('"', '');
2337 str = str.replaceAll('"', '');2337 str = str.replaceAll('“', '');
2338 str = str.replaceAll('\n', ', ');2338 str = str.replaceAll('\n', ', ');
2339 str = str.normalize('NFD');2339 str = str.normalize('NFD');
2340 2340
2341 // Check if using NAI Diffusion V4 models and preserve pipe (|) and hash (#) characters2341 // Strip out non-alphanumeric characters barring model syntax exceptions
2342 if (extension_settings.sd.model === 'nai-diffusion-4-full' ||
2343 extension_settings.sd.model === 'nai-diffusion-4-curated-preview') {
2344 // Keep pipe and hash characters for NAI Diffusion V4 models
2345 str = str.replace(/[^a-zA-Z0-9.,:_(){}<>[\]\-'|#]+/g, ' ');2342 str = str.replace(/[^a-zA-Z0-9.,:_(){}<>[\]\-'|#]+/g, ' ');
2346 } else {
2347 // Original behavior for other models
2348 str = str.replace(/[^a-zA-Z0-9.,:_(){}<>[\]\-']+/g, ' ');
2349 }
2350 2343
2351 str = str.replace(/\s+/g, ' '); // Collapse multiple whitespaces into one2344 str = str.replace(/\s+/g, ' '); // Collapse multiple whitespaces into one
2352 str = str.trim();2345 str = str.trim();
@@ -3242,8 +3235,7 @@ function getNovelParams() {
3242 }3235 }
32433236
3244 if (extension_settings.sd.sampler === 'ddim' || 3237 if (extension_settings.sd.sampler === 'ddim' ||
3245 extension_settings.sd.model === 'nai-diffusion-4-curated-preview' || 3238 ['nai-diffusion-4-curated-preview', 'nai-diffusion-4-full'].includes(extension_settings.sd.model)) {
3246 extension_settings.sd.model === 'nai-diffusion-4-full') {
3247 sm = false;3239 sm = false;
3248 sm_dyn = false;3240 sm_dyn = false;
3249 }3241 }