Guide AI & ML 6 min read

Prompt weights typed on Apple's Pinyin layout arrive as plain text

Image front ends such as AUTOMATIC1111, Forge and ComfyUI read a prompt weight like (猫:1.2) only when its brackets and colon are ASCII. With Chinese punctuation on, Apple's Pinyin layout types full-width look-alikes, and we found the parsers read the result as ordinary text.

Kenji Tanaka
Developer Tools & Cloud Analyst
Published 18 Nov 2026, 5:20 PM (SGT)
Share:
Hands typing on a plain beige computer keyboard
Photo by MART PRODUCTION on Pexels
Advertisement

A prompt weight is a short piece of syntax, such as (猫:1.2), that tells an image-generation front end to give one term more or less attention than the rest. We ran the prompt parsers of AUTOMATIC1111, Forge, ComfyUI and compel over 32 spellings of that weight, mixing half-width and full-width brackets, colons and digits. Two carried the weight. The spelling that Apple's Pinyin layout types for those keystrokes with Chinese punctuation on, (猫:1。2), was plain text in all four.

A full-width bracket passes for a bracket only on screen

Each spelling of 猫 (māo, "cat") at ×1.2 combined an opener of ( or (, a closer of ) or ), a colon of : or :, and the number in four forms, from all-ASCII 1.2 to 1。2. We ran each parser from its own source on Python 3.9.6: AUTOMATIC1111's prompt_parser.py at commit 82a973c0 (27 July 2024, AGPL-3.0); Forge at dfdcbab6 (27 June 2025, AGPL-3.0), whose parser is byte-identical; ComfyUI's sd1_clip.py at 0d41e846 (18 November 2026, GPL-3.0); and compel at commit 3b6291ea, which its pyproject numbers 2.5.1 (MIT). We generated no images.

ParserWeight read as writtenA different weightPlain text at ×1.0
AUTOMATIC1111 and Forge21416
ComfyUI2624
compel0032

compel has no (word:1.2) form at all, so even the plain ASCII spelling is text to it. Elsewhere the two that worked were all-ASCII and ASCII syntax with full-width digits. All 16 spellings that opened with ( were plain text in every parser. A full-width colon alone fails more quietly: (猫:1.2) is read in AUTOMATIC1111 and ComfyUI at ×1.1, the default for one pair of brackets, with "猫:1.2" left in the prompt as words. AUTOMATIC1111's docstring states the rule it applies: "(abc) - increases attention to abc by a multiplier of 1.1".

Apple's Pinyin layout types a double of each bracket and the colon

We decoded the Pinyin.keylayout file that macOS 26.7.2 (build 25G332) ships, using the key map it assigns to standard, non-JIS Mac keyboards. With Chinese punctuation on, shift-9 and shift-0 give ( and ), and shift-semicolon gives :. The full-stop key gives 。, the square-bracket keys give 【 and 】, and the backslash gives the enumeration comma 、. Digits stay ASCII.

So the keystrokes for (猫:1.2) come out as (猫:1。2). They look almost alike; to a parser they share only the cat and two digits. Apple's Traditional Pinyin layout matched on all 24 key and shift pairs we decoded. We read the layout file and did not test whether the input method adds rules of its own, for instance after a digit.

Look-alike closers leave AUTOMATIC1111's bracket open to the end

We also placed each spelling in the prompt 城市, X, 霓虹灯, 雨 (chéngshì, city; níhóngdēng, neon lights; yǔ, rain) and read the other terms. The 67 add bracket-only and escaped forms to the 32. In AUTOMATIC1111 and Forge, 16 of the 67 changed the weight of terms the writer never touched.

The typical case is an ASCII opener with a full-width closer, as in (猫:1.2). The ( is never closed, and the parser applies its ×1.1 from there to the end of the prompt, so 霓虹灯 and 雨 are emphasised too. The leak only ran forward: 城市, before the term, stayed at ×1.0 in all 16. The trailing terms took ×1.1 in 13 cases, ÷1.1 in two ([猫】 and [猫]) and ×1.21 in one (((猫))). ComfyUI and compel moved no other term in any of the 67; there an unclosed bracket stays text.

Advertisement

InvokeAI's parser has no colon form, and its plus signs survive the layout

InvokeAI's pyproject.toml at commit b4579681 requires compel 2.4.0 or later below 3, and its prompt nodes import it; we read that dependency and did not run InvokeAI. compel's syntax document says "+ is equivalent to 1.1", with - meaning 0.9 and an explicit form written (apricots)1.1. Fed the ASCII (猫:1.2), compel returned the text "猫:1 . 2" at ×1.0.

Its suffix signs fare better on Apple's layout, which types shift-equals as an ASCII + and the minus key as an ASCII -. In compel, 猫+ read 1.1, 猫++ read 1.21 and 霓虹灯- read 0.9. Its bracket form did not survive: (猫)1.2 read 1.2, while (猫)1.2 was text. We did not test whether the input method commits a raw + mid-word.

Nested brackets look alike in ComfyUI and AUTOMATIC1111 and add up differently

AUTOMATIC1111's features wiki says ((word)) increases attention "by a factor of 1.21 (= 1.1 * 1.1)", and its parser multiplies layers. Run on ((猫:1.2)), AUTOMATIC1111 gave 1.32 and ComfyUI gave 1.2: ComfyUI's code replaces the inherited weight with the explicit one. One pasted string, two weights.

NovelAI documents a separate syntax again: its emphasis page, read on 18 November 2026, multiplies by 1.05 for each pair of curly braces and says numerical emphasis is available only on V4 or higher models.

Folding 【 】 into square brackets adds a de-emphasis nobody typed

An editor repairing Chinese-keyboard input must sort characters into two groups. (, ), :, [, ], a full-width point and 。 between digits are doubles of ASCII syntax, and folding them gives the parsers what they look for. 【 and 】 are different. The layout types them for the square-bracket keys, but turned into [ ] they divide a term's weight by 1.1 in AUTOMATIC1111 and Forge, which a writer using them as Chinese brackets never asked for. The enumeration comma 、 also has to separate terms.

Our Chinese prompt weight editor did none of this until 18 November 2026. It passed full-width syntax through, so 城市,(霓虹灯:1.3),雨 gave a term reading (霓虹灯:1.3) with its slider at 1.00. It treated a list joined by 、 as one term, and it rewrote (霓虹灯:1.3), which the parsers read at 1.3, as a ×1.1 term. The same revision removed a JavaScript port of AUTOMATIC1111's parser, used only by tests, from its served script.

The revised editor counts full-width syntax and converts it only on a click, with a separate button for 【 】; 、 now separates terms. To re-run it, type 城市,(霓虹灯:1.3),雨: the notice counts 3 characters, and after the conversion the slider for 霓虹灯 reads 1.3 and the output is 城市, (霓虹灯:1.3), 雨. In our test, with the editor's output read back by the real parsers, 4 of the 67 spellings in context reached the intended weight before the revision and 56 after the conversion click, or 61 with the 【 】 button, in AUTOMATIC1111 and ComfyUI alike.

Full-width digits are the disguise the parsers see through

One width slip did no harm. (猫:1.2) read 1.2 in AUTOMATIC1111 and ComfyUI, because Python's \d, in AUTOMATIC1111's weight pattern, and float(), in both, accept full-width digits. A full-width point or a 。 between the digits still fails.

Every other result here follows from one property of the code: brackets, colons and points are matched by code point, never by how they look. An input method set to Chinese punctuation changes the code point and keeps the shape, and the parsers we ran read what the code points say.

Advertisement
Kenji Tanaka
Developer Tools & Cloud Analyst

Kenji Tanaka covers developer tools, cloud platforms, DevOps, CI/CD, and software supply-chain topics for RECATOOLS.

View author profile → · Editorial policy

About this byline Kenji Tanaka is a RECATOOLS editorial persona for developer tools, cloud, DevOps, and software supply-chain coverage. Articles are produced and reviewed under RECATOOLS editorial supervision.

Corrections policy

Go further

Relevant tools

More from AI & ML

Advertisement
Advertisement