Spaces:
Running
on
Zero
Running
on
Zero
Remove quantization
Browse files- optimization.py +0 -3
optimization.py
CHANGED
@@ -4,8 +4,6 @@
|
|
4 |
import spaces
|
5 |
import torch
|
6 |
from diffusers.pipelines.flux.pipeline_flux import FluxPipeline
|
7 |
-
from torchao.quantization import quantize_
|
8 |
-
from torchao.quantization import Float8DynamicActivationFloat8WeightConfig
|
9 |
|
10 |
from zerogpu import aoti_compile
|
11 |
|
@@ -43,7 +41,6 @@ def optimize_pipeline_(pipeline: FluxPipeline):
|
|
43 |
@spaces.GPU(duration=1500)
|
44 |
def compile_transformer():
|
45 |
pipeline.transformer.fuse_qkv_projections()
|
46 |
-
quantize_(pipeline.transformer, Float8DynamicActivationFloat8WeightConfig())
|
47 |
exported = torch.export.export(pipeline.transformer, args=(), kwargs=transformer_kwargs)
|
48 |
return aoti_compile(exported, inductor_configs)
|
49 |
|
|
|
4 |
import spaces
|
5 |
import torch
|
6 |
from diffusers.pipelines.flux.pipeline_flux import FluxPipeline
|
|
|
|
|
7 |
|
8 |
from zerogpu import aoti_compile
|
9 |
|
|
|
41 |
@spaces.GPU(duration=1500)
|
42 |
def compile_transformer():
|
43 |
pipeline.transformer.fuse_qkv_projections()
|
|
|
44 |
exported = torch.export.export(pipeline.transformer, args=(), kwargs=transformer_kwargs)
|
45 |
return aoti_compile(exported, inductor_configs)
|
46 |
|