Commit Graph

13 Commits

Author SHA1 Message Date
comfyanonymous
842ac7fb1b CLIP code refactor and improvements.
More generic clip model class that can be used on more types of text
encoders.

Don't apply weighting algorithm when weight is 1.0

Don't compute an empty token output when it's not needed.
2023-11-06 14:17:41 -05:00
comfyanonymous
9533904e39 Fix checkpoint loader with config. 2023-10-27 22:13:55 -04:00
comfyanonymous
3ad424ff47 SD1 and SD2 clip and tokenizer code is now more similar to the SDXL one. 2023-10-27 15:54:04 -04:00
comfyanonymous
7211e1dc26 Set last layer on SD2.x models uses the proper indexes now.
Before I had made the last layer the penultimate layer because some
checkpoints don't have them but it's not consistent with the others models.

TLDR: for SD2.x models only: CLIPSetLastLayer -1 is now -2.
2023-09-14 20:28:22 -04:00
comfyanonymous
1aff0360c3 Initialize text encoder to target dtype. 2023-08-23 21:01:15 -04:00
comfyanonymous
f67f1c99b8 Fix CLIPSetLastLayer not reverting when removed. 2023-07-15 01:41:21 -04:00
comfyanonymous
be891646cd Allow passing custom path to clip-g and clip-h. 2023-07-03 15:45:04 -04:00
comfyanonymous
08f1f7686c Support base SDXL and SDXL refiner models.
Large refactor of the model detection and loading code.
2023-06-22 13:03:50 -04:00
comfyanonymous
f089d4abc7 Some refactoring: from_tokens -> encode_from_tokens 2023-04-15 18:46:58 -04:00
comfyanonymous
b1a7c9ebf6 Embeddings/textual inversion support for SD2.x 2023-02-05 15:49:03 -05:00
comfyanonymous
1de5aa6a59 Add a CLIPLoader node to load standalone clip weights.
Put them in models/clip
2023-02-05 15:20:18 -05:00
comfyanonymous
56d802e1f3 Use transformers CLIP instead of open_clip for SD2.x
This should make things a bit cleaner.
2023-02-05 14:36:28 -05:00
comfyanonymous
220afe3310 Initial commit. 2023-01-16 22:37:14 -05:00