1k hints :)

Signed-off-by: Vladimir Mandic <[email protected]>
This commit is contained in:
Vladimir Mandic
2026-09-29 19:04:23 +02:00
parent bb30be88aa
commit e2ad659de6
6 changed files with 2127 additions and 1726 deletions
+35 -7
View File
@@ -16,6 +16,7 @@ Scan UI definitions and components in `modules/ui*.py`, `scripts/*.py`, and buil
- Reviewing UI hints for factual accuracy against current backend/pipeline implementations.
- Identifying and reporting incorrect hints without making automated destructive changes.
- Checking for labels exceeding the 63-character limit or broken `<b><i>...</i></b>` cross-references.
- Checking for very long hints (e.g. `len(hint) > 500` characters) that may benefit from condensing.
- Preparing an audit report of hint status across the codebase.
## Guidance
@@ -32,6 +33,13 @@ Scan UI definitions and components in `modules/ui*.py`, `scripts/*.py`, and buil
- `extensions-builtin/**/*.py`: Built-in extension UI elements.
- `test/validate-locale.py`: Validation script for checking duplicate labels, missing hints, long labels, and formatting.
## Priority Ordering
When identifying and drafting missing hints, prioritize the following sources:
- **High-Priority Items**: UI controls from `modules/ui_control.py` (and `modules/ui_control_*.py`), `modules/ui_video.py` (and sub-modules in `modules/video_models/` and `modules/minimax/`), `modules/ui_postprocessing.py`, and `modules/ui_caption.py`, including all nested UI controls instantiated via helper functions (e.g. `ui_sections.py`, `ui_guidance.py`, `ui_common.py`, `masking.py`, `create_ui_outputs()`, etc.).
- **Medium-Priority Items**: All settings defined in `modules/ui_definitions.py` (`options_templates` OptionInfo definitions).
- **Lower-Priority Items**: Script UI definitions in `scripts/*.py`, built-in extension elements in `extensions-builtin/`, model management tabs, and sub-level interface controls.
## Typography and Formatting Rules
Hint strings render as HTML. Use only the following tags:
@@ -45,7 +53,7 @@ Hint strings render as HTML. Use only the following tags:
### Content Guidelines
- **Concise & Direct**: Keep hints short and focused. Describe the exact argument or function of the control without filler words (avoid phrases like "This button allows you to...").
- **Concise & Direct**: Keep hints short and focused (typically under 500 characters). Describe the exact argument or function of the control without filler words (avoid phrases like "This button allows you to...").
- **Recommended Values**: If there is a specific recommended value or range for a given use-case (e.g. recommended CFG scale for specific architectures or recommended step counts), add it briefly, but only if necessary.
- **Unified Tab Reference**: Always refer to the primary generation tab as `<b><i>Images</i></b>` (the ModernUI label). Never write "Control tab".
- **Structure**:
@@ -53,7 +61,7 @@ Hint strings render as HTML. Use only the following tags:
- Use `<br><br>` for paragraph breaks.
- Use `<br>- <b>key</b>: description` for short keyed bullet lists (e.g. dropdown options or mode descriptions).
- Do not use `<ul>`, `<li>`, Markdown asterisks, or unicode bullet characters.
- **ASCII Only**: Keep all text ASCII; avoid unicode quotes, em-dashes, or special symbols.
- **ASCII & PUA Glyphs**: Keep all prose text and descriptions ASCII (avoid unicode curly quotes, em-dashes, or special symbols like →). Non-ASCII Unicode Private Use Area (PUA) icon glyphs (e.g. Nerd Font icons such as `\uf06e`, `\uf0eb`, ``, ``, `⟲`, `🎲️`, `📐`, `※`, `` used for UI controls, badges, and labels) are valid and must not be flagged as incorrect.
## Core Rules
@@ -63,13 +71,16 @@ Hint strings render as HTML. Use only the following tags:
4. **Incorrect Hints Handling (No Auto-Update)**: If an existing hint is found to be incorrect (e.g. misleading description, wrong default, invalid choice options, broken cross-references, or mismatched control functionality), **DO NOT update it automatically**. Instead, record the issue in the report with the current text, the reason it is incorrect, and a recommended fix for manual review.
5. **Label Length Constraint**: Flag any UI label exceeding 63 characters (`len(label) > 63`) to prevent layout and localization breaks.
6. **Cross-Reference Integrity**: Verify that any `<b><i>Label</i></b>` cross-reference refers to an actual, verbatim visible label present in `locale_en.json`. Flag broken or obsolete cross-references.
7. **Symbol and Tool Button Placement**: Buttons with icon/symbol labels (e.g. `⟲`, `🎲️`, `📐`, `※`, ``) or empty labels identified by `elem_id` belong in the `"_"` section of `locale_en.json`.
8. **Final Report**: Always produce a final structured report containing:
7. **Long Hint Identification**: Flag hints exceeding 500 characters (`len(hint) > 500`) in the audit report to identify overly verbose or complex tooltips that may benefit from streamlining.
8. **Symbol and Tool Button Placement**: Buttons with icon/symbol labels (e.g. `⟲`, `🎲️`, `📐`, `※`, ``) or empty labels identified by `elem_id` belong in the `"_"` section of `locale_en.json`.
9. **Single-Line JSON Record Formatting**: Each entry record in `ui/locale/locale_en.json` MUST be formatted on a single line (e.g. ` {"id": "...", "label": "...", "localized": "", "hint": "..."}`). Do not break individual JSON entry objects across multiple lines.
10. **Final Report**: Always write the complete structured audit report to `tmp/HINTS.md` at the end of the run and output it in the response, containing:
- Added hints
- Updated hints
- Duplicate hints
- Incorrect hints (with proposed fixes)
- Stale / Unmatched locale entries (in `locale_en.json` but not found in code)
- Long hints (>500 characters)
- Flagged items (long labels, broken cross-references)
## Procedure
@@ -79,6 +90,7 @@ Hint strings render as HTML. Use only the following tags:
Extract all UI controls and settings definitions:
- **`modules/ui_definitions.py`**: Inspect `OptionInfo` entries, note setting keys, labels, component types (`gr.Slider`, `gr.Checkbox`, `gr.Dropdown`, `gr.Radio`, etc.), default values, and choice lists.
- **`modules/ui_*.py` & `scripts/*.py`**: Scan for Gradio components (`gr.Slider`, `gr.Checkbox`, `gr.Dropdown`, `gr.Radio`, `gr.Textbox`, `gr.Button`, `gr.Accordion`, `gr.Tab`, `ToolButton`, etc.) with `label="..."`, `value="..."`, or `elem_id="..."`.
- **Nested UI & Helper Scanning**: When scanning high-priority UI modules, extraction must account for nested builder calls and helper function invocations (such as helper functions in `modules/ui_sections.py`, `modules/ui_guidance.py`, `modules/ui_common.py`, `modules/masking.py`, and sub-module builders like `create_ui_outputs()`, `minimax_ui.create_ui()`, etc.) that instantiate Gradio components on behalf of the parent tab or interface.
- Understand the context and purpose of each control by checking how the parameter is used in execution or pipeline processing.
- For helper extraction scripts, write them to `tmp/` (e.g. `tmp/scan_ui_hints.py`).
@@ -104,7 +116,9 @@ Read `ui/locale/locale_en.json` and perform the audit checks:
- Formatting/HTML errors (e.g. malformed tags, unclosed brackets).
5. **Long Labels**:
- Check for any label whose length exceeds 63 characters.
6. **Valid Existing Updates**:
6. **Long Hints**:
- Check for hints whose length exceeds 500 characters (`len(hint) > 500`) to highlight verbose tooltips.
7. **Valid Existing Updates**:
- Check if existing hints only need supplementary recommended values for specific models/use cases.
### 3. Draft & Apply Safe Updates
@@ -114,10 +128,21 @@ Read `ui/locale/locale_en.json` and perform the audit checks:
- Add optional recommended values if necessary for specific use cases.
- Place icon/symbol buttons into section `"_"` with their `elem_id`.
- Place standard text labels into their alphabetical section (`"0"`, `"a"`-`"z"`, or `"reference"`).
- Schema:
- Schema (MUST be on a single line per record):
```json
{"id": "optional_elem_id", "label": "Label Text", "localized": "", "hint": "Concise hint description..."}
```
- **JSON Formatting Rule**:
- Each object in a section array must be formatted on a single line without newlines breaking the object properties.
- Ensure standard JSON structure:
```json
{
"a": [
{"id": "...", "label": "...", "localized": "", "hint": "..."},
{"id": "...", "label": "...", "localized": "", "hint": "..."}
]
}
```
- **For Incorrect Hints**:
- **Do NOT modify or overwrite automatically in `locale_en.json`**.
- Document the finding, rationale, and suggested replacement for the report.
@@ -139,7 +164,7 @@ Read `ui/locale/locale_en.json` and perform the audit checks:
### 5. Prepare Audit Report
At the end of the execution, output a structured markdown report categorized as follows:
At the end of the execution, always write the full structured markdown report to `tmp/HINTS.md` and output it in the response, categorized as follows:
```markdown
## UI Hints Audit Report
@@ -162,6 +187,9 @@ At the end of the execution, output a structured markdown report categorized as
### Stale / Unmatched Locale Entries (In locale_en.json but not found in code)
- **`Label Name`** (`section`): `Current hint` — not found in active code (may have been renamed or removed)
### Long Hints (>500 characters)
- **`Label Name`** (`section`, length: XXX): `Hint text summary`
### Flagged Items (Long Labels / Broken Cross-References)
- **Long Label**: `Label Name` (length: XX > 63)
- **Broken Cross-Reference**: `Label Name` references `<b><i>Target</i></b>` which does not exist in `locale_en.json`
+7 -2
View File
@@ -9,6 +9,7 @@
- **DLSS5** reimagined for much higher performance and full cross-platform support
- New live-preview method using **MicroDecoder**
- Better handling of multi-image reference editing
- Massive updates to UI tooltips/hints: over 1,000 new entries and revised existing ones
Plus quite a few other improvements and inevitable bug-fixes, see full changelog below for details...
@@ -56,8 +57,12 @@ Plus quite a few other improvements and inevitable bug-fixes, see full changelog
automatically handle: flux.2, glm-image, nano-banana, joy-image-edit, qwen-image-edit
- processors: `DWPose`, `RTMW`, `RTMO`: image processor updates, thanks @kirtasshh
refactored to use `ONNX` instead of obsolete `mmpose` lib and with additional configurable settings
- ui: manual clear of errors/warnings, thanks @kirtasshh
- ui: selecting lora from networks panel inserts it in active prompt instead of just default, thanks @kirtasshh
- **UI**
- massive improvement to built-in tooltips/hints
over 1,000 new entries, now at zero missing ui controls or settings
revised existing ones
- manual clear of errors/warnings, thanks @kirtasshh
- selecting lora from networks panel inserts it in active prompt instead of just default, thanks @kirtasshh
- **Fixes**
- api: control endpoint with input images
- api: hardening all all file-access api endpoints
+1 -1
View File
@@ -583,7 +583,7 @@ def check_diffusers():
t_start = time.time()
if args.skip_all:
return
target_commit = "51a454be9a43854939d2ef2d231565f46a41e366" # diffusers commit hash == 0.41.0.dev0 == 09-28-2026
target_commit = "fef717ffb01f407d2637584ed936c16db908587a" # diffusers commit hash == 0.41.0.dev0 == 09-29-2026
# if args.use_rocm or args.use_zluda:
# sha = '043ab2520f6a19fce78e6e060a68dbc947edb9f9' # lock diffusers versions for now
pkg = package_spec('diffusers')
+1 -1
View File
@@ -25,7 +25,7 @@ fastapi==0.124.4
uvicorn==0.52.4
rich==15.0.0
safetensors==0.8.0
peft==0.21.0
peft==0.21.1
httpx==0.28.1
requests==2.34.2
tqdm==4.70.1
+2082 -1714
View File
File diff suppressed because it is too large Load Diff