Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > ComfyUI-QwenVL-F > QwenVL-F Prompt Enhancer

ComfyUI Node: QwenVL-F Prompt Enhancer

Class Name

QwenVL-F_PromptEnhancer

Category
QwenVL-F
Author
id-fa (Account age: 0days)
Extension
ComfyUI-QwenVL-F
Latest Updated
2026-10-08
Github Stars
0.0K

How to Install ComfyUI-QwenVL-F

Install this extension via the ComfyUI Manager by searching for ComfyUI-QwenVL-F
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-QwenVL-F in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

QwenVL-F Prompt Enhancer Description

Expands short scene ideas into detailed AI art prompts using a selected local text or vision model.

QwenVL-F Prompt Enhancer:

QwenVL-F_PromptEnhancer turns a short scene idea into a longer text prompt that you can use in an AI art workflow. It combines an instruction for the kind of enhancement you want with your scene description, then asks a selected local language model to generate the result. It supports both text-only and vision-capable model checkpoints, although this node sends text only and does not analyze an image or video. The result is generated wording, so review it before using it: the model may add details that do not match your intended subject, composition, or style.

QwenVL-F Prompt Enhancer Input Parameters:

model_name

Selects the local model used to write the enhanced prompt. The available choices come from the models discovered by the extension, so the exact list depends on your installation; the first discovered model is selected by default. The node checks whether the chosen model is vision-capable and uses the corresponding model-loading path. Changing models can change the wording and quality of the result and may require the previous model to be unloaded. There is no numeric minimum or maximum.

quantization

Controls the model-loading precision or quantization mode, which can affect memory use and compatibility. The default is FP16. The source explicitly handles Q4 as 4-bit loading and Q8 as 8-bit loading for text-only models; other selections use a non-quantized loading path there. The complete dropdown options are supplied by Quantization.get_values() and are not shown in the provided source, so their full list cannot be stated here. There is no numeric minimum or maximum.

attention_mode

Selects an attention mode for the vision-capable model path. The default is auto; the full set of choices comes from ATTENTION_MODES and is not included in the provided source. This setting is passed to the QwenVL path but is not passed to the text-only generation path. Leave it on auto unless you have a reason to use another available mode.

use_torch_compile

Controls whether the vision-capable model path is asked to use PyTorch compilation. The default is False; the options are True and False. The setting is passed to the QwenVL path and is not used by the text-only path. Its actual effect depends on the base model implementation, which is not included in the provided source.

device

Chooses where the model runs. The options are auto (default), cuda, cpu, and mps. For text-only models, auto chooses CUDA when available, otherwise MPS when available, otherwise CPU. A manually selected device must be available and compatible with your setup; selecting an unavailable accelerator can stop the model from loading or generating. There is no numeric minimum or maximum.

prompt_text

Contains the scene idea you want enhanced. It is a multiline string and defaults to empty text. The node removes leading and trailing whitespace before use. If you leave it blank, the node supplies Describe a scene vividly. as the request sent to the model; it does not simply return the style instruction. There is no stated length limit, though longer text gives the model more material to process.

enhancement_style

Selects a preset instruction that guides how the prompt is enhanced. The preferred default is 📝 Enhance when that style exists; otherwise, the node uses the first available style. The complete option list and the wording of each preset are defined in PROMPT_STYLES, which is not included in the provided source. A nonblank custom system prompt takes precedence over this selection. There is no numeric minimum or maximum.

custom_system_prompt

Provides your own instruction for how the model should rewrite or expand the scene. It is a multiline string and defaults to empty text. When it contains non-whitespace text, it replaces the selected preset instruction; it does not get added alongside that preset. The node places this instruction before the scene request. Leave it blank to use the selected enhancement style. There is no stated length limit.

max_tokens

Sets the maximum number of new tokens the model can generate. The default is 256, the minimum is 32, and the maximum is 1024. Tokens are pieces of text rather than a fixed number of words. Increase this limit when a response ends before it finishes; lower it when you want to constrain the possible length of the generated prompt.

temperature

Controls the sampling setting used during generation. The default is 0.7, the minimum is 0.1, and the maximum is 1.0. In the text-only path, sampling is enabled, so lower values generally favor less varied wording while higher values allow more variation. The setting is also passed to the QwenVL path, whose generation behavior is defined outside the provided class.

top_p

Sets a sampling threshold that limits which next-token choices the model considers. The default is 0.9, the minimum is 0.0, and the maximum is 1.0. In the text-only path, it works alongside temperature during generation; lower values narrow the selection of candidate wording. Its effect in the QwenVL path depends on the base implementation.

repetition_penalty

Sets a generation control intended to discourage or permit repeated wording. The default is 1.1, the minimum is 0.5, and the maximum is 2.0. The value is passed to both model paths. If a result repeats phrases excessively, try a modest increase; if the wording becomes awkward, move it closer to 1.0.

keep_model_loaded

Determines whether the model remains available for another run. The default is False; the options are True and False. In the text-only path, False releases the model and tokenizer after generation, while True keeps them for reuse. The setting is also passed to the QwenVL path. Keeping a model loaded can avoid loading it again on subsequent runs but continues to occupy memory.

seed

Sets the generation seed. The default and minimum are 1; the maximum is 4294967295. The text-only path applies it through PyTorch before generating, and the QwenVL path receives it as an argument. Reusing a seed is useful when comparing settings, but the source does not guarantee identical results across different models, devices, or environments.

QwenVL-F Prompt Enhancer Output Parameters:

ENHANCED_OUTPUT

A single string containing the model-generated text, with leading and trailing whitespace removed. This is the node’s only output socket. For a text-only model, the node attempts to remove the supplied prompt from the decoded generation so that the value contains the newly generated response. For a vision-capable model, it takes the first value returned by the QwenVL generation path. The value is text for you to inspect and use as a prompt; it is not an image, a video, or a guarantee that every generated detail matches your original idea.

QwenVL-F Prompt Enhancer Usage Tips:

  • Start with a concrete scene in prompt_text, including the subject, setting, lighting, and any details that must be preserved. Review the generated result for additions that change your intent.
  • Begin with an available enhancement_style preset. When you need a more specific instruction, write it in custom_system_prompt and remember that doing so replaces the preset instruction.
  • Use max_tokens to give a detailed prompt room to finish. Start at the default of 256 and increase it only when the generated text is cut short.
  • For text-only models, try a lower temperature or top_p when wording varies too much, and adjust repetition_penalty modestly if phrases recur.
  • Leave device on auto for an initial run. If you select cuda or mps explicitly, confirm that the corresponding accelerator is available in your environment.
  • Turn on keep_model_loaded when making several prompts with the same model and you have enough memory. Leave it off when freeing memory after each run matters more.
  • Keep the same seed while comparing prompt instructions or generation settings, then change it to explore another possible result.

QwenVL-F Prompt Enhancer Common Errors and Solutions:

No models appear in model_name or the node fails while building its dropdown

  • Explanation: The node obtains its choices from a scan of local models and immediately selects the first result as its default. If that scan returns no models, the dropdown cannot be initialized as written.
  • Solution: Check that a compatible local model is installed where the extension scans for models, then refresh the node’s model list or restart the application.

Model path or checkpoint loading error

  • Explanation: The node resolves the selected model to a local path and loads it. A missing, incomplete, or incompatible checkpoint can prevent that step from succeeding; the exact error text depends on the model and loading library.
  • Solution: Confirm that the selected model’s files are present and complete. Try another model shown in the dropdown to determine whether the issue is specific to one checkpoint.

CUDA out of memory or another memory-allocation error

  • Explanation: Loading or running the selected model may require more available memory than the device has. A model kept loaded from an earlier run can also continue to occupy memory.
  • Solution: Set keep_model_loaded to False, free other workloads, or select a suitable lower-memory quantization option if one is available and supported by your setup. A smaller model may also help.

CUDA or MPS device is unavailable

  • Explanation: An explicitly selected cuda or mps device may not exist or may not be usable in the current environment. The exact message comes from PyTorch or the model loader.
  • Solution: Choose auto to let the text-only path select an available device, or select cpu if accelerator support is unavailable.

BitsAndBytes or quantized-model loading error

  • Explanation: For text-only models, Q4 and Q8 request BitsAndBytes quantized loading. The quantization package, device, model, or their combination may not support the requested mode; the exact error text varies.
  • Solution: Try the default FP16 setting or another available mode, and check that the required quantization dependencies and hardware support are installed before retrying Q4 or Q8.

Model or tokenizer compatibility error

  • Explanation: The text-only path loads the tokenizer and model from the selected checkpoint with trust_remote_code=True. If the checkpoint lacks required files or is incompatible with the installed libraries, loading can fail.
  • Solution: Verify the checkpoint installation and its stated dependency requirements, or choose another locally available model.

Generation returns an empty ENHANCED_OUTPUT

  • Explanation: The node trims whitespace from the result, and the text-only path removes what it identifies as the supplied prompt from decoded text. Depending on what the model generated, no response text may remain.
  • Solution: Retry with a clearer scene request, a different instruction or model, or a higher max_tokens value. Check the result after each change rather than assuming generation succeeded because no error appeared.

Output is cut off or repeats wording

  • Explanation: max_tokens limits the amount of new text, while the sampling and repetition settings influence generation. The model itself can also produce an incomplete or repetitive response.
  • Solution: Increase max_tokens for a cut-off response. For repetition, try a modestly higher repetition_penalty or less variable sampling, then review the new result.

QwenVL-F Prompt Enhancer Related Nodes

Go back to the extension to check out more related nodes.
ComfyUI-QwenVL-F
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

QwenVL-F Prompt Enhancer