mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-04-29 18:08:43 +02:00
Fix SD "Raw last message" in groups
This commit is contained in:
parent
04edf32ef0
commit
c0fffde739
@ -1260,7 +1260,18 @@ async function loadAutoSamplers() {
|
|||||||
|
|
||||||
async function loadDrawthingsSamplers() {
|
async function loadDrawthingsSamplers() {
|
||||||
// The app developer doesn't provide an API to get these yet
|
// The app developer doesn't provide an API to get these yet
|
||||||
return ["UniPC", "DPM++ 2M Karras", "Euler a", "DPM++ SDE Karras", "PLMS", "DDIM", "LCM", "Euler A Substep", "DPM++ SDE Substep", "TCD"];
|
return [
|
||||||
|
'UniPC',
|
||||||
|
'DPM++ 2M Karras',
|
||||||
|
'Euler a',
|
||||||
|
'DPM++ SDE Karras',
|
||||||
|
'PLMS',
|
||||||
|
'DDIM',
|
||||||
|
'LCM',
|
||||||
|
'Euler A Substep',
|
||||||
|
'DPM++ SDE Substep',
|
||||||
|
'TCD',
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
async function loadVladSamplers() {
|
async function loadVladSamplers() {
|
||||||
@ -1494,7 +1505,7 @@ async function loadDrawthingsModels() {
|
|||||||
|
|
||||||
return data;
|
return data;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log("Error loading DrawThings API models:", error);
|
console.log('Error loading DrawThings API models:', error);
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1817,7 +1828,10 @@ function getRawLastMessage() {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
return message.mes;
|
return {
|
||||||
|
mes: message.mes,
|
||||||
|
original_avatar: message.original_avatar,
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
toastr.warning('No usable messages found.', 'Image Generation');
|
toastr.warning('No usable messages found.', 'Image Generation');
|
||||||
@ -1825,10 +1839,17 @@ function getRawLastMessage() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const context = getContext();
|
const context = getContext();
|
||||||
const lastMessage = getLastUsableMessage(),
|
const lastMessage = getLastUsableMessage();
|
||||||
characterDescription = context.characters[context.characterId].description,
|
const character = context.groupId
|
||||||
situation = context.characters[context.characterId].scenario;
|
? context.characters.find(c => c.avatar === lastMessage.original_avatar)
|
||||||
return `((${processReply(lastMessage)})), (${processReply(situation)}:0.7), (${processReply(characterDescription)}:0.5)`;
|
: context.characters[context.characterId];
|
||||||
|
|
||||||
|
if (!character) {
|
||||||
|
console.debug('Character not found, using raw message.');
|
||||||
|
return processReply(lastMessage.mes);
|
||||||
|
}
|
||||||
|
|
||||||
|
return `((${processReply(lastMessage.mes)})), (${processReply(character.scenario)}:0.7), (${processReply(character.description)}:0.5)`;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function generatePicture(args, trigger, message, callback) {
|
async function generatePicture(args, trigger, message, callback) {
|
||||||
@ -2900,7 +2921,7 @@ jQuery(async () => {
|
|||||||
$('#sd_novel_anlas_guard').on('input', onNovelAnlasGuardInput);
|
$('#sd_novel_anlas_guard').on('input', onNovelAnlasGuardInput);
|
||||||
$('#sd_novel_view_anlas').on('click', onViewAnlasClick);
|
$('#sd_novel_view_anlas').on('click', onViewAnlasClick);
|
||||||
$('#sd_novel_sm').on('input', onNovelSmInput);
|
$('#sd_novel_sm').on('input', onNovelSmInput);
|
||||||
$('#sd_novel_sm_dyn').on('input', onNovelSmDynInput);;
|
$('#sd_novel_sm_dyn').on('input', onNovelSmDynInput);
|
||||||
$('#sd_comfy_validate').on('click', validateComfyUrl);
|
$('#sd_comfy_validate').on('click', validateComfyUrl);
|
||||||
$('#sd_comfy_url').on('input', onComfyUrlInput);
|
$('#sd_comfy_url').on('input', onComfyUrlInput);
|
||||||
$('#sd_comfy_workflow').on('change', onComfyWorkflowChange);
|
$('#sd_comfy_workflow').on('change', onComfyWorkflowChange);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user