wcde / sd-webui-refiner

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

Denoiser error when using refiner #21

Closed tterava closed 1 year ago

tterava commented 1 year ago

I keep having this error on every iteration when using a refiner:

*** Error executing callback cfg_denoised_callback for C:\Users\user\Source\Workspaces\SD-webui\webui\extensions\sd-webui-refiner\scripts\refiner.py
    Traceback (most recent call last):
      File "C:\Users\user\Source\Workspaces\SD-webui\webui\modules\script_callbacks.py", line 203, in cfg_denoised_callback
        c.callback(params)
      File "C:\Users\user\Source\Workspaces\SD-webui\webui\extensions\sd-webui-refiner\scripts\refiner.py", line 157, in denoised_callback
        p.sd_model.model = self.base.to(devices.device, devices.dtype_unet)
    AttributeError: 'NoneType' object has no attribute 'to'

Settings used: image

lisanet commented 1 year ago

Could you try a single image instead of a batch? If this works, I might know how to fix it.

tterava commented 1 year ago

Yes, using batch size of 1 produces no errors

XeonG commented 1 year ago

batch size 1.... `Loading refiner...

85%|██████████████████████████████████████████████████████████████████████ | 35/41 [00:08<00:01, 4.58it/s]*** Error executing callback cfg_denoiser_callback for C:\Projects\Stable_Diffusion\Automatic1111\stable-diffusion-webui\extensions\sd-webui-refiner\scripts\refiner.py Traceback (most recent call last): File "C:\Projects\Stable_Diffusion\Automatic1111\stable-diffusion-webui\modules\script_callbacks.py", line 195, in cfg_denoiser_callback c.callback(params) File "C:\Projects\Stable_Diffusion\Automatic1111\stable-diffusion-webui\extensions\sd-webui-refiner\scripts\refiner.py", line 113, in denoiser_callback params.text_cond['vector'] = torch.cat((params.text_cond['vector'][:, :2304], self.c_ae), 1) IndexError: too many indices for tensor of dimension 3 `

wcde commented 1 year ago

@XeonG Refiner works only with SDXL.