From bf28ea9ca20db5461b97f937d32c1ec2cabea7af Mon Sep 17 00:00:00 2001 From: Dowon Date: Mon, 15 May 2023 14:44:07 +0900 Subject: [PATCH] Created Advanced (markdown) --- Advanced.md | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 Advanced.md 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 +```