Open Oninaig opened 1 year ago
@Oninaig Worth changing title to "All textual inversions"?
It's not just negative embeddings, same happens with embeddings in positive prompt. LoRAs do not get repeated but if a LoRA is in the prompt, the repetition is 4n-2. e.g., batch count=4 with 1 embedding and 1 LoRA, no negative prompt: 1: 2 reps 2: 6 reps 3: 10 reps 4: 14 reps and so on for larger batches. For batch count =100 it's a scroll-scroll-scroll PITA. Example metadata for above at 4th image:
xlmrblng15-1300, 3d1s0npunkai. Anthropomorphic Cubism, Taiwanese cowboy stalking scarlet birds on mudflats. Black-tinted, white filigree inlay.
Looks like it is a problem in automatic1111 webui, not Dynamic Prompts. I found that commenting out 2 lines in a webui python file sorted the problem for me. I have posted about the issue/solution at the a1111 site: https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/13709
When using wildcards along with any negative textual inversion, if you set your batch size to anything greater than 1, every subsequent batch will have your negative TIs duplicated. For example, with a batch size of 2:
The first batch has images with this metadata:
Steps: 20, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 2240536791, Size: 512x512, Model hash: 1d1e459f9f, Model: anythingelseV4_v45, Clip skip: 2, TI hashes: "easynegative: c74b4e810b03", Version: v1.6.0
Second batch:
Steps: 20, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 2240536793, Size: 512x512, Model hash: 1d1e459f9f, Model: anythingelseV4_v45, Clip skip: 2, TI hashes: "easynegative: c74b4e810b03, easynegative: c74b4e810b03", Version: v1.6.0
And this repeats for every subsequent batch, meaning at 8 batches your negative prompt has 8x of each of your TIs:
Steps: 20, Sampler: DPM++ 2M Karras, CFG scale: 7, Seed: 3434201683, Size: 512x512, Model hash: 1d1e459f9f, Model: anythingelseV4_v45, VAE hash: df3c506e51, VAE: orangemix.vae.pt, Clip skip: 2, TI hashes: "easynegative: c74b4e810b03, easynegative: c74b4e810b03, easynegative: c74b4e810b03, easynegative: c74b4e810b03, easynegative: c74b4e810b03, easynegative: c74b4e810b03, easynegative: c74b4e810b03, easynegative: c74b4e810b03, easynegative: c74b4e810b03, easynegative: c74b4e810b03, easynegative: c74b4e810b03, easynegative: c74b4e810b03, easynegative: c74b4e810b03, easynegative: c74b4e810b03, easynegative: c74b4e810b03, easynegative: c74b4e810b03, easynegative: c74b4e810b03, easynegative: c74b4e810b03, easynegative: c74b4e810b03, easynegative: c74b4e810b03, easynegative: c74b4e810b03, easynegative: c74b4e810b03, easynegative: c74b4e810b03, easynegative: c74b4e810b03, easynegative: c74b4e810b03, easynegative: c74b4e810b03, easynegative: c74b4e810b03, easynegative: c74b4e810b03, easynegative: c74b4e810b03, easynegative: c74b4e810b03, easynegative: c74b4e810b03", Version: v1.6.0