ComfyUI Extension: ComfyUI_OneButtonPrompt_Flux

Authored by billwuhao

Created

Updated

9 stars

ComfyUI_OneButtonPrompt_Flux is a Flux prompt generation node. The subject can be 'human,' 'other' or a combination of both. For human, pose settings can be enabled. Additionally, various styles can be applied. Finally, combine it with 'Prompt Enhancement' to seamlessly automate image generation, eliminating the hassle of designing prompts.

Custom Nodes (0)

    README

    中文 | English

    One Button Prompt for Flux in ComfyUI


    一个在 comfyui 中一键生成 flux 提示的节点.

    📣 更新

    [2025-02-19]⚒️: 支持本地 DeepSeek R1.

    DeepScaleR-1.5B-Preview 超越 OpenAI's O1-Preview 的性能. 将模型以及所有配置文件手动下载到 ComfyUI\models\LLM\DeepScaleR-1.5B-Preview 下即可使用.

    • 自定义主题用法:

    • 高级自动提示用法:

    这样 { a beautiful girl | a handsome man | a sexy woman | a naughty child | a future interstellar animal | a transportation vehicle| a space vehicle | A fantastic building | a landscape of lake and mountain | a Chinese landscape| a sea landscape| a city landscape} 设置好主题, 会自动随机选一个主题生成提示词.

    • 其他更多用法留给您自己去开发吧.

    • 生成效果:

    提示: 如果显存不够, 可将 Flux 换成 sdxl 或 SD15 并调整 DeepSeek R1 提示词. 自行琢磨.

    [2025-01-21]⚒️:

    • “txt” 文件支持 “//” 注释:注释行将被忽略。

    • 添加更多 prompts (人物和姿态):

    [2025-01-10]⚒️:

    • human_posepose:任何主体都可以设置姿势。请立即将文件名 human_pose 更改为 pose.

    • 新增 4 个 add_ 文件, 用来记录我发现的好的提示词, 你也可以将你的提示词分享, 并提交 PR.

    • subject 新增 None, 将 subject 变成可选的, 以便在 lora_trigger_or_prefix 固定自定义主体, 来生成同一主体下的图片, 以抽大奖.

    • 增加测试模式, 请将你需要测试的提示词, 放入文件 test.txt(第一次需要新建一个), 然后开启测试模式, 依次进行每条提示词的测试. 注意: 测试模式时, 除了自定义的 lora_trigger_or_prefix 其他所有选项都无效. 如果你是挂机测试, 所有提示测试完后, 转随机生图.

    用法

    • 主体选择 human,则只生成 human 提示
    • 选择 other,则只生成 other 提示
    • 选择 dual_subject,则包含上述两者
    • 如果开启 pose,将生成主体的姿态提示
    • 如果开启 style,将生成 style 提示
    • lora 触发词/前缀 是可选的,可自定义输入
    • 如果你在运行过程中修改了自定义文件, 请开启 refresh 刷新一下, 而不用重启软件.
    • 如果固定种子,将只生成一次固定的提示

    alt text

    (MW:1.2), a beautiful girl, fall asleep, A beautiful lovely alpaca, naive art

    • (MW:1.2), 是 lora 触发词
    • a beautiful girl, 是 human
    • fall asleep, 是 pose
    • A beautiful lovely alpaca, 是 other
    • naive art, 是 style

    自定义主体,姿态和风格

    1. 在文件夹 ComfyUI\custom_nodes\ComfyUI_OneButtonPrompt_Flux\txtfiles 下面新建 4 个文件

      alt text

    2. 分别输入相应的内容, 即可生成自定义的主体, 姿态, 风格

    3. prompt_words.xlsx 文件里是我很早的时候, 玩 disco diffusion 和 sd1.5 时整理的提示, 你可以参考.

    注意: 一定要新建文件, 然后随意修改, 并不会影响节点使用和更新.

    自动生图

    如果你想挂着电脑自动生图, 选择 Queue (On Change) 点击开始即可. 工作流在 workflow_example 里.

    alt text

    结合 Prompt Enhancer 一起使用

    提示词增强在某些情况下效果很差, 完全将提示词的风格, 要表达的意境破坏了, 建议在抽奖时开启.

    ComfyUI-Fluxpromptenhancer: https://github.com/marduk191/ComfyUI-Fluxpromptenhancer

    感谢

    OneButtonPrompt