mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Merge branch 'staging' into neo-server
This commit is contained in:
@@ -37,6 +37,8 @@ const p = a => `<p>${a}</p>`;
|
|||||||
|
|
||||||
const MODULE_NAME = 'sd';
|
const MODULE_NAME = 'sd';
|
||||||
const UPDATE_INTERVAL = 1000;
|
const UPDATE_INTERVAL = 1000;
|
||||||
|
// This is a 1x1 transparent PNG
|
||||||
|
const PNG_PIXEL = 'iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=';
|
||||||
|
|
||||||
const sources = {
|
const sources = {
|
||||||
extras: 'extras',
|
extras: 'extras',
|
||||||
@@ -2650,6 +2652,8 @@ async function generateComfyImage(prompt, negativePrompt) {
|
|||||||
const avatarBlob = await response.blob();
|
const avatarBlob = await response.blob();
|
||||||
const avatarBase64 = await getBase64Async(avatarBlob);
|
const avatarBase64 = await getBase64Async(avatarBlob);
|
||||||
workflow = workflow.replace('"%user_avatar%"', JSON.stringify(avatarBase64));
|
workflow = workflow.replace('"%user_avatar%"', JSON.stringify(avatarBase64));
|
||||||
|
} else {
|
||||||
|
workflow = workflow.replace('"%user_avatar%"', JSON.stringify(PNG_PIXEL));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (/%char_avatar%/gi.test(workflow)) {
|
if (/%char_avatar%/gi.test(workflow)) {
|
||||||
@@ -2658,6 +2662,8 @@ async function generateComfyImage(prompt, negativePrompt) {
|
|||||||
const avatarBlob = await response.blob();
|
const avatarBlob = await response.blob();
|
||||||
const avatarBase64 = await getBase64Async(avatarBlob);
|
const avatarBase64 = await getBase64Async(avatarBlob);
|
||||||
workflow = workflow.replace('"%char_avatar%"', JSON.stringify(avatarBase64));
|
workflow = workflow.replace('"%char_avatar%"', JSON.stringify(avatarBase64));
|
||||||
|
} else {
|
||||||
|
workflow = workflow.replace('"%char_avatar%"', JSON.stringify(PNG_PIXEL));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(`{
|
console.log(`{
|
||||||
|
@@ -188,9 +188,7 @@ export async function getGroupChat(groupId, reload = false) {
|
|||||||
|
|
||||||
if (Array.isArray(data) && data.length) {
|
if (Array.isArray(data) && data.length) {
|
||||||
data[0].is_group = true;
|
data[0].is_group = true;
|
||||||
for (let key of data) {
|
chat.splice(0, chat.length, ...data);
|
||||||
chat.push(key);
|
|
||||||
}
|
|
||||||
await printMessages();
|
await printMessages();
|
||||||
} else {
|
} else {
|
||||||
sendSystemMessage(system_message_types.GROUP, '', { isSmallSys: true });
|
sendSystemMessage(system_message_types.GROUP, '', { isSmallSys: true });
|
||||||
|
Reference in New Issue
Block a user