Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
2b3a9b6
1
Parent(s):
fed73fd
modified: src/flux/util.py
Browse files- src/flux/util.py +2 -1
src/flux/util.py
CHANGED
|
@@ -136,7 +136,8 @@ def load_t5(device: str | torch.device = "cuda", max_length: int = 512) -> HFEmb
|
|
| 136 |
|
| 137 |
|
| 138 |
def load_clip(device: str | torch.device = "cuda") -> HFEmbedder:
|
| 139 |
-
return HFEmbedder("openai/clip-vit-base-patch32", max_length=77, is_clip=True, torch_dtype=torch.bfloat16).to(device)
|
|
|
|
| 140 |
|
| 141 |
|
| 142 |
def load_ae(name: str, device: str | torch.device = "cuda", hf_download: bool = True) -> AutoEncoder:
|
|
|
|
| 136 |
|
| 137 |
|
| 138 |
def load_clip(device: str | torch.device = "cuda") -> HFEmbedder:
|
| 139 |
+
#return HFEmbedder("openai/clip-vit-base-patch32", max_length=77, is_clip=True, torch_dtype=torch.bfloat16).to(device)
|
| 140 |
+
return HFEmbedder("models/text_encoder", max_length=77, is_clip=True, torch_dtype=torch.bfloat16).to(device)
|
| 141 |
|
| 142 |
|
| 143 |
def load_ae(name: str, device: str | torch.device = "cuda", hf_download: bool = True) -> AutoEncoder:
|