ljleb / prompt-fusion-extension

auto1111 webui extension for all sorts of prompt interpolations!
MIT License
259 stars 16 forks source link

Incompatible with v1.6.0 of webui due to prompt parser change #60

Closed catboxanon closed 11 months ago

catboxanon commented 11 months ago

Posting this on behalf of someone else -- essentially though, a recent PR for the prompt parser that was merged right before 1.6.0-RC was released, broke this extension.

Traceback (most recent call last):
      File "F:\stable-diffusion-webui\modules\call_queue.py", line 57, in f
        res = list(func(*args, **kwargs))
      File "F:\stable-diffusion-webui\modules\call_queue.py", line 36, in f
        res = func(*args, **kwargs)
      File "F:\stable-diffusion-webui\modules\txt2img.py", line 55, in txt2img
        processed = processing.process_images(p)
      File "F:\stable-diffusion-webui\modules\processing.py", line 732, in process_images
        res = process_images_inner(p)
      File "F:\stable-diffusion-webui\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 "F:\stable-diffusion-webui\modules\processing.py", line 856, in process_images_inner
        p.setup_conds()
      File "F:\stable-diffusion-webui\modules\processing.py", line 1315, in setup_conds
        super().setup_conds()
      File "F:\stable-diffusion-webui\modules\processing.py", line 469, in setup_conds
        self.uc = self.get_conds_with_caching(prompt_parser.get_learned_conditioning, negative_prompts, total_steps, [self.cached_uc], self.extra_network_data)
      File "F:\stable-diffusion-webui\modules\processing.py", line 455, in get_conds_with_caching
        cache[1] = function(shared.sd_model, required_prompts, steps, hires_steps, shared.opts.use_old_scheduling)
      File "F:\stable-diffusion-webui\extensions\prompt-fusion-extension\lib_prompt_fusion\hijacker.py", line 15, in wrapper
        return function(*args, **kwargs, original_function=self.__original_functions[attribute])
    TypeError: _hijacked_get_learned_conditioning() got multiple values for argument 'original_function'

Related PR: https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/12457

ljleb commented 11 months ago

It's too late at the moment, will fix tomorrow.

pmcculler commented 11 months ago

I'm a passionate user of prompt-fusion and I don't think I can work with A1111's 1.6 release candidate until it's supported. I'm a developer, is there anything I can do to assist?

ljleb commented 11 months ago

Hey, thanks for landing a hand. I spent a bit of time to fix this + sdxl this night actually. I'm almost done, I still have to move some of the code around and make a path for some of the values. I'll try to look into it a little bit more tomorrow ™️

pmcculler commented 11 months ago

Well, marvelous! I'll keep an eye out then. :)

ljleb commented 11 months ago

This should be fixed now, please open a new issue if there is any problem with the fix.