AIrjen/OneButtonPrompt

Error while using One Button Prompt with Regional Prompter in SD.Next

Closed this issue · 4 comments

Phosay commented

I use a fork of A1111 webui called SD.Next. Following the guide of "prompt_compounder_and_regional_prompter_to_create_insane_images" I tried to generate the landscape example which got finished but I got an error, and from what the generated picture looks like the regional prompter didn't work:

[1] [[1.0, 1.0, 1.0]]
Starting generating the prompt
Critical hit! Something unique has been added to the prompt
only generated these artists:(art by Mike Allred:1.3) ,art by Max Pechstein
Running in quality vomit mode
Critical hit! Something unique has been added to the prompt
Critical hit! Something unique has been added to the prompt
adding something rare to the prompt
adding something rare to the prompt
Critical hit! Something unique has been added to the prompt
Nice! adding something legendary to the prompt
Critical hit! Something unique has been added to the prompt
Critical hit! Something unique has been added to the prompt
Critical hit! Something unique has been added to the prompt
Critical hit! Something unique has been added to the prompt
Complex background, Glowwave, [Enthralling|Psychadelic] Miserable (The Water Gardens of Dorne:1.3) from inside of a Summer Camp, Golden ratio, Hippie Art, ethereal magical atmosphere,
 BREAK, raytraced reflections, made of Flannel, Flowery Breathtaking (City:1.3) and Heartwarming Sci-fi Pedestrian tunnel, Green and fluorescent purple splash, Amaro, Kintsugi, 4K, dripping with Red, Ribbons, most beautiful artwork in the world,
 BREAK, Injured [Greedy:Pitiful:17] (Monument Valley:1.3) , Concept Art World, Crimson power aura

Full prompt to be processed:

(art by Mike Allred:1.3) ,art by Max Pechstein, landscape
 BREAK Complex background, Glowwave, [Enthralling|Psychadelic] Miserable (The Water Gardens of Dorne:1.3) from inside of a Summer Camp, Golden ratio, Hippie Art, ethereal magical atmosphere,
 BREAK, raytraced reflections, made of Flannel, Flowery Breathtaking (City:1.3) and Heartwarming Sci-fi Pedestrian tunnel, Green and fluorescent purple splash, Amaro, Kintsugi, 4K, dripping with Red, Ribbons, most beautiful artwork in the world,
 BREAK, Injured [Greedy:Pitiful:17] (Monument Valley:1.3) , Concept Art World, Crimson power aura
04:29:13-809438 ERROR    Running script process: extensions\sd-webui-regional-prompter\scripts\rp.py: AttributeError
┌───────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────┐
│ D:\DOWNLOAD\AI\StableDiffusion\automatic\modules\scripts.py:470 in process                                          │
│                                                                                                                     │
│   469 │   │   │   │   args = p.per_script_args.get(script.title(), p.script_args[script.args_f                      │
│ > 470 │   │   │   │   script.process(p, *args, **kwargs)                                                            │
│   471 │   │   │   except Exception as e:                                                                            │
│                                                                                                                     │
│ D:\DOWNLOAD\AI\StableDiffusion\automatic\extensions\sd-webui-regional-prompter\scripts\rp.py:440 in process         │
│                                                                                                                     │
│    439 │   │   loraverchekcer(self)                                                  #check web                     │
│ >  440 │   │   if not nchangeand: allchanger(p, "AND", KEYBRK)                                                      │
│    441 │   │   if any(x in self.mode for x in ["Ver","Hor"]):                                                       │
│                                                                                                                     │
│ D:\DOWNLOAD\AI\StableDiffusion\automatic\extensions\sd-webui-regional-prompter\scripts\rp.py:625 in allchanger      │
│                                                                                                                     │
│    624 def allchanger(p, a, b):                                                                                     │
│ >  625 │   p.prompt = p.prompt.replace(a, b)                                                                        │
│    626 │   for i in lange(p.all_prompts):                                                                           │
└─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
AttributeError: 'list' object has no attribute 'replace'
100%|██████████████████████████████████████████████████████████████████████████████████| 40/40 [00:11<00:00,  3.63it/s]
04:29:27-916846 INFO     Processed: images=1 time=13.93s its=2.87 memory={'ram': {'used': 4.36, 'total': 31.89}, 'gpu':
                         {'used': 3.59, 'total': 6.0}, 'retries': 0, 'oom': 0}
AIrjen commented

Hi! It looks like the error is coming from the regional prompter. Can you check if the prompt works when you generate without one button prompt enabled?

Phosay commented

Regional prompter seems to be working when one button prompt is disabled and its prompt used standalone.

AIrjen commented

Hi, I will need some time to get to the bottom of this. Currently I have limited access to a computer with a video card. I'll try and find something when I can.

AIrjen commented

Hi! Sorry this took a while. I didn't have access to my PC for a long time. So I couldn't run A1111 or SD.Next.

The problem only exists on SD.Next, not on A1111. I was able to create a small fix though for SD.Next! it is not perfect, but it is workable. The fix will work as long as you keep Batch size = 1. Any batch count is fine.

As long as Batch size remains one, the error will not occur anymore after you update One Button Prompt!.