stable-diffusion-backend icon indicating copy to clipboard operation
stable-diffusion-backend copied to clipboard

No longer works.

Open V4nK15h opened this issue 10 months ago • 2 comments

I've been using this script daily for months, but as of 31 Aug 2023 it now breaks Automatic1111 and prevents any image generation from happening.

If this script is in the scripts folder, it is now no longer possible to generate any images without getting an error about the number of arguments being passed to the hijacked_get_learned_conditioning function in the script.

Removing the script and restarting Automatic1111 returns everything to normal but of course the functionality that this script offered is no longer available.

I hope this can be resolved as I will severely miss the functionality that this script added.

V4nK15h avatar Aug 31 '23 14:08 V4nK15h

Here's how to fix it: Edit the script to add , *args to the all the *_get_learned_conditioning commands, like def hijacked_get_learned_conditioning(model, prompts, steps, *args): on line 7 and return real_get_learned_conditioning(model, switched_prompts, steps, *args) on line 40. There might be some unforeseen issues but it appears to be working. {fire|ice} looks the same as {fire@3|ice@3} and {fire@3|ice@20} looks different, so it seems to be parsing it correctly for basic txt2img.

torridgristle avatar Oct 14 '23 16:10 torridgristle

I tried this, but I still get errors

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

Meerkov avatar Oct 29 '23 21:10 Meerkov