English
John6666 commited on
Commit
a68e3f2
·
verified ·
1 Parent(s): 3fcc2ae

Upload handler.py

Browse files
Files changed (1) hide show
  1. handler.py +3 -3
handler.py CHANGED
@@ -22,10 +22,10 @@ class EndpointHandler:
22
  repo_id = "camenduru/FLUX.1-dev-diffusers"
23
  #repo_id = "NoMoreCopyright/FLUX.1-dev-test"
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
 
 
22
  repo_id = "camenduru/FLUX.1-dev-diffusers"
23
  #repo_id = "NoMoreCopyright/FLUX.1-dev-test"
24
  dtype = torch.bfloat16
25
+ quantization_config = TorchAoConfig("int8wo")
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, 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