mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-22 01:55:27 -04:00
ComfyUI plugin: Failed to transform tool message: PluginInvokeError: {"args":{},"error_type":"UnboundLocalError","message":"cannot access local variable 'ws' where it is not associated with a value"} #305
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Noobzm on GitHub (May 22, 2025).
Self Checks
Dify version
1.4
Plugin version
0.1.1
Cloud or Self Hosted
Self Hosted (Docker)
Steps to reproduce
When I was using the Comfyui plugin to load the Comfyui workflow (official flux dev demo), I encountered this issue. I tried three versions: 0.07/0.09/0.11,please help me
✔️ Error log
No response
@Noobzm commented on GitHub (May 22, 2025):
This is the workflow json:
{
"6": {
"inputs": {
"text": "cute anime girl with massive fluffy fennec ears and a big fluffy tail blonde messy long hair blue eyes wearing a maid outfit with a long black gold leaf pattern dress and a white apron mouth open placing a fancy black forest cake with candles on top of a dinner table of an old dark Victorian mansion lit by candlelight with a bright window to the foggy forest and very expensive stuff everywhere there are paintings on the walls",
"clip": [
"30",
1
]
},
"class_type": "CLIPTextEncode",
"_meta": {
"title": "CLIP Text Encode (Positive Prompt)"
}
},
"8": {
"inputs": {
"samples": [
"31",
0
],
"vae": [
"30",
2
]
},
"class_type": "VAEDecode",
"_meta": {
"title": "VAE解码"
}
},
"9": {
"inputs": {
"filename_prefix": "ComfyUI",
"images": [
"8",
0
]
},
"class_type": "SaveImage",
"_meta": {
"title": "保存图像"
}
},
"27": {
"inputs": {
"width": 1024,
"height": 1024,
"batch_size": 1
},
"class_type": "EmptySD3LatentImage",
"_meta": {
"title": "空Latent图像(SD3)"
}
},
"30": {
"inputs": {
"ckpt_name": "flux1-dev-fp8.safetensors"
},
"class_type": "CheckpointLoaderSimple",
"_meta": {
"title": "Checkpoint加载器(简易)"
}
},
"31": {
"inputs": {
"seed": 948047819564729,
"steps": 20,
"cfg": 1,
"sampler_name": "euler",
"scheduler": "simple",
"denoise": 1,
"model": [
"30",
0
],
"positive": [
"35",
0
],
"negative": [
"33",
0
],
"latent_image": [
"27",
0
]
},
"class_type": "KSampler",
"_meta": {
"title": "K采样器"
}
},
"33": {
"inputs": {
"text": "",
"clip": [
"30",
1
]
},
"class_type": "CLIPTextEncode",
"_meta": {
"title": "CLIP Text Encode (Negative Prompt)"
}
},
"35": {
"inputs": {
"guidance": 3.5,
"conditioning": [
"6",
0
]
},
"class_type": "FluxGuidance",
"_meta": {
"title": "Flux引导"
}
}
}
@yt-koike commented on GitHub (May 26, 2025):
Hello @Noobzm , I'm yt-koike and I've been working on updating ComfyUI plugin since 0.0.5.
Very strangely, the workflow worked normally without errors in my environment(Dify 1.4.0+ComfyUI 0.1.1).
It might be because of your network connection rather than plugins because the error you're encountering is very likely to show up when your Dify failed to connect to ComfyUI. I suspect the error occurs here.
Could you please share the DSL file of the workflow for further debugging if you don't mind? I also want to know your ComfyUI server's version. It might be because your ComfyUI server is old or not supported by this plugin. My ComfyUI server's version is 0.3.33, and the frontend's is 1.18.10 for your information.
@yt-koike commented on GitHub (May 26, 2025):
Additionally, could you please try txt2img node, which is newer than workflow node? If it also cause errors, please share the error message here. Thank you :)
@Noobzm commented on GitHub (May 27, 2025):
@yt-koike
It was indeed a network problem. After some settings, the problem was solved (I'm not sure which operation worked)
but I encountered a new problem. It seems that the current workflow tool of comfyui plugin cannot support obtaining video output? I found that in tools such as img2vid, the output is actually webp format images instead of typical video formats such as mp4.
@yt-koike commented on GitHub (May 28, 2025):
@Noobzm Thank you for sharing your suggestion and I'm glad you fixed the network problem! Yes, it basically only supports image outputs, not videos but I'm planning to add that output feature sooner or later.