3d665a61efbbdc8e0b33902c2fd12a160174271e
prompt-generator-comfyui
Custom prompt generator node for ComfyUI
Table Of Contents
Setup
- Clone the repository with
git clone https://github.com/alpertunga-bile/prompt-generator-comfyui.gitcommand undercustom_nodesfolder. - Run the ComfyUI
- Open the
hires.fixWithPromptGenerator.jsonworkflow - Put your generator under
prompt_generatorsfolder. You can create your prompt generator with this repository. You have to put generator as folder. Do not just putpytorch_model.binfile for example. - Click
Refreshbutton in ComfyUI
Features
- Print generated text to terminal and log the node's state under
generated_promptsfolder with date as filename.
Example Workflow
- Prompt Generator Node may look different with final version but workflow is not going to change
Variables
- For
model_typevariable copy and paste the model's name from this site like thistiiuae/falcon-40b - You can get information about variables from this link
How Recursive Works?
- Let's say we give
a,as seed and recursive level is 1. I am going to use the same outputs for this example to understand the functionality more accurately. - With self recursive, let's say generator's output is
b. So next seed is going to beband generator's output isc. Final output isa, c. It can be used for generating random outputs. - Without self recursive, let's say generator's output is
b. So next seed is going to bea, band generator's output isc. Final output isa, b, c. It can be used for more accurate prompts.
How Preprocess Mode Works?
- exact_keyword =>
(masterpiece), ((masterpiece))is not allowed. Checking the pure keyword without parantheses and weights. Adding prompts from the beginning of the generated text so add important prompts to seed. - exact_prompt =>
(masterpiece), ((masterpiece))is allowed but(masterpiece), (masterpiece)is not. Checking the exact match of the prompt. - none => Everything is allowed even the repeated prompts.
Example
# ---------------------------------------------------------------------- Original ---------------------------------------------------------------------- #
((masterpiece)), ((masterpiece:1.2)), (masterpiece), blahblah, blah, blah, ((blahblah)), (((((blah))))), ((same prompt)), same prompt, (masterpiece)
# ------------------------------------------------------------- Preprocess (Exact Keyword) ------------------------------------------------------------- #
((masterpiece)), blahblah, blah, ((same prompt))
# ------------------------------------------------------------- Preprocess (Exact Prompt) -------------------------------------------------------------- #
((masterpiece)), ((masterpiece:1.2)), (masterpiece), blahblah, blah, ((blahblah)), (((((blah))))), ((same prompt)), same prompt
Example Outputs
Languages
Python
100%