Commit Graph

12 Commits

Author SHA1 Message Date
Patryk Wychowaniec
7157e5d064 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).
2022-10-21 09:52:12 +03:00
AUTOMATIC
b99d3cf6dd make CLIP interrogate ranks output sane values 2022-10-17 08:41:02 +03:00
DenkingOfficial
58f3ef7733 Fix CLIP Interrogator and disable ranks for it 2022-10-17 08:01:59 +03:00
brkirch
fdef8253a4 Add 'interrogate' and 'all' choices to --use-cpu
* Add 'interrogate' and 'all' choices to --use-cpu
* Change type for --use-cpu argument to str.lower, so that choices are case insensitive
2022-10-14 16:31:39 +03:00
Greg Fuller
d717eb079c Interrogate: add option to include ranks in output
Since the UI also allows users to specify ranks, it can be useful to show people what ranks are being returned by interrogate

This can also give much better results when feeding the interrogate results back into either img2img or txt2img, especially when trying to generate a specific character or scene for which you have a similar concept image

Testing Steps:

Launch Webui with command line arg: --deepdanbooru
Navigate to img2img tab, use interrogate DeepBooru, verify tags appears as before. Use "Interrogate CLIP", verify prompt appears as before
Navigate to Settings tab, enable new option, click "apply settings"
Navigate to img2img, Interrogate DeepBooru again, verify that weights appear and are properly formatted. Note that "Interrogate CLIP" prompt is still unchanged
In my testing, this change has no effect to "Interrogate CLIP", as it seems to generate a sentence-structured caption, and not a set of tags.

(reproduce changes from 6ed4faac46)
2022-10-11 18:02:41 -07:00
Aidan Holland
432782163a chore: Fix typos 2022-10-08 22:42:30 +03:00
AUTOMATIC
c7543d4940 preprocessing for textual inversion added 2022-10-02 22:41:21 +03:00
AUTOMATIC
d4dc4c1c63 fix for Error Interrogating when user has garbage in text files #479 2022-09-15 15:13:06 +03:00
AUTOMATIC
c50fa7a932 remove mistaken error message 2022-09-12 12:26:37 +03:00
AUTOMATIC
9bb20be090 memory optimization for CLIP interrogator
changed default cfg_scale to a higher value
2022-09-12 11:55:27 +03:00
AUTOMATIC
8fb9c57ed6 add half() supporrt for CLIP interrogation 2022-09-11 23:24:24 +03:00
AUTOMATIC
f194457229 CLIP interrogator 2022-09-11 18:48:36 +03:00