More region widget fixes
This commit is contained in:
@@ -356,6 +356,24 @@ export default class ComfyApp {
|
||||
|
||||
ComfyApp.registerDefaultSlotHandlers(nodeId, nodeDef)
|
||||
}
|
||||
|
||||
ComfyApp.registerComfyBoxSlotTypes()
|
||||
}
|
||||
|
||||
static registerComfyBoxSlotTypes() {
|
||||
const reg = (type: string) => {
|
||||
const lowerType = type.toLowerCase();
|
||||
if (!LiteGraph.slot_types_in.includes(lowerType)) {
|
||||
LiteGraph.slot_types_in.push(lowerType);
|
||||
}
|
||||
if (!LiteGraph.slot_types_out.includes(type)) {
|
||||
LiteGraph.slot_types_out.push(type);
|
||||
}
|
||||
}
|
||||
|
||||
reg("COMFYBOX_IMAGE")
|
||||
reg("COMFYBOX_IMAGES")
|
||||
reg("COMFYBOX_REGION")
|
||||
}
|
||||
|
||||
static registerDefaultSlotHandlers(nodeId: string, nodeDef: ComfyNodeDef) {
|
||||
@@ -771,7 +789,9 @@ export default class ComfyApp {
|
||||
|
||||
const promptFilename = get(configState).promptForWorkflowName;
|
||||
|
||||
let filename = "workflow.json";
|
||||
const title = workflow.attrs.title.trim() || "workflow"
|
||||
|
||||
let filename = `${title}.json`;
|
||||
if (promptFilename) {
|
||||
filename = prompt("Save workflow as:", filename);
|
||||
if (!filename) return;
|
||||
@@ -782,7 +802,7 @@ export default class ComfyApp {
|
||||
else {
|
||||
const date = new Date();
|
||||
const formattedDate = date.toISOString().replace(/:/g, '-').replace(/\.\d{3}/g, '').replace('T', '_').replace("Z", "");
|
||||
filename = `workflow - ${formattedDate}.json`
|
||||
filename = `${title} - ${formattedDate}.json`
|
||||
}
|
||||
|
||||
const indent = 2
|
||||
|
||||
Reference in New Issue
Block a user