ComfyUI_StepFun

ComfyUI_StepFun
★ 7

多模态理解视频场景分析智能提示生成云端处理
接入StepFun多模态API,实现图像与视频内容理解、场景分析与智能提示生成,免本地GPU云端处理。
💡 将图片或视频上传至StepFun进行内容分析并生成智能提示与描述
🍴 1 Forks💻 Python🔄 2024-12-05
📦
网盘下载
复制链接后前往夸克网盘下载
https://pan.quark.cn/s/9d76119b2ef2
📦 requirements.txt
openai
oss2
Role2Story Workflow Example
Video Chat Example
📄 README

ComfyUI StepFun Nodes

This is a collection of ComfyUI custom nodes based on the StepFun API. These nodes enable easy implementation of intelligent analysis and processing for images and videos.

Currently, video upload is not implemented, and video URL links are required.

🚧 More nodes are being updated…

Key Features

  • 🖼️ Image Content Understanding and Analysis
  • 🎬 Video Content Understanding and Analysis
  • ✨ Intelligent Prompt Generation
  • 💰 Cost-effective API Pricing
  • 🚀 Cloud Processing without Local GPU Resources
  • Installation

  • Clone this repository to your ComfyUI’s custom_nodes directory:
  • cd custom_nodes
    git clone https://github.com/your-repo/ComfyUI_StepFun.git

  • Install dependencies:
  • cd ComfyUI_StepFun
    pip install -r requirements.txt

    API Key Configuration

  • Register an account at StepFun Platform
  • Get your API key from the account overview page
  • Add the API key to the configuration file
  • Usage

    Example Workflows

    The following examples are provided in the workflow folder:

    Role2Story Workflow

  • File: workflow/role2story.json
  • Features: By inputting character/scene/story descriptions, automatically generate:
  • 🎨 Theme Poster
  • 🎬 Three Key Plot Shots
  • This workflow demonstrates the model’s content understanding and intelligent prompt generation capabilities
  • Video Caption Workflow

  • File: workflows/StepFunVideo2Caption.json
  • Features:
  • 📽️ Native Video Upload Support
  • 📝 Automatic Video Caption Generation
  • 🤖 Intelligent Video Content Analysis
  • 🚧 More workflow examples are being updated…

    Supported Features

  • Image Content Recognition and Description
  • Video Scene Analysis
  • Intelligent Prompt Generation
  • Native Video Upload Support
  • [Other Features]
  • Video Processing Guide

    Native Video Upload

    You can now use the StepFun Video File Uploader node for direct video uploads. Simply provide the absolute path to your video file (e.g., C:\Users\Administrator\Downloads\test.mp4). The node will return a stepfile://file-id string that can be used as input for the video_url parameter in the StepFun Video Chat node.

    Video File Processing with FFmpeg

    For videos larger than 128MB or in different formats, you can use FFmpeg for preprocessing:

    Splitting Video Files

    To split a large video into smaller segments (120-second chunks):

    ffmpeg -i sample.mp4 -acodec copy -f segment -segment_time 120 -vcodec copy -reset_timestamps 1 -map 0 output_time_%d.mp4

    Converting to MP4 Format

    To convert videos from other formats to MP4:

    ffmpeg -i sample.mkv -codec copy sample.mp4

    Note: It’s recommended to compress videos before uploading for better performance.

    Notes

  • API calls require internet connection
  • Ensure correct API key configuration
  • Comply with API usage limits and terms
  • Contact

  • Email: 3354405250@qq.com
  • [Other Contact Methods]
  • If you encounter any issues while using this project, please feel free to contact us through the above methods.