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

interrogate: Fix CLIP-interrogation on CPU

Open Patryk27 opened this issue 3 years ago • 0 comments

Currently, trying to perform CLIP interrogation on a CPU fails, saying:

RuntimeError: "slow_conv2d_cpu" not implemented for 'Half'

This merge request fixes this issue by detecting whether the target device is CPU and, if so, force-enabling --no-half and passing device="cpu" to clip.load() (which then does some extra tricks to ensure it works correctly on CPU).

Patryk27 avatar Oct 20 '22 17:10 Patryk27