diff --git a/Advanced.md b/Advanced.md new file mode 100644 index 0000000..6104bfe --- /dev/null +++ b/Advanced.md @@ -0,0 +1,47 @@ +## Separate adetailer prompts with `[SEP]` tokens + +This feature can be used when the detection model detects more than 1 object and you want to apply different prompts to each object. + +You can separate the prompts with `[SEP]` to apply them in order. (To be precise, it is split by the regex `\s*\[SEP\]\s*`.) + +If there are more detected objects than separate prompts, the last prompt will be used for the rest. + +The order in which objects are detected is highly arbitrary, so use with caution. + +#### example: + +``` +masterpiece, 1girl, red hair, red eyes, __woman_clothes__ [SEP] masterpiece, 1girl, blue hair, blue eyes, __woman_clothes__ +``` + +If there is only one object detected, only the first prompt `masterpiece, 1girl, red hair, red eyes, __woman_clothes__` applies. + +If there are two, then `masterpiece, 1girl, red hair, red eyes, __woman_clothes__` and `masterpiece, 1girl, blue hair, blue eyes, __woman_clothes__` are applied in that order. + +If there are more than three, the last prompt is applied to the remaining objects. `masterpiece, 1girl, blue hair, blue eyes, __woman_clothes__` + +### Blank prompt + +If any prompt is left blank, the default prompt is applied as if nothing had been typed in the prompt box. + +#### example: + +Input prompt: +``` +masterpiece, best quality, 4girls +``` + +ADetailer prompt: +``` +masterpiece, 1girl, red hair, red eyes [SEP] [SEP] masterpiece, 1girl, blue hair, blue eyes +``` + +The second prompt is blank, so if there are 5 detected objects, the prompts that would apply would be, in order, as follows: + +``` +masterpiece, 1girl, red hair, red eyes +masterpiece, best quality, 4girls +masterpiece, 1girl, blue hair, blue eyes +masterpiece, 1girl, blue hair, blue eyes +masterpiece, 1girl, blue hair, blue eyes +```