ljleb / sd-webui-neutral-prompt

Collision-free AND keywords for a1111 webui!
MIT License
187 stars 13 forks source link

cause error when use sdxl in automatic1111 v1.5 #37

Closed jasoncow007 closed 1 year ago

jasoncow007 commented 1 year ago

seems conflict occurs when generate image with sdxl models

Traceback (most recent call last): File "D:\sd-webui-aki-v4\modules\call_queue.py", line 58, in f res = list(func(*args, kwargs)) File "D:\sd-webui-aki-v4\modules\call_queue.py", line 37, in f res = func(*args, *kwargs) File "D:\sd-webui-aki-v4\modules\txt2img.py", line 62, in txt2img processed = processing.process_images(p) File "D:\sd-webui-aki-v4\modules\processing.py", line 673, in process_images res = process_images_inner(p) File "D:\sd-webui-aki-v4\extensions\sd-webui-controlnet\scripts\batch_hijack.py", line 42, in processing_process_images_hijack return getattr(processing, '__controlnet_original_process_images_inner')(p, args, kwargs) File "D:\sd-webui-aki-v4\modules\processing.py", line 782, in process_images_inner p.setup_conds() File "D:\sd-webui-aki-v4\modules\processing.py", line 1180, in setup_conds super().setup_conds() File "D:\sd-webui-aki-v4\modules\processing.py", line 365, in setup_conds self.c = self.get_conds_with_caching(prompt_parser.get_multicond_learned_conditioning, prompts, self.steps * self.step_multiplier, [self.cached_c], self.extra_network_data) File "D:\sd-webui-aki-v4\modules\processing.py", line 353, in get_conds_with_caching cache[1] = function(shared.sd_model, required_prompts, steps) File "D:\sd-webui-aki-v4\modules\prompt_parser.py", line 236, in get_multicond_learned_conditioning learned_conditioning = get_learned_conditioning(model, prompt_flat_list, steps) File "D:\sd-webui-aki-v4\modules\prompt_parser.py", line 163, in get_learned_conditioning conds = model.get_learned_conditioning(texts) File "D:\sd-webui-aki-v4\modules\sd_models_xl.py", line 24, in get_learned_conditioning "original_size_as_tuple": torch.tensor([height, width], **devices_args).repeat(len(batch), 1), TypeError: must be real number, not NoneType 提示:Python 运行时抛出了一个异常。请检查疑难解答页面。

Nitrowing commented 1 year ago

I can confirm, SDXL won't generate in Auto1111 with Neutral Prompt loaded. This is being brought up on Reddit too.

ljleb commented 1 year ago

Ah I thought I replied to this.

I'm currently moving and won't be able to fix this myself before 3 or 4 days... I would really appreciate if someone could make a PR.

ljleb commented 1 year ago

@Nitrowing I plugged my PC in one corner of my temporary place, I hope to have fixed it by now. Please let me know if the extension still prevents sdxl from running, and I'll reopen this issue.

jasoncow007 commented 1 year ago

it works,,,another question,I wonder if it affect the looks of a portrait,,,,,,after using it, the charactor‘s appearance changed

Nitrowing commented 1 year ago

Confirmed working - thank you