mirror of
https://github.com/langgenius/dify-official-plugins.git
synced 2026-07-21 17:45:23 -04:00
[PR #754] [MERGED] feat: Guess mime type by filename for non-image outputs in ComfyUI pl… #1534
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?
📋 Pull Request Information
Original PR: https://github.com/langgenius/dify-official-plugins/pull/754
Author: @oubeichen
Created: 4/18/2025
Status: ✅ Merged
Merged: 4/21/2025
Merged by: @crazywoola
Base:
main← Head:comfyui-guess-mimetype📝 Commits (2)
d0165bffeat: Guess mime type by filename for non-image outputs in ComfyUI plugin.027a751chore: Update dify_plugin version constraint in requirements.txt in ComfyUI plugin📊 Changes
4 files changed (+12 additions, -6 deletions)
View changed files
📝
tools/comfyui/manifest.yaml(+1 -1)📝
tools/comfyui/requirements.txt(+1 -1)📝
tools/comfyui/tools/comfyui_client.py(+7 -2)📝
tools/comfyui/tools/comfyui_workflow.py(+3 -2)📄 Description
…ugin.
ComfyUI does not only support image generation, but can also generate audio, video, and model files.
All output files are stored under the "images" field in ComfyUI history JSON regardless of their type, refer to https://github.com/comfyanonymous/ComfyUI/blob/7ecd5e961465d9bb20fb12b7068e1930da875b0e/comfy_extras/nodes_video.py
Use mimetypes.guess_type() to determine the correct mime type based on the filename, fallback to image/png if unable to guess.
This helps workflows handle different output file types correctly.
Related Issues or Context
This PR contains Changes to Non-Plugin
This PR contains Changes to Non-LLM Models Plugin
This PR contains Changes to LLM Models Plugin
Version Control (Any Changes to the Plugin Will Require Bumping the Version)
VersionField, Not in Meta Section)Dify Plugin SDK Version
dify_plugin>=0.1.0,<0.2.0in requirements.txt (SDK docs)Environment Verification (If Any Code Changes)
Local Deployment Environment
SaaS Environment
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.