adieyal / sd-dynamic-prompts

A custom script for AUTOMATIC1111/stable-diffusion-webui to implement a tiny template language for random prompt generation
MIT License
1.96k stars 253 forks source link

[BUG] Pnginfo Template loss wildcard name when use Adetailer #730

Open AhBumm opened 4 months ago

AhBumm commented 4 months ago

Template wrong information from adetailer prompt Png Info: bust_portrait, colorful, beautiful, delicate_face, fairytale, A Serbian looking lady wearing light brown gradient Tassel skirt with pleats and pale color rose on leg width and flowers and earrings, aqua theme costume, soft_pastel_colors, romantic, vintage, beautiful_patterns, gouache_painting, ethereal, Great_Gatsby, spring_fashion, Vogue_fashion, opulent, Man_Ray, Rolf_Armstrong, colorful_jeweled_ballgown, light_on_face, Maya🦩, , 18th century, medium hair with hair over one eye and hair slicked back, white split-color hair, , Negative prompt: (asian:2), (aidxlv05_neg:1.4), close-up, cut off, Back view, elderly, wrinkles, sorrowful, sad Steps: 20, Sampler: Euler a, CFG scale: 5, Seed: 1092573288, Size: 1024x1024, Model: realcartoonXL_v6, Denoising strength: 0.2, ADetailer model: face_yolov8n.pt, ADetailer prompt: "North Germanic people looking face, detail face, {2$$gownList/other/faceWord}", ADetailer negative prompt: "(asian:1.6), elderly, wrinkles, sorrowful, sad", ADetailer confidence: 0.3, ADetailer mask only top k largest: 1, ADetailer dilate erode: 4, ADetailer mask blur: 4, ADetailer denoising strength: 0.25, ADetailer inpaint only masked: True, ADetailer inpaint padding: 32, ADetailer model 2nd: hand_yolov8s.pt, ADetailer prompt 2nd: detail finger, ADetailer negative prompt 2nd: "extra fingers, interlocked fingers", ADetailer confidence 2nd: 0.5, ADetailer mask only top k largest 2nd: 2, ADetailer dilate erode 2nd: 4, ADetailer mask blur 2nd: 4, ADetailer denoising strength 2nd: 0.3, ADetailer inpaint only masked 2nd: True, ADetailer inpaint padding 2nd: 32, ADetailer ControlNet model 2nd: sai_xl_depth_256lora [73ad23d1], ADetailer ControlNet module 2nd: depth_hand_refiner, ADetailer version: 24.1.2, Template: "North Germanic people looking face, detail face, {2$$gownList/other/faceWord}", Negative Template: "(asian:1.6), elderly, wrinkles, sorrowful, sad", Hires checkpoint: dreamshaper_8 [879db523c3], Hires prompt: "detailed texture, rich detail, detail face, detail fingers, bright global illumination, ", Hires negative prompt: "EasyNegativeV2, blurry, extra fingers, depth of field, blurry background", Hires upscale: 1.25, Hires steps: 10, Hires upscaler: R-ESRGAN 4x+, Lora hashes: "sd15_lcm_lora_rank1: a98be391e9ea", Eta: 0.5, ControlNet 0: "Module: depth_hand_refiner, Model: sai_xl_depth_256lora [73ad23d1], Weight: 1.0, Resize Mode: ResizeMode.INNER_FIT, Low Vram: False, Guidance Start: 0.0, Guidance End: 1.0, Pixel Perfect: True, Control Mode: ControlMode.BALANCED, Hr Option: HiResFixOption.BOTH, Save Detected Map: True"

cc0800 commented 3 weeks ago

This affects the CSV file writing too, leading to unrecoverable loss of original template data. If Adetailer is enabled, the condensed prompt overwrites the original in both the embedded PNG comment and CSV. Additionally this causes additional CSV files to be written, one for every image, with inconsistent data.

Original template: girl holding {red flower|green balloon|blue bottle} Batch Size: 4 Adetailer disabled Creates 1 CSV file for four images:

positive_prompt,negative_prompt

girl holding {red flower|green balloon|blue bottle},

girl holding green balloon,

girl holding red flower,

girl holding red flower,

girl holding green balloon,

However with Adetailer enabled (1 tap, Adetailer prompt field left blank to use original prompt), four CSV files are written (one for each image) with the following contents:

positive_prompt,negative_prompt

girl holding green balloon,

girl holding green balloon,
positive_prompt,negative_prompt

girl holding red flower,

girl holding red flower,
positive_prompt,negative_prompt

girl holding red flower,

girl holding red flower,
positive_prompt,negative_prompt

girl holding green balloon,

girl holding green balloon,

girl holding green balloon,

girl holding green balloon,

girl holding green balloon,
bluelovers commented 6 days ago

https://github.com/adieyal/sd-dynamic-prompts/pull/790