Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Visual indicator of where a prompt is split for CLIP #451

Open
bWm-nubby opened this issue Dec 1, 2024 · 0 comments
Open

Feature: Visual indicator of where a prompt is split for CLIP #451

bWm-nubby opened this issue Dec 1, 2024 · 0 comments
Labels
Feature New feature or request Frontend This pertains to the frontend UI (HTML/CSS/JS)

Comments

@bWm-nubby
Copy link

bWm-nubby commented Dec 1, 2024

Feature Idea

My idea is to add a visual indicator to show where a prompt will be split for CLIP processing. Normally, this occurs every 75 tokens afaik but sometimes that can cause a single tag, or sentence for natural language to be separated into different batches which results in different results than intended. For example in a prompt where "red hair" occupies tokens 75 and 76, the split occurs between the two words meaning the first batch has "red" and the second batch has "hair" which means you likely won't get the red hair that you wanted. Adding a "<break>" before "red" will of course solve this problem, but it is difficult to know where the prompt is being split unless you are typing the prompt from scratch and watching the token counter while you do so. When copy/pasting a prompt or editing an existing prompt that is longer than 75 tokens the user currently has to guess where the prompt is being split.

Other

The first thought I had was to use alternating text colors for each batch but then I realized that could potentially create accessibility issues for people with different types of color blindness so adding the ability to customize the colors used outside of editing a theme may be needed if this approach is taken. My next thought was to display a character or two that wouldn't normally be used in a prompt at the breakpoint such as "||", of course this would be a visual indicator only and not actually included in the text. Either way there should probably also be an option to toggle the feature on/off for users who don't want it.

@bWm-nubby bWm-nubby added the Feature New feature or request label Dec 1, 2024
@mcmonkey4eva mcmonkey4eva added the Frontend This pertains to the frontend UI (HTML/CSS/JS) label Dec 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature or request Frontend This pertains to the frontend UI (HTML/CSS/JS)
Projects
None yet
Development

No branches or pull requests

2 participants