Update src/pipeline.py
Browse files- src/pipeline.py +4 -3
src/pipeline.py
CHANGED
|
@@ -25,7 +25,6 @@ def empty_cache():
|
|
| 25 |
torch.cuda.empty_cache()
|
| 26 |
torch.cuda.reset_max_memory_allocated()
|
| 27 |
torch.cuda.reset_peak_memory_stats()
|
| 28 |
-
print(f"Flush took: {time.time() - start}")
|
| 29 |
|
| 30 |
def load_pipeline() -> Pipeline:
|
| 31 |
empty_cache()
|
|
@@ -39,11 +38,13 @@ def load_pipeline() -> Pipeline:
|
|
| 39 |
text_encoder = CLIPTextModel.from_pretrained(
|
| 40 |
ckpt_id, subfolder="text_encoder", torch_dtype=torch.bfloat16
|
| 41 |
)
|
| 42 |
-
############ Text Encoder 2 ############
|
| 43 |
text_encoder_2 = T5EncoderModel.from_pretrained(
|
| 44 |
-
"
|
|
|
|
|
|
|
| 45 |
)
|
| 46 |
|
|
|
|
| 47 |
model = FluxTransformer2DModel.from_pretrained(
|
| 48 |
"/home/sandbox/.cache/huggingface/hub/models--RobertML--FLUX.1-schnell-int8wo/snapshots/307e0777d92df966a3c0f99f31a6ee8957a9857a", torch_dtype=dtype, use_safetensors=False
|
| 49 |
)
|
|
|
|
| 25 |
torch.cuda.empty_cache()
|
| 26 |
torch.cuda.reset_max_memory_allocated()
|
| 27 |
torch.cuda.reset_peak_memory_stats()
|
|
|
|
| 28 |
|
| 29 |
def load_pipeline() -> Pipeline:
|
| 30 |
empty_cache()
|
|
|
|
| 38 |
text_encoder = CLIPTextModel.from_pretrained(
|
| 39 |
ckpt_id, subfolder="text_encoder", torch_dtype=torch.bfloat16
|
| 40 |
)
|
|
|
|
| 41 |
text_encoder_2 = T5EncoderModel.from_pretrained(
|
| 42 |
+
"HighCWu/FLUX.1-dev-4bit",
|
| 43 |
+
subfolder="text_encoder_2",
|
| 44 |
+
torch_dtype=torch.bfloat16,
|
| 45 |
)
|
| 46 |
|
| 47 |
+
|
| 48 |
model = FluxTransformer2DModel.from_pretrained(
|
| 49 |
"/home/sandbox/.cache/huggingface/hub/models--RobertML--FLUX.1-schnell-int8wo/snapshots/307e0777d92df966a3c0f99f31a6ee8957a9857a", torch_dtype=dtype, use_safetensors=False
|
| 50 |
)
|