wcde / sd-webui-refiner

Webui Extension for integration refiner in generation process
161 stars 12 forks source link

Error if batchsize > 1 : RuntimeError: Sizes of tensors must match except in dimension 1 #24

Closed httkl closed 11 months ago

httkl commented 11 months ago

If I set the batchsize to anything > 1 (in this example 4), I get the following error and the refiner is not applied. Batchsize =1 is ok.

*** Error executing callback cfg_denoiser_callback for ~/stable-diffusion-webui/extensions/sd-webui-refiner/scripts/refiner.py Traceback (most recent call last): File "~/stable-diffusion-webui/modules/script_callbacks.py", line 195, in cfg_denoiser_callback c.callback(params) File "~/stable-diffusion-webui/extensions/sd-webui-refiner/scripts/refiner.py", line 110, in denoiser_callback params.text_cond['vector'] = torch.cat((params.text_cond['vector'][:, :2304], self.c_ae), 1) RuntimeError: Sizes of tensors must match except in dimension 1. Expected size 4 but got size 1 for tensor number 1 in the list.

wcde commented 11 months ago

Should be fixed - #23 Check if extension is up to date.

httkl commented 11 months ago

It was up to date, but I forgot to restart. Ups... Sorry for the noise. All good now! :)