diff options
author | Patryk Wychowaniec <pwychowaniec@pm.me> | 2022-10-20 19:22:59 +0200 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2022-10-21 09:52:12 +0300 |
commit | 7157e5d064741fa57ca81a2c6432a651f21ee82f (patch) | |
tree | b55a09468a5611fc90d7487512db3a077b278d0b /modules/textual_inversion/dataset.py | |
parent | 5f4fec307c14dd7f817244ffa92e8a4a64abed0b (diff) |
interrogate: Fix CLIP-interrogation on CPU
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).
Diffstat (limited to 'modules/textual_inversion/dataset.py')
0 files changed, 0 insertions, 0 deletions