Nodes/ComfyUI-IF_AI_tools/IF Prompt Maker🎨
ComfyUI Node

IF Prompt Maker🎨

The original SD prompt-maker node — the one that started the IF_AI pack

By if-ai·Created 2 years ago·Updated 11 months ago· 701
IF Prompt Maker🎨
  • images
  • mask
  • Omni
  • question
  • response
  • negative
  • omni
  • generated_images
  • mask
llm_provider
llm_model
base_iplocalhost
port11434
user_prompt
strategynormal
prime_directives
profilesNone
embellish_prompt
style_prompt
neg_prompt
stop_string
max_tokens2048
randomfalse
seed0
temperature0.70
top_k40
top_p0.90
repeat_penalty1.10
keep_alivefalse
clear_historyfalse
history_steps10
aspect_ratio1:1
batch_count4
external_api_key
precision
attention

IF Prompt Maker is the node that put the IF_AI pack on the map. Back in spring 2024, the author (Impact Frames) released it alongside a custom-trained llama3_ifai_sd_prompt_mkr_q4km Ollama model, and r/comfyui took notice - the announcement post pulled over a hundred upvotes. The pitch was simple and it still holds: give it an image, it returns a detailed, Stable Diffusion-flavored prompt you can drop straight into a sampler.

In the current build it's effectively the same node as IF Image to Prompt - identical input schema, same outputs. The difference is mostly historical: this is the original that the pack grew around, and the name tells you what it was built for. If you're wondering which to grab, there's no wrong choice; they're twins in this codebase.

How it works

The mechanism is a vision-LLM prompt-reversal pipeline. Your images get encoded for the provider, sent with a system prompt chosen from profiles (the dropdown reads JSON from the pack's IF_AI/presets folder - IF_PromptMKR, IF_PromptMKR_multy, IF_Omost, and more, all editable), and the model returns a prompt in response. Then the preset stacks glue on: embellish_prompt (29 options), style_prompt (63), and neg_prompt (24) modify and extend the raw output, and negative comes out as its own output for the negative conditioning side.

The strategy input mirrors the pack: normal describes the image; omost produces Omost-style canvas conditioning via the omost_tool; create/edit/variations kick off image generation through the OpenAI-compatible API. batch_count controls how many images that generates.

The inputs that matter

  • images - the reference image. The whole job.
  • llm_provider / llm_model - ollama plus a vision model (the author's own impactframes/llama3_ifai_sd_prompt_mkr_q4km and impactframes/ifai_promptmkr_dolphin_phi3 are designed for this) or any cloud provider with a key.
  • user_prompt - extra direction, like "focus on the lighting."
  • profiles - which prompt-writing persona does the work.

Outputs: question, response (wire into CLIP Text Encode), negative, omni (omost payload), generated_images, mask.

Installation

ComfyUI Manager, search "IF_AI_tools", or:

cd ComfyUI/custom_nodes
git clone https://github.com/if-ai/ComfyUI-IF_AI_tools.git

Then install requirements and pull the prompt-maker model if you want the author's tuned behavior:

pip install -r requirements.txt
ollama run impactframes/llama3_ifai_sd_prompt_mkr_q4km:latest

Gotchas

Two things to know. First, a fair chunk of the community argued the tuned model was trained on old Lexica keyword dumps - "4k uhd" era SD1.4 mush - and that plain llama3 gets you most of the way. Try both; your taste is the tiebreaker. Second, the pack is archived and prompt generation is moving to the ComfyUI-IF_AI_PromptImaGen repo, which explicitly requires disabling this pack first. If you're setting up fresh in 2026, that successor is the forward-looking option - but IF Prompt Maker still works, and for a lot of people it's still the one they reach for.

CategoryImpactFrames💥🎞️/IF_tools

Inputs (30)

NameTypeDefaultDescription
imagesIMAGE
llm_providerCOMBO12 options: xai, llamacpp, ollama, kobold, lmstudio, textgen, +6
llm_modelCOMBO0 options:
base_ipSTRINGlocalhost
portSTRING11434
user_promptSTRING
strategyoptCOMBOnormal5 options: normal, omost, create, edit, variations
maskoptMASK
prime_directivesoptSTRINGThe system prompt for the LLM.
profilesoptCOMBONoneThe pre-defined system_prompt from the json profile file on the presets folder you can edit or make your own will be listed here.
embellish_promptoptCOMBOThe pre-defined embellishment from the json embellishments file on the presets folder you can edit or make your own will be listed here.
style_promptoptCOMBOThe pre-defined style from the json style_prompts file on the presets folder you can edit or make your own will be listed here.
neg_promptoptCOMBOThe pre-defined negative prompt from the json neg_prompts file on the presets folder you can edit or make your own will be listed here.
stop_stringoptCOMBOSpecifies a string at which text generation should stop.
max_tokensoptINT20481–8192Maximum number of tokens to generate in the response.
randomoptBOOLEANfalseToggles between using a fixed seed or temperature-based randomness.
seedoptINT0Random seed for reproducible outputs.
temperatureoptFLOAT0.700–1Controls randomness in output generation. Higher values increase creativity but may reduce coherence.
top_koptINT40Limits the next token selection to the K most likely tokens.
top_poptFLOAT0.90Cumulative probability cutoff for token selection.
repeat_penaltyoptFLOAT1.10Penalizes repetition in generated text.
keep_aliveoptBOOLEANfalseDetermines whether to keep the model loaded in memory between calls.
clear_historyoptBOOLEANfalseDetermines whether to clear the history between calls.
history_stepsoptINT10Number of steps to keep in history.
aspect_ratiooptCOMBO1:1Aspect ratio for the generated images.
batch_countoptINT4Number of images to generate. only for create, edit and variations strategies.
external_api_keyoptSTRINGIf this is not empty, it will be used instead of the API key from the .env file. Make sure it is empty to use the .env file.
precisionoptCOMBOSelect preccision on Transformer models.
attentionoptCOMBOSelect attention mechanism on Transformer models.
OmnioptOMNIAdditional input for the selected tool.

Outputs (6)

NameTypeDescription
questionSTRING
responseSTRING
negativeSTRING
omniOMNI
generated_imagesIMAGE
maskMASK