This project allows you to adjust SDXL's two text encoder's strengths individually for clip_g (ViT-bigG) and clip_l (CLIP-ViT-L) within ComfyUI. (And other adjustments)
This project allows you to adjust SDXL's two text encoder's strengths individually for clip_g
(ViT-bigG) and clip_l
(CLIP-ViT-L) within ComfyUI. (And other adjustments)
clip_g
(global) and clip_l
(local) strengths for better text-to-image alignment.layer_idx
values. (ComfyUI usually just only supports negative values.) You can mix and match with + and - values on positive and negative prompt.Download ZIP and Extract:
/ComfyUI/custom_nodes/ComfyUI-MagicClip_Strength
Or Clone the Repository:
git clone https://github.com/311-code/ComfyUI-MagicClip_Strength
Find the Node:
SDXL
to find the node labeled:
311_code SDXL Clip Text Encode
No
requirements.txt
file is needed.
clip_g
and clip_l
strengths and positive and negative values, layer_idx, and size_cond_factor. (as shown in example image)Please note that using all positive layer_idx values for both the positive and negative prompts can be hit or miss. For example, here is the default ComfyUI purple galaxy glass bottle prompt with values +8 for pos/neg prompts. I recommend either mixing positive and negative values or using only negative values for better prompt adherence. <img src="https://github.com/311-code/ComfyUI-MagicClip_Strength/blob/main/comfy_default_w_dual_positive_layer_idx.png?raw=true" alt="Dual + layer_idx" width="75%">
Creating and maintaining this project takes time and effort. If you find it helpful, consider supporting me:
<p align="center"> <a href="https://ko-fi.com/311_code" target="_blank"><img src="https://img.shields.io/badge/Support%20Me-Ko--Fi-red?style=for-the-badge&logo=ko-fi&logoColor=white" alt="Support me on Ko-Fi"></a> </p>Contributions are welcome! If you have any ideas, suggestions, or bug reports, please feel free to open an issue or submit a pull request.
This project is licensed under the Apache License - see the LICENSE file for details.