Apply Krea2 NegPiP:
The ApplyKrea2NegPiP node is designed to enhance the capabilities of the ComfyUI framework by integrating the Krea2 NegPiP functionality. This node primarily focuses on enabling negative prompt weights and managing sidecar tokens within the CLIP/Qwen3-VL model, which is crucial for advanced text-to-image generation tasks. By patching the Krea2 block and wavelet vector forwards, it ensures that the diffusion process is optimized for handling negative prompts, which can be particularly useful for refining image generation outputs. The node also supports the vectorization and caching of negative token V-flips, making it efficient for repeated calls and device-specific operations. Overall, ApplyKrea2NegPiP provides a sophisticated mechanism to manipulate and enhance the text encoding process, allowing for more nuanced and controlled image generation.
Apply Krea2 NegPiP Input Parameters:
model
This parameter represents the model to which the Krea2 NegPiP functionality will be applied. It is crucial for ensuring that the model is compatible with the Krea2 framework and can handle the advanced text encoding and diffusion processes required for negative prompt integration.
clip
The clip parameter is the CLIP model instance that will be patched to support Krea2 NegPiP. This involves cloning and modifying the tokenizer and conditional stage model to enable negative prompt weights and sidecar token management. The patched CLIP model is essential for the node's operation, as it facilitates the advanced text encoding capabilities needed for the task.
value_strength
This parameter controls the strength of the value adjustments applied during the Krea2 NegPiP process. It influences how strongly the negative prompts affect the final output. The value ranges from 0.0 to 8.0, with a default of 1.0, allowing users to fine-tune the impact of negative prompts on the image generation process.
patch_txtfusion_refiners
A boolean parameter that determines whether the text fusion refiners should be patched. When set to True, it enables additional refinements in the text encoding process, potentially improving the quality and coherence of the generated images. The default value is False.
block_start
This integer parameter specifies the starting block for the Krea2 NegPiP process. It defines the initial point in the model's architecture where the patching and adjustments begin. The value ranges from 0 to 999, with a default of 0, allowing users to target specific sections of the model for optimization.
block_end
Similar to block_start, this parameter defines the ending block for the Krea2 NegPiP process. It marks the final point in the model's architecture where the patching and adjustments are applied. The value ranges from 0 to 999, with a default of 27, providing flexibility in determining the scope of the process.
block_stride
This parameter controls the stride or step size between blocks during the Krea2 NegPiP process. It determines how frequently the patching and adjustments are applied across the model's architecture. The value ranges from 1 to 16, with a default of 1, allowing users to balance between thoroughness and computational efficiency.
Apply Krea2 NegPiP Output Parameters:
new_clip
The new_clip output is the patched version of the original CLIP model, modified to support Krea2 NegPiP functionality. It includes changes to the tokenizer and conditional stage model, enabling advanced text encoding capabilities such as negative prompt weights and sidecar token management. This output is crucial for ensuring that the model can effectively handle the enhanced text-to-image generation tasks.
patched
The patched output is the modified version of the input model, incorporating the Krea2 NegPiP adjustments. It includes updates to the model's options and architecture, allowing it to process negative prompts and manage sidecar tokens effectively. This output is essential for achieving the desired enhancements in image generation quality and control.
Apply Krea2 NegPiP Usage Tips:
- Ensure that the input model and CLIP instance are compatible with the Krea2 framework to avoid runtime errors.
- Experiment with the
value_strengthparameter to find the optimal balance between negative prompt influence and image quality. - Use the
block_startandblock_endparameters to target specific sections of the model for optimization, especially if you are familiar with the model's architecture.
Apply Krea2 NegPiP Common Errors and Solutions:
"Krea2 NegPiP requires CLIPLoader type='krea2'."
- Explanation: This error occurs when the provided CLIP model is not compatible with the Krea2 framework.
- Solution: Ensure that the CLIP model is of type 'krea2' and supports the necessary text encoding capabilities.
"Krea2 NegPiP conditioning was connected to a non-Krea2 diffusion model."
- Explanation: This error indicates that the model being used does not support the Krea2 NegPiP functionality.
- Solution: Verify that the model is compatible with Krea2 and supports the required diffusion processes for negative prompt integration.
