mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-01-30 21:09:53 +00:00
Rename ComfyWorkflow to ComfyWorkflowJSON (#91)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { ComfyWorkflow } from "types/comfyWorkflow";
|
||||
import { ComfyWorkflowJSON } from "types/comfyWorkflow";
|
||||
import {
|
||||
HistoryTaskItem,
|
||||
PendingTaskItem,
|
||||
@@ -13,7 +13,7 @@ interface QueuePromptRequestBody {
|
||||
prompt: Record<number, any>;
|
||||
extra_data: {
|
||||
extra_pnginfo: {
|
||||
workflow: ComfyWorkflow;
|
||||
workflow: ComfyWorkflowJSON;
|
||||
};
|
||||
};
|
||||
front?: boolean;
|
||||
|
||||
@@ -15,7 +15,10 @@ import { createImageHost, calculateImageGrid } from "./ui/imagePreview";
|
||||
import { DraggableList } from "./ui/draggableList";
|
||||
import { applyTextReplacements, addStylesheet } from "./utils";
|
||||
import type { ComfyExtension } from "/types/comfy";
|
||||
import { type ComfyWorkflow, parseComfyWorkflow } from "../types/comfyWorkflow";
|
||||
import {
|
||||
type ComfyWorkflowJSON,
|
||||
parseComfyWorkflow,
|
||||
} from "../types/comfyWorkflow";
|
||||
import { ComfyNodeDef } from "/types/apiTypes";
|
||||
import { ComfyAppMenu } from "./ui/menu/index.js";
|
||||
import { getStorageValue, setStorageValue } from "./utils.js";
|
||||
@@ -1094,7 +1097,7 @@ export class ComfyApp {
|
||||
|
||||
// No image found. Look for node data
|
||||
data = data.getData("text/plain");
|
||||
let workflow: ComfyWorkflow;
|
||||
let workflow: ComfyWorkflowJSON;
|
||||
try {
|
||||
data = data.slice(data.indexOf("{"));
|
||||
workflow = await parseComfyWorkflow(data);
|
||||
@@ -2182,7 +2185,7 @@ export class ComfyApp {
|
||||
* @param { boolean } clean If the graph state, e.g. images, should be cleared
|
||||
*/
|
||||
async loadGraphData(
|
||||
graphData?: ComfyWorkflow,
|
||||
graphData?: ComfyWorkflowJSON,
|
||||
clean: boolean = true,
|
||||
restore_view: boolean = true,
|
||||
workflow: string | null = null
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type { ComfyWorkflow } from "/types/comfyWorkflow";
|
||||
import type { ComfyWorkflowJSON } from "/types/comfyWorkflow";
|
||||
|
||||
export const defaultGraph: ComfyWorkflow = {
|
||||
export const defaultGraph: ComfyWorkflowJSON = {
|
||||
last_node_id: 9,
|
||||
last_link_id: 9,
|
||||
nodes: [
|
||||
|
||||
Reference in New Issue
Block a user