English
John6666 commited on
Commit
0b6eeaf
·
verified ·
1 Parent(s): 05c7a14

Upload handler.py

Browse files
Files changed (1) hide show
  1. handler.py +2 -2
handler.py CHANGED
@@ -24,8 +24,8 @@ class EndpointHandler:
24
  dtype = torch.bfloat16
25
  quantization_config = TorchAoConfig("int4dq")
26
  vae = AutoencoderKL.from_pretrained(repo_id, subfolder="vae", torch_dtype=dtype)
27
- #transformer = FluxTransformer2DModel.from_pretrained(repo_id, subfolder="transformer", torch_dtype=dtype).to("cuda")
28
- self.pipeline = FluxPipeline.from_pretrained(repo_id, vae=vae, torch_dtype=dtype, quantization_config=quantization_config)
29
  if is_compile: self.pipeline = compile_pipeline(self.pipeline)
30
  self.pipeline.to("cuda")
31
 
 
24
  dtype = torch.bfloat16
25
  quantization_config = TorchAoConfig("int4dq")
26
  vae = AutoencoderKL.from_pretrained(repo_id, subfolder="vae", torch_dtype=dtype)
27
+ transformer = FluxTransformer2DModel.from_pretrained(repo_id, subfolder="transformer", torch_dtype=dtype, quantization_config=quantization_config).to("cuda")
28
+ self.pipeline = FluxPipeline.from_pretrained(repo_id, transformer=transformer, vae=vae, torch_dtype=dtype)
29
  if is_compile: self.pipeline = compile_pipeline(self.pipeline)
30
  self.pipeline.to("cuda")
31