Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
31c38ddb9b | ||
|
|
2f2c63fa11 | ||
|
|
7675c5ba90 | ||
|
|
7d65d23f84 | ||
|
|
a91edf6371 |
@@ -2,6 +2,8 @@
|
||||
|
||||
Open source comfyui deployment platform, a `vercel` for generative workflow infra. (serverless hosted gpu with vertical intergation with comfyui)
|
||||
|
||||
Check out our latest lcoal demo -> https://github.com/comfy-deploy/comfyui-api-comfydeploy
|
||||
|
||||
> [!NOTE]
|
||||
> Im looking for creative hacker to join ComfyDeploy's core team! DM me on [twitter](https://x.com/BennyKokMusic)
|
||||
|
||||
|
||||
@@ -672,6 +672,14 @@ async def comfy_deploy_run(request):
|
||||
return web.json_response(res, status=status)
|
||||
|
||||
|
||||
@server.PromptServer.instance.routes.post("/comfyui-deploy/interrupt")
|
||||
async def interrupt_prompt(request):
|
||||
data = await request.json()
|
||||
prompt_id = data.get("prompt_id")
|
||||
await update_run(prompt_id, Status.CANCELLED)
|
||||
return web.json_response({"message": "Prompt interrupted"}, status=200)
|
||||
|
||||
|
||||
async def stream_prompt(data, token):
|
||||
# In older version, we use workflow_api, but this has inputs already swapped in nextjs frontend, which is tricky
|
||||
workflow_api = data.get("workflow_api_raw")
|
||||
|
||||
@@ -18,6 +18,7 @@ class Status(Enum):
|
||||
SUCCESS = "success"
|
||||
FAILED = "failed"
|
||||
UPLOADING = "uploading"
|
||||
CANCELLED = "cancelled"
|
||||
|
||||
|
||||
class StreamingPrompt(BaseModel):
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
[project]
|
||||
name = "comfyui-deploy"
|
||||
description = "Open source comfyui deployment platform, a vercel for generative workflow infra."
|
||||
version = "2.3.1"
|
||||
version = "2.3.4"
|
||||
license = { file = "LICENSE" }
|
||||
dependencies = ["aiofiles", "pydantic", "opencv-python", "imageio-ffmpeg", "tabulate", "brotli"]
|
||||
|
||||
|
||||
+919
-188
File diff suppressed because it is too large
Load Diff
@@ -49,6 +49,7 @@ async function fetchWorkflows(getData, offset = 0, limit = 20, search = "") {
|
||||
|
||||
function createWorkflowItem(workflow, getTimeAgo, getData) {
|
||||
const li = document.createElement("li");
|
||||
let loadingToast = null;
|
||||
li.style.cssText = `
|
||||
border-bottom: 1px solid #444;
|
||||
background: transparent;
|
||||
@@ -74,7 +75,7 @@ function createWorkflowItem(workflow, getTimeAgo, getData) {
|
||||
}
|
||||
|
||||
// Show loading toast
|
||||
const loadingToast = window.app.extensionManager.toast.add({
|
||||
loadingToast = window.app.extensionManager.toast.add({
|
||||
severity: "info",
|
||||
summary: "Loading workflow...",
|
||||
detail: `Loading "${workflow.name}"`,
|
||||
@@ -108,6 +109,33 @@ function createWorkflowItem(workflow, getTimeAgo, getData) {
|
||||
// Load the workflow
|
||||
window.app.loadGraphData(latestVersion.workflow);
|
||||
|
||||
// Wait a bit for the graph to fully load before checking for ComfyDeploy node
|
||||
await new Promise((resolve) => setTimeout(resolve, 100));
|
||||
|
||||
// Check if ComfyDeploy node exists, if not add it back
|
||||
const graph = window.app.graph;
|
||||
let deployMeta = graph.findNodesByType("ComfyDeploy");
|
||||
|
||||
if (deployMeta.length === 0) {
|
||||
// Add ComfyDeploy node with workflow metadata
|
||||
graph.beforeChange();
|
||||
const node = LiteGraph.createNode("ComfyDeploy");
|
||||
node.configure({
|
||||
widgets_values: [
|
||||
workflow.name, // workflow_name
|
||||
workflow.id, // workflow_id
|
||||
latestVersion.version, // version
|
||||
],
|
||||
});
|
||||
node.pos = [0, 0];
|
||||
graph.add(node);
|
||||
graph.afterChange();
|
||||
|
||||
console.log(
|
||||
`Added ComfyDeploy node with: name="${workflow.name}", id="${workflow.id}", version="${latestVersion.version}"`
|
||||
);
|
||||
}
|
||||
|
||||
// Show success toast
|
||||
window.app.extensionManager.toast.add({
|
||||
severity: "success",
|
||||
@@ -127,7 +155,9 @@ function createWorkflowItem(workflow, getTimeAgo, getData) {
|
||||
life: 5000,
|
||||
});
|
||||
} finally {
|
||||
loadingToast.close();
|
||||
if (loadingToast) {
|
||||
loadingToast.close();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user