regen all localizations

Signed-off-by: vladmandic <mandic00@live.com>
pull/4716/head
vladmandic 2026-04-01 10:29:08 +02:00
parent 75cc035354
commit 1310264d43
35 changed files with 103207 additions and 97599 deletions

View File

@ -1,17 +1,19 @@
# Change Log for SD.Next # Change Log for SD.Next
## Update for 2026-03-30 ## Update for 2026-04-01
### Highlights for 2026-03-30 ### Highlights for 2026-04-01
This release brings massive code refactoring to modernize codebase and removal of some obsolete features. Leaner & Faster! This release brings massive code refactoring to modernize codebase and removal of some obsolete features. Leaner & Faster!
And since its a bit quieter period when it comes to new models, notable additions would be : *FireRed-Image-Edit*, *SkyWorks-UniPic-3* and new versions of *Anima-Preview*, *Flux-Klein-KV* image models and *LTX 2.3* video model And since its a bit quieter period when it comes to new models, notable additions would be : *FireRed-Image-Edit*, *SkyWorks-UniPic-3* and new versions of *Anima-Preview*, *Flux-Klein-KV* image models and *LTX 2.3* video model
If you're on Windows platform, we have a brand new [All-in-one Installer & Launcher](https://github.com/vladmandic/sdnext-launcher): simply download [exe or zip](https://github.com/vladmandic/sdnext-launcher/releases) and done! If you're on Windows platform, we have a brand new [All-in-one Installer & Launcher](https://github.com/vladmandic/sdnext-launcher): simply download [exe or zip](https://github.com/vladmandic/sdnext-launcher/releases) and done!
And we have a new (optional) React-based **UI** [Enso](https://github.com/CalamitousFelicitousness/enso)!
*What else*? Really a lot! *What else*? Really a lot!
New color grading module, updated localization with new languages and improved translations, new civitai integration module, new finetunes loader, several new upscalers, improvements to LLM/VLM in captioning and prompt enhance, a lot of new control preprocessors, new realtime server info panel, some new UI themes New color grading module, updated localization with new languages and improved translations, new CivitAI integration module, new finetunes loader, several new upscalers, improvements to LLM/VLM in captioning and prompt enhance, a lot of new control preprocessors, new realtime server info panel, some new UI themes
And major work on API hardening: security, rate limits, secrets handling, new endpoints, etc. And major work on API hardening: *security, rate limits, secrets handling, new endpoints*, etc.
But also many smaller quality-of-life improvements - for full details, see [ChangeLog](https://github.com/vladmandic/automatic/blob/master/CHANGELOG.md) But also many smaller quality-of-life improvements - for full details, see [ChangeLog](https://github.com/vladmandic/automatic/blob/master/CHANGELOG.md)
*Note*: Purely due to size of changes, clean install is recommended! *Note*: Purely due to size of changes, clean install is recommended!
@ -19,7 +21,7 @@ Just how big? Some stats: *~530 commits over 880 files*
[ReadMe](https://github.com/vladmandic/automatic/blob/master/README.md) | [ChangeLog](https://github.com/vladmandic/automatic/blob/master/CHANGELOG.md) | [Docs](https://vladmandic.github.io/sdnext-docs/) | [WiKi](https://github.com/vladmandic/automatic/wiki) | [Discord](https://discord.com/invite/sd-next-federal-batch-inspectors-1101998836328697867) | [Sponsor](https://github.com/sponsors/vladmandic) [ReadMe](https://github.com/vladmandic/automatic/blob/master/README.md) | [ChangeLog](https://github.com/vladmandic/automatic/blob/master/CHANGELOG.md) | [Docs](https://vladmandic.github.io/sdnext-docs/) | [WiKi](https://github.com/vladmandic/automatic/wiki) | [Discord](https://discord.com/invite/sd-next-federal-batch-inspectors-1101998836328697867) | [Sponsor](https://github.com/sponsors/vladmandic)
### Details for 2026-03-30 ### Details for 2026-04-01
- **Models** - **Models**
- [Google Flash 3.1 Image](https://ai.google.dev/gemini-api/docs/models/gemini-3-flash-preview) a.k.a. *Nano Banana 2* - [Google Flash 3.1 Image](https://ai.google.dev/gemini-api/docs/models/gemini-3-flash-preview) a.k.a. *Nano Banana 2*
@ -83,10 +85,11 @@ Just how big? Some stats: *~530 commits over 880 files*
> `set TORCH_COMMAND='torch torchvision --index-url https://download.pytorch.org/whl/cu128` > `set TORCH_COMMAND='torch torchvision --index-url https://download.pytorch.org/whl/cu128`
- update installer and support `nunchaku==1.2.1` - update installer and support `nunchaku==1.2.1`
- **UI** - **UI**
- **Enso** new React-based UI with WYSIWYG infinite canvas workspace, command palette, and numerous quality of life improvements across the board *(work-in-progress alpha)*. - **Enso** new React-based UI, developed by @CalamitousFelicitousness!
enable using `--enso` flag, and use on `/enso` endpoint. with WYSIWYG infinite canvas workspace, command palette, and numerous quality of life improvements across the board
**Separate installation of SD.Next recommended** enable using `--enso` flag and access using `/enso` endpoint (e.g. <http://localhost:7860/enso>)
see wiki page and Enso repo README for details. see [Enso Docs](https://vladmandic.github.io/sdnext-docs/Enso/) and [Enso Home](https://github.com/CalamitousFelicitousness/enso) for details
*note* Enso is work-in-progress and alpha-ready
- legacy panels **T2I** and **I2I** are disabled by default - legacy panels **T2I** and **I2I** are disabled by default
you can re-enable them in *settings -> ui -> hide legacy tabs* you can re-enable them in *settings -> ui -> hide legacy tabs*
- new panel: **Server Info** with detailed runtime informaton - new panel: **Server Info** with detailed runtime informaton
@ -109,15 +112,17 @@ Just how big? Some stats: *~530 commits over 880 files*
- updates to core sections: *Installation, Python, Schedulers, Launcher, SDNQ, Video* - updates to core sections: *Installation, Python, Schedulers, Launcher, SDNQ, Video*
- added Enso page - added Enso page
- **API** - **API**
- new **v2 API** (`/sdapi/v2/`): job-based generation with queue, per-job WebSocket progress, file uploads with TTL, model/network enumeration, and a plethora of other improvements *(work-in-progress)* - prototype **v2 API** (`/sdapi/v2/`)
for the time being ships with Enso, which must be enabled wih `--enso` flag on startup for v2 API to be available. job-based generation with queue, per-job WebSocket progress, file uploads with TTL, model/network enumeration
and a plethora of other improvements *(work-in-progress)*
for the time being ships with Enso, which must be enabled wih `--enso` flag on startup for v2 API to be available
- **rate limiting**: global for all endpoints, guards against abuse and denial-of-service type of attacks - **rate limiting**: global for all endpoints, guards against abuse and denial-of-service type of attacks
configurable in *settings -> server settings* configurable in *settings -> server settings*
- new `/sdapi/v1/upload` endpoint with support for both POST with form-data or PUT using raw-bytes - new `/sdapi/v1/upload` endpoint with support for both POST with form-data or PUT using raw-bytes
- new `/sdapi/v1/torch` endpoint for torch info (backend, version, etc.) - new `/sdapi/v1/torch` endpoint for torch info (backend, version, etc.)
- new `/sdapi/v1/gpu` endpoint for GPU info - new `/sdapi/v1/gpu` endpoint for GPU info
- new `/sdapi/v1/rembg` endpoint for background removal - new `/sdapi/v1/rembg` endpoint for background removal
- new `/sdadpi/v1/unet` endpoint to list available unets/dits - new `/sdapi/v1/unet` endpoint to list available unets/dits
- use rate limiting for api logging - use rate limiting for api logging
- **Obsoleted** - **Obsoleted**
- removed support for additional quantization engines: *BitsAndBytes, TorchAO, Optimum-Quanto, NNCF* - removed support for additional quantization engines: *BitsAndBytes, TorchAO, Optimum-Quanto, NNCF*

47
TODO.md
View File

@ -1,12 +1,5 @@
# TODO # TODO
## Release
- Add notes: **Enso**
- Tips: **Color Grading**
- Regen: **Localization**
- Rebuild: **Launcher** with `master`
## Internal ## Internal
- Feature: implement `unload_auxiliary_models` - Feature: implement `unload_auxiliary_models`
@ -131,21 +124,25 @@ TODO: Investigate which models are diffusers-compatible and prioritize!
> npm run todo > npm run todo
- fc: autodetect distilled based on model ```code
- fc: autodetect tensor format based on model installer.py:TODO rocm: switch to pytorch source when it becomes available
- hypertile: vae breaks when using non-standard sizes modules/control/run.py:TODO modernui: monkey-patch for missing tabs.select event
- install: switch to pytorch source when it becomes available modules/history.py:TODO: apply metadata, preview, load/save
- loader: load receipe modules/image/resize.py:TODO resize image: enable full VAE mode for resize-latent
- loader: save receipe modules/lora/lora_apply.py:TODO lora: add other quantization types
- lora: add other quantization types modules/lora/lora_apply.py:TODO lora: maybe force imediate quantization
- lora: add t5 key support for sd35/f1 modules/lora/lora_extract.py:TODO: lora: support pre-quantized flux
- lora: maybe force imediate quantization modules/lora/lora_load.py:TODO lora: add t5 key support for sd35/f1
- model load: force-reloading entire model as loading transformers only leads to massive memory usage modules/masking.py:TODO: additional masking algorithms
- model load: implement model in-memory caching modules/modular_guiders.py:TODO: guiders
- modernui: monkey-patch for missing tabs.select event modules/processing_class.py:TODO processing: remove duplicate mask params
- modules/lora/lora_extract.py:188:9: W0511: TODO: lora: support pre-quantized flux modules/sd_hijack_hypertile.py:TODO hypertile: vae breaks when using non-standard sizes
- modules/modular_guiders.py:65:58: W0511: TODO: guiders modules/sd_models.py:TODO model load: implement model in-memory caching
- processing: remove duplicate mask params modules/sd_samplers_diffusers.py:TODO enso-required
- resize image: enable full VAE mode for resize-latent modules/sd_unet.py:TODO model load: force-reloading entire model as loading transformers only leads to massive memory usage
modules/transformer_cache.py:TODO fc: autodetect distilled based on model
modules/sd_samplers_diffusers.py:353:31: W0511: TODO enso-required (fixme) modules/transformer_cache.py:TODO fc: autodetect tensor format based on model
modules/ui_models_load.py:TODO loader: load receipe
modules/ui_models_load.py:TODO loader: save receipe
modules/video_models/video_save.py:TODO audio set time-base
```

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -78,7 +78,7 @@ const anyPromptExists = () => gradioApp().querySelectorAll('.main-prompts').leng
function scheduleAfterUiUpdateCallbacks() { function scheduleAfterUiUpdateCallbacks() {
clearTimeout(uiAfterUpdateTimeout); clearTimeout(uiAfterUpdateTimeout);
uiAfterUpdateTimeout = setTimeout(() => executeCallbacks(uiAfterUpdateCallbacks, 500)); uiAfterUpdateTimeout = setTimeout(() => executeCallbacks(uiAfterUpdateCallbacks), 250);
} }
let executedOnLoaded = false; let executedOnLoaded = false;

View File

@ -205,7 +205,6 @@ def batch(
Returns: Returns:
Combined tag results Combined tag results
""" """
import os
import time import time
from pathlib import Path from pathlib import Path
import rich.progress as rp import rich.progress as rp

View File

@ -12,7 +12,7 @@ class GoogleGeminiPipeline():
self.model = model_name.split(' (')[0] self.model = model_name.split(' (')[0]
from installer import install from installer import install
install('google-genai==1.52.0') install('google-genai==1.52.0')
from google import genai from google import genai # pylint: disable=no-name-in-module
args = self.get_args() args = self.get_args()
self.client = genai.Client(**args) self.client = genai.Client(**args)
log.debug(f'Load model: type=GoogleGemini model="{self.model}"') log.debug(f'Load model: type=GoogleGemini model="{self.model}"')
@ -54,7 +54,7 @@ class GoogleGeminiPipeline():
return args return args
def __call__(self, question, image, model, instructions, prefill, thinking, kwargs): def __call__(self, question, image, model, instructions, prefill, thinking, kwargs):
from google.genai import types from google.genai import types # pylint: disable=no-name-in-module
config = { config = {
'system_instruction': instructions or shared.opts.caption_vlm_system, 'system_instruction': instructions or shared.opts.caption_vlm_system,
'thinking_config': types.ThinkingConfig(thinking_level="high" if thinking else "low") 'thinking_config': types.ThinkingConfig(thinking_level="high" if thinking else "low")

View File

@ -419,7 +419,6 @@ def batch(
Returns: Returns:
Combined tag results Combined tag results
""" """
import os
from pathlib import Path from pathlib import Path
# Load model # Load model

View File

@ -14,7 +14,6 @@ exclude = [
".git", ".git",
".ruff_cache", ".ruff_cache",
".vscode", ".vscode",
"modules/cfgzero", "modules/cfgzero",
"modules/flash_attn_triton_amd", "modules/flash_attn_triton_amd",
"modules/hidiffusion", "modules/hidiffusion",
@ -24,19 +23,16 @@ exclude = [
"modules/teacache", "modules/teacache",
"modules/seedvr", "modules/seedvr",
"modules/sharpfin", "modules/sharpfin",
"modules/control/proc", "modules/control/proc",
"modules/control/units", "modules/control/units",
"modules/control/units/xs_pipe.py", "modules/control/units/xs_pipe.py",
"modules/postprocess/aurasr_arch.py", "modules/postprocess/aurasr_arch.py",
"pipelines/meissonic", "pipelines/meissonic",
"pipelines/omnigen2", "pipelines/omnigen2",
"pipelines/hdm", "pipelines/hdm",
"pipelines/segmoe", "pipelines/segmoe",
"pipelines/xomni", "pipelines/xomni",
"pipelines/chrono", "pipelines/chrono",
"scripts/lbm", "scripts/lbm",
"scripts/daam", "scripts/daam",
"scripts/xadapter", "scripts/xadapter",
@ -44,9 +40,6 @@ exclude = [
"scripts/instantir", "scripts/instantir",
"scripts/freescale", "scripts/freescale",
"scripts/consistory", "scripts/consistory",
"repositories",
"extensions-builtin/Lora", "extensions-builtin/Lora",
"extensions-builtin/sd-extension-chainner/nodes", "extensions-builtin/sd-extension-chainner/nodes",
"extensions-builtin/sd-webui-agent-scheduler", "extensions-builtin/sd-webui-agent-scheduler",
@ -55,53 +48,53 @@ exclude = [
[tool.ruff.lint] [tool.ruff.lint]
select = [ select = [
"F", "F",
"E", "E",
"W", "W",
"C", "C",
"B", "B",
"I", "I",
"YTT", "YTT",
"ASYNC", "ASYNC",
"RUF", "RUF",
"AIR", "AIR",
"NPY", "NPY",
"C4", "C4",
"T10", "T10",
"EXE", "EXE",
"ISC", "ISC",
"ICN", "ICN",
"RSE", "RSE",
"TC", "TC",
"TID", "TID",
"INT", "INT",
"PLE", "PLE",
] ]
ignore = [ ignore = [
"B006", # Do not use mutable data structures for argument defaults "ASYNC240", # Async functions should not use os.path methods
"B008", # Do not perform function call in argument defaults "B006", # Do not use mutable data structures for argument defaults
"B905", # Strict zip() usage "B008", # Do not perform function call in argument defaults
"ASYNC240", # Async functions should not use os.path methods "B905", # Strict zip() usage
"C420", # Unnecessary dict comprehension for iterable; use `dict.fromkeys` instead "C408", # Unnecessary `dict` call
"C408", # Unnecessary `dict` call "C420", # Unnecessary dict comprehension for iterable; use `dict.fromkeys` instead
"I001", # Import block is un-sorted or un-formatted "E402", # Module level import not at top of file
"E402", # Module level import not at top of file "E501", # Line too long
"E501", # Line too long "E721", # Do not compare types, use `isinstance()`
"E721", # Do not compare types, use `isinstance()` "E731", # Do not assign a `lambda` expression, use a `def`
"E731", # Do not assign a `lambda` expression, use a `def` "E741", # Ambiguous variable name
"E741", # Ambiguous variable name "EXE001", # file with shebang is not marked executable
"F401", # Imported by unused "F401", # Imported by unused
"EXE001", # file with shebang is not marked executable "I001", # Import block is un-sorted or un-formatted
"NPY002", # replace legacy random "NPY002", # replace legacy random
"RUF005", # Consider iterable unpacking "RUF005", # Consider iterable unpacking
"RUF008", # Do not use mutable default values for dataclass "RUF008", # Do not use mutable default values for dataclass
"RUF010", # Use explicit conversion flag "RUF010", # Use explicit conversion flag
"RUF012", # Mutable class attributes "RUF012", # Mutable class attributes
"RUF015", # Prefer `next(...)` over single element slice "RUF015", # Prefer `next(...)` over single element slice
"RUF022", # All is not sorted "RUF022", # All is not sorted
"RUF046", # Value being cast to `int` is already an integer "RUF046", # Value being cast to `int` is already an integer
"RUF059", # Unpacked variables are not used "RUF051", # Prefer pop over del
"RUF051", # Prefer pop over del "RUF059", # Unpacked variables are not used
] ]
fixable = ["ALL"] fixable = ["ALL"]
unfixable = [] unfixable = []
@ -131,73 +124,75 @@ main.fail-on=""
main.fail-under=10 main.fail-under=10
main.ignore="CVS" main.ignore="CVS"
main.ignore-paths=[ main.ignore-paths=[
"venv", "venv",
".git", "node_modules",
".ruff_cache", "__pycache__",
".vscode", ".git",
"modules/apg", ".ruff_cache",
"modules/cfgzero", ".vscode",
"modules/control/proc", "modules/apg",
"modules/control/units", "modules/cfgzero",
"modules/dml", "modules/control/proc",
"modules/face", "modules/control/units",
"modules/flash_attn_triton_amd", "modules/dml",
"modules/ggml", "modules/face",
"modules/hidiffusion", "modules/flash_attn_triton_amd",
"modules/hijack/ddpm_edit.py", "modules/ggml",
"modules/intel", "modules/hidiffusion",
"modules/intel/ipex", "modules/hijack/ddpm_edit.py",
"modules/framepack/pipeline", "modules/intel",
"modules/onnx_impl", "modules/intel/ipex",
"modules/pag", "modules/framepack/pipeline",
"modules/postprocess/aurasr_arch.py", "modules/onnx_impl",
"modules/prompt_parser_xhinker.py", "modules/pag",
"modules/ras", "modules/postprocess/aurasr_arch.py",
"modules/seedvr", "modules/prompt_parser_xhinker.py",
"modules/sharpfin", "modules/ras",
"modules/rife", "modules/seedvr",
"modules/schedulers", "modules/sharpfin",
"modules/taesd", "modules/rife",
"modules/teacache", "modules/schedulers",
"modules/todo", "modules/taesd",
"modules/res4lyf", "modules/teacache",
"pipelines/bria", "modules/todo",
"pipelines/flex2", "modules/res4lyf",
"pipelines/f_lite", "pipelines/bria",
"pipelines/hidream", "pipelines/flex2",
"pipelines/hdm", "pipelines/f_lite",
"pipelines/meissonic", "pipelines/hidream",
"pipelines/omnigen2", "pipelines/hdm",
"pipelines/segmoe", "pipelines/meissonic",
"pipelines/xomni", "pipelines/omnigen2",
"pipelines/chrono", "pipelines/segmoe",
"scripts/consistory", "pipelines/xomni",
"scripts/ctrlx", "pipelines/chrono",
"scripts/daam", "scripts/consistory",
"scripts/demofusion", "scripts/ctrlx",
"scripts/freescale", "scripts/daam",
"scripts/infiniteyou", "scripts/demofusion",
"scripts/instantir", "scripts/freescale",
"scripts/lbm", "scripts/infiniteyou",
"scripts/layerdiffuse", "scripts/instantir",
"scripts/mod", "scripts/lbm",
"scripts/pixelsmith", "scripts/layerdiffuse",
"scripts/differential_diffusion.py", "scripts/mod",
"scripts/pulid", "scripts/pixelsmith",
"scripts/xadapter", "scripts/differential_diffusion.py",
"repositories", "scripts/pulid",
"extensions-builtin/sd-extension-chainner/nodes", "scripts/xadapter",
"extensions-builtin/sd-webui-agent-scheduler", "repositories",
"extensions-builtin/sdnext-modernui/node_modules", "extensions-builtin/sd-extension-chainner/nodes",
"extensions-builtin/sdnext-kanvas/node_modules", "extensions-builtin/sd-webui-agent-scheduler",
] "extensions-builtin/sdnext-modernui/node_modules",
"extensions-builtin/sdnext-kanvas/node_modules",
]
main.ignore-patterns=[ main.ignore-patterns=[
".*test*.py$", ".*test*.py$",
".*_model.py$", ".*_model.py$",
".*_arch.py$", ".*_arch.py$",
".*_model_arch.py*", ".*_model_arch.py*",
".*_model_arch_v2.py$", ".*_model_arch_v2.py$",
] ]
main.ignored-modules="" main.ignored-modules=""
main.jobs=4 main.jobs=4
main.limit-inference-results=100 main.limit-inference-results=100
@ -245,7 +240,6 @@ design.max-statements=200
design.min-public-methods=1 design.min-public-methods=1
exceptions.overgeneral-exceptions=["builtins.BaseException","builtins.Exception"] exceptions.overgeneral-exceptions=["builtins.BaseException","builtins.Exception"]
format.expected-line-ending-format="" format.expected-line-ending-format=""
# format.ignore-long-lines="^\s*(# )?<?https?://\S+>?$"
format.indent-after-paren=4 format.indent-after-paren=4
format.indent-string=' ' format.indent-string=' '
format.max-line-length=200 format.max-line-length=200
@ -266,70 +260,79 @@ logging.logging-format-style="new"
logging.logging-modules="logging" logging.logging-modules="logging"
messages_control.confidence=["HIGH","CONTROL_FLOW","INFERENCE","INFERENCE_FAILURE","UNDEFINED"] messages_control.confidence=["HIGH","CONTROL_FLOW","INFERENCE","INFERENCE_FAILURE","UNDEFINED"]
messages_control.disable=[ messages_control.disable=[
"abstract-method", "abstract-method",
"arguments-renamed", "arguments-renamed",
"bad-inline-option", "bad-inline-option",
"bare-except", "bare-except",
"broad-exception-caught", "broad-exception-caught",
"chained-comparison", "chained-comparison",
"consider-iterating-dictionary", "consider-iterating-dictionary",
"consider-merging-isinstance", "consider-merging-isinstance",
"consider-using-dict-items", "consider-using-dict-items",
"consider-using-enumerate", "consider-using-enumerate",
"consider-using-from-import", "consider-using-from-import",
"consider-using-generator", "consider-using-generator",
"consider-using-get", "consider-using-get",
"consider-using-in", "consider-using-in",
"consider-using-max-builtin", "consider-using-max-builtin",
"consider-using-min-builtin", "consider-using-min-builtin",
"consider-using-sys-exit", "consider-using-sys-exit",
"cyclic-import", "cyclic-import",
"dangerous-default-value", "dangerous-default-value",
"deprecated-pragma", "deprecated-pragma",
"duplicate-code", "duplicate-code",
"file-ignored", "file-ignored",
"import-error", "import-error",
"import-outside-toplevel", "import-outside-toplevel",
"invalid-name", "invalid-name",
"line-too-long", "line-too-long",
"locally-disabled", "locally-disabled",
"logging-fstring-interpolation", "logging-fstring-interpolation",
"missing-class-docstring", "missing-class-docstring",
"missing-function-docstring", "missing-function-docstring",
"missing-module-docstring", "missing-module-docstring",
"no-else-raise", "no-else-raise",
"no-else-return", "no-else-return",
"not-callable", "not-callable",
"pointless-string-statement", "pointless-string-statement",
"raw-checker-failed", "raw-checker-failed",
"simplifiable-if-expression", "simplifiable-if-expression",
"suppressed-message", "subprocess-run-check",
"subprocess-run-check", "suppressed-message",
"too-few-public-methods", "too-few-public-methods",
"too-many-instance-attributes", "too-many-instance-attributes",
"too-many-locals", "too-many-locals",
"too-many-nested-blocks", "too-many-nested-blocks",
"too-many-positional-arguments", "too-many-positional-arguments",
"too-many-statements", "too-many-statements",
"unidiomatic-typecheck", "unidiomatic-typecheck",
"unknown-option-value", "unknown-option-value",
"unnecessary-dict-index-lookup", "unnecessary-dict-index-lookup",
"unnecessary-dunder-call", "unnecessary-dunder-call",
"unnecessary-lambda-assigment", "unnecessary-lambda-assigment",
"unnecessary-lambda", "unnecessary-lambda",
"unused-wildcard-import", "unpacking-non-sequence",
"unpacking-non-sequence", "unsubscriptable-object",
"unsubscriptable-object", "unused-wildcard-import",
"useless-return", "use-dict-literal",
"use-maxsplit-arg", "use-maxsplit-arg",
"use-dict-literal", "use-symbolic-message-instead",
"use-symbolic-message-instead", "useless-return",
"useless-suppression", "useless-suppression",
"wrong-import-position", "wrong-import-position",
] ]
messages_control.enable="c-extension-no-member" messages_control.enable="c-extension-no-member"
method_args.timeout-methods=["requests.api.delete","requests.api.get","requests.api.head","requests.api.options","requests.api.patch","requests.api.post","requests.api.put","requests.api.request"] method_args.timeout-methods=[
miscellaneous.notes=["FIXME","XXX","TODO"] "requests.api.delete",
"requests.api.get",
"requests.api.head",
"requests.api.options",
"requests.api.patch",
"requests.api.post",
"requests.api.put",
"requests.api.request"
]
miscellaneous.notes=["FIXME","XXX","TODO","HERE"]
miscellaneous.notes-rgx="" miscellaneous.notes-rgx=""
refactoring.max-nested-blocks=5 refactoring.max-nested-blocks=5
refactoring.never-returning-functions=["sys.exit","argparse.parse_error"] refactoring.never-returning-functions=["sys.exit","argparse.parse_error"]
@ -346,11 +349,11 @@ string.check-quote-consistency=false
string.check-str-concat-over-line-jumps=false string.check-str-concat-over-line-jumps=false
typecheck.contextmanager-decorators="contextlib.contextmanager" typecheck.contextmanager-decorators="contextlib.contextmanager"
typecheck.generated-members=[ typecheck.generated-members=[
"numpy.*", "numpy.*",
"logging.*", "logging.*",
"torch.*", "torch.*",
"cv2.*", "cv2.*",
] ]
typecheck.ignore-none=true typecheck.ignore-none=true
typecheck.ignore-on-opaque-inference=true typecheck.ignore-on-opaque-inference=true
typecheck.ignored-checks-for-mixins=["no-member","not-async-context-manager","not-context-manager","attribute-defined-outside-init"] typecheck.ignored-checks-for-mixins=["no-member","not-async-context-manager","not-context-manager","attribute-defined-outside-init"]
@ -375,23 +378,23 @@ pythonPlatform = "All"
typeCheckingMode = "off" typeCheckingMode = "off"
venvPath = "./venv" venvPath = "./venv"
include = [ include = [
"*.py", "*.py",
"modules/**/*.py", "modules/**/*.py",
"pipelines/**/*.py", "pipelines/**/*.py",
"scripts/**/*.py", "scripts/**/*.py",
"extensions-builtin/**/*.py" "extensions-builtin/**/*.py"
] ]
exclude = [ exclude = [
"**/.*", "**/.*",
".git/", ".git/",
"**/node_modules", "**/node_modules",
"**/__pycache__", "**/__pycache__",
"venv", "venv",
] ]
extraPaths = [ extraPaths = [
"scripts", "scripts",
"pipelines", "pipelines",
] ]
reportMissingImports = "none" reportMissingImports = "none"
reportInvalidTypeForm = "none" reportInvalidTypeForm = "none"
@ -402,16 +405,16 @@ python-version = "3.10"
[tool.ty.src] [tool.ty.src]
include = [ include = [
"*.py", "*.py",
"modules/**/*.py", "modules/**/*.py",
"pipelines/**/*.py", "pipelines/**/*.py",
"scripts/**/*.py", "scripts/**/*.py",
"extensions-builtin/**/*.py" "extensions-builtin/**/*.py"
] ]
exclude = [ exclude = [
"venv/", "venv/",
"*.git/", "*.git/",
] ]
[tool.ty.rules] [tool.ty.rules]
invalid-method-override = "ignore" invalid-method-override = "ignore"

5
test/localize.mjs Normal file → Executable file
View File

@ -6,7 +6,7 @@ import * as fs from 'node:fs';
import * as process from 'node:process'; import * as process from 'node:process';
const apiKey = process.env.GOOGLE_API_KEY; const apiKey = process.env.GOOGLE_API_KEY;
const model = 'gemini-3-flash-preview'; const model = 'gemini-3.1-flash-lite-preview';
const prompt = `## You are expert translator AI. const prompt = `## You are expert translator AI.
Translate attached JSON from English to {language}. Translate attached JSON from English to {language}.
## Translation Rules: ## Translation Rules:
@ -111,6 +111,7 @@ async function localize() {
const t0 = performance.now(); const t0 = performance.now();
let allOk = true; let allOk = true;
for (const section of Object.keys(json)) { for (const section of Object.keys(json)) {
if (!allOk) continue;
const keys = Object.keys(json[section]).length; const keys = Object.keys(json[section]).length;
console.log(' start:', { locale, section, keys }); console.log(' start:', { locale, section, keys });
try { try {
@ -141,6 +142,8 @@ async function localize() {
if (allOk) { if (allOk) {
const txt = JSON.stringify(output, null, 2); const txt = JSON.stringify(output, null, 2);
fs.writeFileSync(fn, txt); fs.writeFileSync(fn, txt);
} else {
console.error(' error: something went wrong, output file not saved');
} }
const t3 = performance.now(); const t3 = performance.now();
console.log(' time:', { locale, time: Math.round(t3 - t0) / 1000 }); console.log(' time:', { locale, time: Math.round(t3 - t0) / 1000 });

2
test/reformat.js → test/reformat-json.js Normal file → Executable file
View File

@ -1,3 +1,5 @@
#!/usr/bin/env node
const fs = require('fs'); const fs = require('fs');
/** /**

2
wiki

@ -1 +1 @@
Subproject commit d2ecbe713e25e2a8da3e2f7d6794c82b85e8a0fe Subproject commit d54ade8e5f79a62b5228de6406400c8eda71b67f