Comfyui-Superprompt-Unofficial

Comfyui-Superprompt-Unofficial
★ 69

文本生成Hugging FaceComfyUI 节点参数可控
在ComfyUI里调用 Hugging Face 的 SuperPrompt-v1 模型生成文本,支持 max_new_tokens、repetition_penalty 等参数,实现可控文本生成与工作流集成。
💡 在ComfyUI工作流中基于提示生成可控文本。
🍴 6 Forks💻 Python🔄 2024-05-23
📦
网盘下载
复制链接后前往夸克网盘下载
https://pan.quark.cn/s/b6135d9bd930
📦 requirements.txt
torch
transformers
image
📄 README

SuperPrompter

The SuperPrompter node is a ComfyUI node that uses the SuperPrompt-v1 model from Hugging Face to generate text based on a given prompt. It provides various parameters to control the text generation process.

Installation

  • Make sure you have ComfyUI installed. If not, follow the installation instructions from the ComfyUI documentation.
  • Create a directory named superprompter inside the ComfyUI nodes directory.
  • Place the __init__.py and superprompter_node.py files inside the superprompter directory.
  • Install the required dependencies by running the following command:
  • pip install -r requirements.txt

    Usage

  • Launch ComfyUI.
  • In the ComfyUI interface, you should see a new node called “SuperPrompter” under the “text” category.
  • Add the SuperPrompter node to your workflow.
  • Configure the input parameters:
  • prompt: The prompt or starting text for generating the text.
  • max_new_tokens: The maximum number of new tokens to generate.
  • repetition_penalty: The penalty for repeating tokens in the generated text.
  • Connect the SuperPrompter node to other nodes in your workflow as needed.
  • Execute the workflow to generate text based on the provided prompt and parameters.
  • Model

    The SuperPrompter node uses the SuperPrompt-v1 model from Hugging Face. The model files will be automatically downloaded and saved in the ~/.models directory when the node is first used.

    License

    This node is released under the MIT License.

    Credits

    The SuperPrompter node is based on the SuperPrompt-v1 model and concept by roborovski on Hugging Face:

  • Original Source: https://brianfitzgerald.xyz/prompt-augmentation/
  • Model: roborovski/superprompt-v1