DenOfEquity / webUI_ExtraSchedulers

adds a few extra schedulers to the dropdown in recent A1111-derived webUIs for Stable Diffusion
2 stars 0 forks source link

NansException when using new samplers #2

Open AndreyRGW opened 5 days ago

AndreyRGW commented 5 days ago

image

NansException: A tensor with NaNs was produced in Unet. This could be either because there's not enough precision to represent the picture, or because your video card does not support half type. Try setting the "Upcast cross attention layer to float32" option in Settings > Stable Diffusion or using the --no-half commandline argument to fix this. Use --disable-nan-check commandline argument to disable this check.

    Traceback (most recent call last):
      File "F:\WBC\automatic1111_dev\modules\call_queue.py", line 74, in f
        res = list(func(*args, **kwargs))
      File "F:\WBC\automatic1111_dev\modules\call_queue.py", line 53, in f
        res = func(*args, **kwargs)
      File "F:\WBC\automatic1111_dev\modules\call_queue.py", line 37, in f
        res = func(*args, **kwargs)
      File "F:\WBC\automatic1111_dev\modules\txt2img.py", line 109, in txt2img
        processed = processing.process_images(p)
      File "F:\WBC\automatic1111_dev\modules\processing.py", line 847, in process_images
        res = process_images_inner(p)
      File "F:\WBC\automatic1111_dev\extensions\sd-webui-controlnet\scripts\batch_hijack.py", line 59, in processing_process_images_hijack
        return getattr(processing, '__controlnet_original_process_images_inner')(p, *args, **kwargs)
      File "F:\WBC\automatic1111_dev\modules\processing.py", line 998, in process_images_inner
        devices.test_for_nans(samples_ddim, "unet")
      File "F:\WBC\automatic1111_dev\modules\devices.py", line 265, in test_for_nans
        raise NansException(message)
    modules.devices.NansException: A tensor with NaNs was produced in Unet. This could be either because there's not enough precision to represent the picture, or because your video card does not support half type. Try setting the "Upcast cross attention layer to float32" option in Settings > Stable Diffusion or using the --no-half commandline argument to fix this. Use --disable-nan-check commandline argument to disable this check.

---
DenOfEquity commented 5 days ago

The method used for CFG++ doesn't work in A1111, last_noise_uncond is set differently. I've done some testing to see if I can easily make it work, without success. I'll probably just add a check to not show the samplers in A1111.