Upload handler.py
Browse files- handler.py +3 -2
handler.py
CHANGED
|
@@ -27,9 +27,10 @@ class EndpointHandler:
|
|
| 27 |
#repo_id = "NoMoreCopyright/FLUX.1-dev-test"
|
| 28 |
dtype = torch.bfloat16
|
| 29 |
quantization_config = TorchAoConfig("int8wo")
|
| 30 |
-
vae = AutoencoderKL.from_pretrained(repo_id, subfolder="vae", torch_dtype=dtype)
|
| 31 |
#transformer = FluxTransformer2DModel.from_pretrained(repo_id, subfolder="transformer", torch_dtype=dtype, quantization_config=quantization_config).to("cuda")
|
| 32 |
-
self.pipeline = FluxPipeline.from_pretrained(repo_id, vae=vae, torch_dtype=dtype, quantization_config=quantization_config)
|
|
|
|
| 33 |
if IS_COMPILE: self.pipeline = compile_pipeline(self.pipeline)
|
| 34 |
self.pipeline.to("cuda")
|
| 35 |
|
|
|
|
| 27 |
#repo_id = "NoMoreCopyright/FLUX.1-dev-test"
|
| 28 |
dtype = torch.bfloat16
|
| 29 |
quantization_config = TorchAoConfig("int8wo")
|
| 30 |
+
#vae = AutoencoderKL.from_pretrained(repo_id, subfolder="vae", torch_dtype=dtype)
|
| 31 |
#transformer = FluxTransformer2DModel.from_pretrained(repo_id, subfolder="transformer", torch_dtype=dtype, quantization_config=quantization_config).to("cuda")
|
| 32 |
+
#self.pipeline = FluxPipeline.from_pretrained(repo_id, vae=vae, torch_dtype=dtype, quantization_config=quantization_config)
|
| 33 |
+
self.pipeline = FluxPipeline.from_pretrained(repo_id, vae=None, torch_dtype=dtype, quantization_config=quantization_config)
|
| 34 |
if IS_COMPILE: self.pipeline = compile_pipeline(self.pipeline)
|
| 35 |
self.pipeline.to("cuda")
|
| 36 |
|