ComfyUI > Nodes > Comfyui-Z-Image-Utilities > Z-Image Prompt Enhancer + CLIP

ComfyUI Node: Z-Image Prompt Enhancer + CLIP

Class Name

Z_ImagePromptEnhancerWithCLIP

Category
Z-Image
Author
Koko-boya (Account age: 2346days)
Extension
Comfyui-Z-Image-Utilities
Latest Updated
2025-12-22
Github Stars
0.1K

How to Install Comfyui-Z-Image-Utilities

Install this extension via the ComfyUI Manager by searching for Comfyui-Z-Image-Utilities
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter Comfyui-Z-Image-Utilities 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

Z-Image Prompt Enhancer + CLIP Description

Enhances image prompts with CLIP for richer, detailed, and high-quality image generation.

Z-Image Prompt Enhancer + CLIP:

The Z_ImagePromptEnhancerWithCLIP node is designed to enhance and refine image prompts using the CLIP model, which is a powerful tool for understanding and generating visual content. This node takes a user-provided prompt and enriches it with additional context and detail, making it more suitable for generating high-quality images. By leveraging the capabilities of CLIP, the node not only enhances the prompt but also encodes it into a format that can be directly used for image generation. This process helps in creating more vivid and accurate visual descriptions, ultimately leading to better image outputs. The node is particularly useful for AI artists who want to improve the quality of their image prompts without delving into complex technical details.

Z-Image Prompt Enhancer + CLIP Input Parameters:

clip

The clip parameter is a required input that specifies the CLIP model to be used for encoding the enhanced prompt. This model is crucial for understanding the semantic content of the prompt and transforming it into a format suitable for image generation. There are no specific minimum or maximum values for this parameter, as it is a model reference.

config

The config parameter is a required input that provides configuration settings for the prompt enhancement process. It dictates how the prompt should be processed and enhanced, influencing the final output's quality and detail. The exact configuration options depend on the implementation and are not specified in the context.

prompt

The prompt parameter is a required input that takes a string representing the initial image prompt provided by the user. This prompt serves as the starting point for enhancement and should describe the desired image content. The parameter supports multiline input, allowing for detailed descriptions, and has a default empty string value with a placeholder text "Enter your prompt to enhance...".

prompt_template

The prompt_template parameter is a required input that specifies the template to be used for enhancing the prompt. It offers options such as "auto," "chinese," "english," and "custom," with "chinese" as the default. This parameter helps tailor the enhancement process to different languages or custom requirements, ensuring the prompt is enhanced appropriately.

options

The options parameter is an optional input that allows for additional customization of the enhancement process. It accepts a dictionary of options that can modify various aspects of the prompt enhancement, although specific options are not detailed in the context.

image

The image parameter is an optional input that can be used to provide an image tensor for context during the prompt enhancement process. This can help in generating prompts that are more aligned with the visual content of the provided image. The parameter includes a tooltip for additional guidance.

retry_count

The retry_count parameter is an optional input that specifies the number of times the enhancement process should be retried in case of failure. It defaults to 3, allowing for multiple attempts to ensure a successful enhancement.

max_output_length

The max_output_length parameter is an optional input that sets the maximum length for the enhanced prompt output. It defaults to 6000 characters, ensuring that the output remains concise while providing sufficient detail.

session_id

The session_id parameter is an optional input that allows for session management during the enhancement process. It helps in tracking and managing multiple enhancement sessions, although specific details are not provided in the context.

reset_session

The reset_session parameter is an optional input that determines whether the current session should be reset before starting the enhancement process. It defaults to False, allowing for session continuity unless explicitly reset.

keep_model_loaded

The keep_model_loaded parameter is an optional input that specifies whether the CLIP model should remain loaded in memory after the enhancement process. It defaults to True, optimizing performance by avoiding repeated model loading.

utf8_sanitize

The utf8_sanitize parameter is an optional input that indicates whether the prompt should be sanitized for UTF-8 encoding. It defaults to False, but enabling it can help prevent encoding issues in certain scenarios.

custom_system_prompt

The custom_system_prompt parameter is an optional input that allows for a custom system prompt to be used during the enhancement process. This can provide additional context or guidance for the enhancement, although specific usage details are not provided in the context.

Z-Image Prompt Enhancer + CLIP Output Parameters:

conditioning

The conditioning output parameter provides the encoded representation of the enhanced prompt, ready for use in image generation. It includes both the tokenized prompt and pooled output from the CLIP model, ensuring that the prompt is accurately represented in a format suitable for further processing.

enhanced_prompt

The enhanced_prompt output parameter returns the final enhanced version of the input prompt. This enhanced prompt includes additional context and detail, making it more effective for generating high-quality images.

debug_log

The debug_log output parameter provides a detailed log of the enhancement process, including any debug information and steps taken during the enhancement. This can be useful for troubleshooting and understanding the enhancement process.

Z-Image Prompt Enhancer + CLIP Usage Tips:

  • To achieve the best results, provide a detailed and descriptive initial prompt. The more context you provide, the better the enhancement process can refine and improve the prompt.
  • Experiment with different prompt_template options to see which one best suits your needs. The "auto" option can be particularly useful if you're unsure which template to choose.

Z-Image Prompt Enhancer + CLIP Common Errors and Solutions:

ERROR: clip input is invalid: None

  • Explanation: This error occurs when the clip parameter is not provided or is invalid.
  • Solution: Ensure that a valid CLIP model is specified as the clip parameter. If using a checkpoint loader node, verify that the checkpoint contains a valid CLIP or text encoder model.

Z-Image Prompt Enhancer + CLIP Related Nodes

Go back to the extension to check out more related nodes.
Comfyui-Z-Image-Utilities
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.