stablediffusion吧 关注:25,244贴子:82,706
  • 12回复贴,共1

【求助】使用cn的open pose 无法出图,提示如下

只看楼主收藏回复


NansException: A tensor with all 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.
用时:7.6 sec.


IP属地:河南1楼2024-03-29 13:28回复


    IP属地:河南2楼2024-03-29 13:29
    回复
      File "F:\SD\sd-webui-aki-v4.6.1\modules\processing.py", line 1257, in sample
      samples = self.sampler.sample(self, x, conditioning, unconditional_conditioning, image_conditioning=self.txt2img_image_conditioning(x))
      File "F:\SD\sd-webui-aki-v4.6.1\modules\sd_samplers_kdiffusion.py", line 234, in sample
      samples = self.launch_sampling(steps, lambda: self.func(self.model_wrap_cfg, x, extra_args=self.sampler_extra_args, disable=False, callback=self.callback_state, **extra_params_kwargs))
      File "F:\SD\sd-webui-aki-v4.6.1\modules\sd_samplers_common.py", line 261, in launch_sampling
      return func()
      File "F:\SD\sd-webui-aki-v4.6.1\modules\sd_samplers_kdiffusion.py", line 234, in <lambda>
      samples = self.launch_sampling(steps, lambda: self.func(self.model_wrap_cfg, x, extra_args=self.sampler_extra_args, disable=False, callback=self.callback_state, **extra_params_kwargs))
      File "F:\SD\sd-webui-aki-v4.6.1\python\lib\site-packages\torch\utils\_contextlib.py", line 115, in decorate_context
      return func(*args, **kwargs)
      File "F:\SD\sd-webui-aki-v4.6.1\repositories\k-diffusion\k_diffusion\sampling.py", line 128, in sample_euler
      denoised = model(x, sigma_hat * s_in, **extra_args)
      File "F:\SD\sd-webui-aki-v4.6.1\python\lib\site-packages\torch\nn\modules\module.py", line 1518, in _wrapped_call_impl
      return self._call_impl(*args, **kwargs)
      File "F:\SD\sd-webui-aki-v4.6.1\python\lib\site-packages\torch\nn\modules\module.py", line 1527, in _call_impl
      return forward_call(*args, **kwargs)
      File "F:\SD\sd-webui-aki-v4.6.1\modules\sd_samplers_cfg_denoiser.py", line 269, in forward
      devices.test_for_nans(x_out, "unet")
      File "F:\SD\sd-webui-aki-v4.6.1\modules\devices.py", line 255, in test_for_nans
      raise NansException(message)
      modules.devices.NansException: A tensor with all 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.
      ---


      IP属地:河南3楼2024-03-29 13:29
      回复
        有没有懂的老哥


        IP属地:河南4楼2024-03-29 13:54
        回复
          那段英文最后不是教你如何设置了么。。。


          IP属地:广东来自iPhone客户端5楼2024-03-29 14:50
          收起回复


            IP属地:辽宁来自Android客户端6楼2024-05-15 13:01
            回复

              提高精度:在模型的设置中,将 “Upcast cross attention layer to float32” 选项勾选,这样可以将模型的某些层从半精度浮点数(float16)提升到全精度浮点数(float32),以提高计算精度。
              命令行参数:使用命令行参数 --no-half 来运行模型,这样可以禁用半精度浮点数的使用,确保所有计算都在全精度下进行。
              禁用NaN检查:作为临时解决方案,您可以使用 --disable-nan-check 命令行参数来禁用NaN检查。但请注意,这可能会掩盖潜在的问题,不是长久之计。


              IP属地:四川7楼2024-05-15 21:14
              收起回复
                4g的显卡,放弃挣扎,放弃治疗。显存不够。


                IP属地:广东来自Android客户端8楼2024-06-17 02:19
                收起回复