ComfyUI Extension: ComfyUI-WebPrompter
This is a custom node suite for ComfyUI that automates the conversion of web content into an AI-refined news script. This simplified version focuses on the core 'fetch-and-process' workflow for a fast and direct automation experience.
Custom Nodes (0)
README
ComfyUI-WebPrompter
一個為 ComfyUI 設計的自訂節點套件,旨在將網路內容自動化地轉換為由 AI 精煉的新聞稿。這個簡化版專注於核心的「獲取-處理」流程,提供了一個快速、直接的自動化體驗。
This is a custom node suite for ComfyUI that automates the conversion of web content into an AI-refined news script. This simplified version focuses on the core "fetch-and-process" workflow for a fast and direct automation experience.
✨ 功能亮點 (Features)
- 網址直達新聞稿: 直接輸入一個新聞網址,節點會自動抓取主要內容。
- LLM 智能轉化: 利用強大的大語言模型(如 GPT-4o)將原始文本轉化為符合事實、適合播報的新聞字幕稿。
- 支援手動輸入: 除了網址,您也可以直接貼上自己的文本作為輸入源。
- 高度可配置: 您可以自訂指導 LLM 的 System Prompt,以及模型、溫度等參數。
🎨 節點工作流預覽 (Node Workflow)
簡化後的工作流非常直接。LLM News Script Generator
的輸出即為最終結果,可以直接連接到下游節點。
+-------------------+ +--------------------------+ +--------------------+
| | | | | |
| 1. Content Fetcher+----->| 2. News Script Generator +----->| Downstream Node |
| (URL / Manual) | text | (Converts to script) | script| (e.g., Save Text, |
| | | | | CLIP Text Encode) |
+-------------------+ +--------------------------+ +--------------------+
📦 安裝 (Installation)
方法 1: 使用 ComfyUI Manager (推薦)
- 安裝 ComfyUI Manager。
- 點擊
Manager
按鈕 ->Install Custom Nodes
。 - 搜尋
WebPrompter
並點擊Install
。 - 重啟 ComfyUI。
方法 2: 手動安裝 (Git Clone)
-
打開終端 (Terminal),進入
ComfyUI/custom_nodes/
資料夾。 -
執行以下指令,複製本專案:
git clone https://github.com/Gary-yeh/ComfyUI-WebPrompter.git
-
安裝所需的依賴套件:
cd ComfyUI-WebPrompter pip install -r requirements.txt
-
重啟 ComfyUI。
🚀 使用指南 (Usage)
⚠️ 第一步:設置 API 金鑰
LLM News Script Generator
節點需要使用 OpenAI 的 API。請務必在使用前將您的 API 金鑰設置為名為 OPENAI_API_KEY
的環境變數。
核心工作流程
-
新增
1. Content Fetcher
節點:mode
設為URL
,並填入新聞網址。- 或者,
mode
設為Manual
,直接輸入您的內容。 - (可選,但推薦): 為了在處理前預覽抓取的內容,您可以將此節點的
original_text
輸出額外連接到一個Show Text
或Save Text File
節點進行檢查。
-
新增
2. News Script Generator
節點:- 將
Content Fetcher
的original_text
輸出接口,連接到本節點的original_text
輸入接口。 - 根據您的需求調整
system_prompt
和模型參數。
- 將
-
連接到最終目標:
News Script Generator
的news_script
輸出即為最終結果。- 目標是生成文本文件: 將
news_script
連接到Save Text File
(來自 WAS Node Suite) 節點的text
輸入。 - 目標是生成圖像: 將
news_script
連接到CLIP Text Encode
節點的text
輸入。
🤝 貢獻 (Contributing)
歡迎任何形式的貢獻!如果您發現了 Bug 或有任何功能建議,請隨時在 GitHub Issues 中提出。
📄 授權 (License)
本專案採用 MIT License 授權。