Update src/pipeline.py
Browse files- src/pipeline.py +3 -3
src/pipeline.py
CHANGED
|
@@ -26,9 +26,9 @@ def load_pipeline() -> Pipeline:
|
|
| 26 |
pipeline = FluxPipeline.from_pretrained(ids, revision=Revision, transformer=transformer, local_files_only=True, torch_dtype=torch.bfloat16,)
|
| 27 |
|
| 28 |
pipeline.transformer = torch.compile(pipeline.transformer, mode="max-autotune", fullgraph=True)
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
quantize_(pipeline.vae, int8_weight_only())
|
| 33 |
pipeline.to("cuda")
|
| 34 |
for _ in range(3):
|
|
|
|
| 26 |
pipeline = FluxPipeline.from_pretrained(ids, revision=Revision, transformer=transformer, local_files_only=True, torch_dtype=torch.bfloat16,)
|
| 27 |
|
| 28 |
pipeline.transformer = torch.compile(pipeline.transformer, mode="max-autotune", fullgraph=True)
|
| 29 |
+
basepath = os.path.join(HF_HUB_CACHE, "models--manbeast3b--Flux.1.schnell_eagle5_1_0.1_unst_7_2k/snapshots/b7a5ce1313327009093d3178220267d0cf669b76")
|
| 30 |
+
pipeline.vae.encoder.load_state_dict(torch.load(os.path.join(basepath, "encoder.pth")), strict=False)
|
| 31 |
+
pipeline.vae.decoder.load_state_dict(torch.load(os.path.join(basepath, "decoder.pth")), strict=False)
|
| 32 |
quantize_(pipeline.vae, int8_weight_only())
|
| 33 |
pipeline.to("cuda")
|
| 34 |
for _ in range(3):
|