Example scripts for using [my] fine-tuned CLIP models with HuggingFace 🤗
Python
14
4 commits
updated Sep 24, 2024
CLIP-L_and_LongCLIP-TE-Flux.pyUse OpenAI/CLIP-L vs. My CLIP-L and beichenzbc/Long-CLIP vs. My Long-CLIP
⚠️ EXAMPLE SCRIPT: 'How to use CLIP' with Flux.1. Not optimized.
⚠️ Insert your own optimal Flux Pipeline / config for best performance!
✨ Pro TIP 👀 (especially [short] CLIP-L)! Hide the text-for-in-image from CLIP. If prompt 'some text here':
Long my prompt yadda [...] long yadda | Truncate due to >77 tokens | token 78++ is: holding a sign that says 'some lengthy text'
Or my normal prompt | PAD, PAD, PAD, PAD | token 78++ is: holding a sign that says 'some lengthy text'
Result: Better image due to better CLIP-L guidance. Better TEXT in image due to hiding that part of the prompt from CLIP!
4 commits
Python
100.0%
Example scripts for using [my] fine-tuned CLIP models with HuggingFace 🤗
Python
14
4 commits
updated Sep 24, 2024
CLIP-L_and_LongCLIP-TE-Flux.pyUse OpenAI/CLIP-L vs. My CLIP-L and beichenzbc/Long-CLIP vs. My Long-CLIP
⚠️ EXAMPLE SCRIPT: 'How to use CLIP' with Flux.1. Not optimized.
⚠️ Insert your own optimal Flux Pipeline / config for best performance!
✨ Pro TIP 👀 (especially [short] CLIP-L)! Hide the text-for-in-image from CLIP. If prompt 'some text here':
Long my prompt yadda [...] long yadda | Truncate due to >77 tokens | token 78++ is: holding a sign that says 'some lengthy text'
Or my normal prompt | PAD, PAD, PAD, PAD | token 78++ is: holding a sign that says 'some lengthy text'
Result: Better image due to better CLIP-L guidance. Better TEXT in image due to hiding that part of the prompt from CLIP!
4 commits
Python
100.0%