Upload src/pipeline.py with huggingface_hub
Browse files- src/pipeline.py +1 -2
src/pipeline.py
CHANGED
@@ -10,7 +10,6 @@ from pipelines.models import TextToImageRequest
|
|
10 |
from torch import Generator
|
11 |
from torchao.quantization import quantize_, int8_weight_only
|
12 |
from transformers import T5EncoderModel, CLIPTextModel, logging
|
13 |
-
logging.set_verbosity_error()
|
14 |
|
15 |
|
16 |
Pipeline: TypeAlias = FluxPipeline
|
@@ -52,9 +51,9 @@ def load_pipeline() -> Pipeline:
|
|
52 |
|
53 |
pipeline.transformer.to(memory_format=torch.channels_last)
|
54 |
# quantize_(pipeline.vae, int8_weight_only())
|
|
|
55 |
pipeline.vae = torch.compile(pipeline.vae)
|
56 |
pipeline.to("cuda")
|
57 |
-
pipeline.set_progress_bar_config(disable=True)
|
58 |
|
59 |
for _ in range(2):
|
60 |
pipeline("cat", num_inference_steps=4)
|
|
|
10 |
from torch import Generator
|
11 |
from torchao.quantization import quantize_, int8_weight_only
|
12 |
from transformers import T5EncoderModel, CLIPTextModel, logging
|
|
|
13 |
|
14 |
|
15 |
Pipeline: TypeAlias = FluxPipeline
|
|
|
51 |
|
52 |
pipeline.transformer.to(memory_format=torch.channels_last)
|
53 |
# quantize_(pipeline.vae, int8_weight_only())
|
54 |
+
pipeline.vae.to(memory_format=torch.channels_last)
|
55 |
pipeline.vae = torch.compile(pipeline.vae)
|
56 |
pipeline.to("cuda")
|
|
|
57 |
|
58 |
for _ in range(2):
|
59 |
pipeline("cat", num_inference_steps=4)
|