mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-03 12:47:35 +01:00
add default comfy workflow
This commit is contained in:
parent
9c41a9d2ac
commit
46cc04c798
86
default/content/Default_Comfy_Workflow.json
Normal file
86
default/content/Default_Comfy_Workflow.json
Normal file
@ -0,0 +1,86 @@
|
|||||||
|
{
|
||||||
|
"3": {
|
||||||
|
"class_type": "KSampler",
|
||||||
|
"inputs": {
|
||||||
|
"cfg": "%scale%",
|
||||||
|
"denoise": 1,
|
||||||
|
"latent_image": [
|
||||||
|
"5",
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"model": [
|
||||||
|
"4",
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"negative": [
|
||||||
|
"7",
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"positive": [
|
||||||
|
"6",
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"sampler_name": "%sampler%",
|
||||||
|
"scheduler": "%scheduler%",
|
||||||
|
"seed": "%seed%",
|
||||||
|
"steps": "%steps%"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"4": {
|
||||||
|
"class_type": "CheckpointLoaderSimple",
|
||||||
|
"inputs": {
|
||||||
|
"ckpt_name": "%model%"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"5": {
|
||||||
|
"class_type": "EmptyLatentImage",
|
||||||
|
"inputs": {
|
||||||
|
"batch_size": 1,
|
||||||
|
"height": "%height%",
|
||||||
|
"width": "%width%"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"6": {
|
||||||
|
"class_type": "CLIPTextEncode",
|
||||||
|
"inputs": {
|
||||||
|
"clip": [
|
||||||
|
"4",
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"text": "%prompt%"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"7": {
|
||||||
|
"class_type": "CLIPTextEncode",
|
||||||
|
"inputs": {
|
||||||
|
"clip": [
|
||||||
|
"4",
|
||||||
|
1
|
||||||
|
],
|
||||||
|
"text": "%negative_prompt%"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"8": {
|
||||||
|
"class_type": "VAEDecode",
|
||||||
|
"inputs": {
|
||||||
|
"samples": [
|
||||||
|
"3",
|
||||||
|
0
|
||||||
|
],
|
||||||
|
"vae": [
|
||||||
|
"4",
|
||||||
|
2
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"9": {
|
||||||
|
"class_type": "SaveImage",
|
||||||
|
"inputs": {
|
||||||
|
"filename_prefix": "SillyTavern",
|
||||||
|
"images": [
|
||||||
|
"8",
|
||||||
|
0
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -22,5 +22,9 @@
|
|||||||
{
|
{
|
||||||
"filename": "user-default.png",
|
"filename": "user-default.png",
|
||||||
"type": "avatar"
|
"type": "avatar"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"filename": "Default_Comfy_Workflow.json",
|
||||||
|
"type": "workflow"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
@ -243,7 +243,7 @@ const defaultSettings = {
|
|||||||
|
|
||||||
// ComyUI settings
|
// ComyUI settings
|
||||||
comfy_url: 'http://127.0.0.1:8188',
|
comfy_url: 'http://127.0.0.1:8188',
|
||||||
comfy_workflow: 'Default.json',
|
comfy_workflow: 'Default_Comfy_Workflow.json',
|
||||||
}
|
}
|
||||||
|
|
||||||
function processTriggers(chat, _, abort) {
|
function processTriggers(chat, _, abort) {
|
||||||
|
@ -71,6 +71,8 @@ function getTargetByType(type) {
|
|||||||
return 'public/User Avatars';
|
return 'public/User Avatars';
|
||||||
case 'theme':
|
case 'theme':
|
||||||
return 'public/themes';
|
return 'public/themes';
|
||||||
|
case 'workflow':
|
||||||
|
return 'public/user/workflows';
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
@ -463,7 +463,7 @@ function registerEndpoints(app, jsonParser) {
|
|||||||
try {
|
try {
|
||||||
let path = `public/user/workflows/${sanitize(String(request.body.file_name))}`;
|
let path = `public/user/workflows/${sanitize(String(request.body.file_name))}`;
|
||||||
if (!fs.existsSync(path)) {
|
if (!fs.existsSync(path)) {
|
||||||
path = 'public/user/workflows/Default.json';
|
path = 'public/user/workflows/Default_Comfy_Workflow.json';
|
||||||
}
|
}
|
||||||
const data = fs.readFileSync(
|
const data = fs.readFileSync(
|
||||||
path,
|
path,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user