Closed Turamarth14 closed 1 week ago
Hello @Turamarth14! I'm here to assist you with any bugs, questions, or contributions.
To resolve the issue where repeating image creation with the same settings and an activated ADetailer in the Regional Prompter extension changes the images after the first batch, seemingly losing the prompt for the last region, you need to ensure that the prompt is correctly set for each iteration. The i2i_prompts_replace
method is responsible for setting the prompt and negative prompt for each iteration.
Here is the relevant code snippet that shows how the prompt is set:
@staticmethod
def i2i_prompts_replace(
i2i, prompts: list[str], negative_prompts: list[str], j: int
) -> None:
i1 = min(j, len(prompts) - 1)
i2 = min(j, len(negative_prompts) - 1)
prompt = prompts[i1]
negative_prompt = negative_prompts[i2]
i2i.prompt = prompt
i2i.negative_prompt = negative_prompt
Ensure that this method is called correctly for each batch to set the appropriate prompt and negative prompt. If the prompt is not being set correctly, it could lead to the issue you are experiencing [1].
To continue talking to Dosu, mention @dosu.
Thank you for your report. I've worked on this before with the dynamic prompt extension, and it looks like this issue is related to that. But with issues like this with other extensions, it's hard to know exactly what's causing it, and hard to think of a way to fix it, sorry.
Try using the Token "[SEP]" in the a detailer to separated the area into two
Try using the Token "[SEP]" in the a detailer to separated the area into two
That makes no difference. The second generated image is still completely different from the one without active ADetailer.
Describe the bug
When creating images using the Regional Prompter extension, repeating the creation with the same settings and an activated ADetailer completely changes the images after the first batch. It seems that the prompt for the last region gets lost and instead the prompt of the previous region is used. The prompt information stored within the image is also changed, which might be related. For the first image the prompt information is the same with and without ADetailer. For the second image it changes. Without Adetailer:
With Adetailer:
Steps to reproduce
Create two batches of a single image with multiple regions using Regional Prompter and deactivated ADetailer. In Regional Prompter activate Use common prompt and set the splitting to columns with a divide ratio of 1,1. For example:
Activate ADetailer and repeat the image generation without changing any other settings.
Screenshots
Image generation settings:
Regional Prompter settings:
ADetailer settings:
Images without activated ADetailer:
Images with activated ADetailer:
Console logs, from start to end.
List of installed extensions
IF_prompt_MKR SD-WebUI-BatchCheckpointPrompt Stable-Diffusion-Webui-Civitai-Helper a1111-sd-webui-tagcomplete adetailer multidiffusion-upscaler-for-automatic1111 sd-extension-steps-animation sd-extension-system-info sd-webui-controlnet sd-webui-facefusion sd-webui-infinite-image-browsing sd-webui-negpip sd-webui-reactor sd-webui-regional-prompter sd_webui_SAG sdweb-clip-changer shift-attention stable-diffusion-webui-two-shot z-a1111-sd-webui-dtg