Reactivate the code
Browse files
sgm/modules/encoders/modules.py
CHANGED
|
@@ -32,8 +32,7 @@ from ...util import (
|
|
| 32 |
instantiate_from_config,
|
| 33 |
)
|
| 34 |
|
| 35 |
-
|
| 36 |
-
from CKPT_PTH import SDXL_CLIP1_PATH
|
| 37 |
|
| 38 |
class AbstractEmbModel(nn.Module):
|
| 39 |
def __init__(self):
|
|
@@ -531,8 +530,7 @@ class FrozenOpenCLIPEmbedder2(AbstractEmbModel):
|
|
| 531 |
model, _, _ = open_clip.create_model_and_transforms(
|
| 532 |
arch,
|
| 533 |
device=torch.device("cpu"),
|
| 534 |
-
|
| 535 |
-
pretrained=version,
|
| 536 |
)
|
| 537 |
del model.visual
|
| 538 |
self.model = model
|
|
|
|
| 32 |
instantiate_from_config,
|
| 33 |
)
|
| 34 |
|
| 35 |
+
from CKPT_PTH import SDXL_CLIP1_PATH, SDXL_CLIP2_CKPT_PTH
|
|
|
|
| 36 |
|
| 37 |
class AbstractEmbModel(nn.Module):
|
| 38 |
def __init__(self):
|
|
|
|
| 530 |
model, _, _ = open_clip.create_model_and_transforms(
|
| 531 |
arch,
|
| 532 |
device=torch.device("cpu"),
|
| 533 |
+
pretrained=version if SDXL_CLIP2_CKPT_PTH is None else SDXL_CLIP2_CKPT_PTH,
|
|
|
|
| 534 |
)
|
| 535 |
del model.visual
|
| 536 |
self.model = model
|