jokerbit commited on
Commit
007f3ae
·
verified ·
1 Parent(s): 34d338c

Upload src/pipeline.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. src/pipeline.py +3 -1
src/pipeline.py CHANGED
@@ -9,7 +9,8 @@ from huggingface_hub.constants import HF_HUB_CACHE
9
  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
 
13
 
14
 
15
  Pipeline: TypeAlias = FluxPipeline
@@ -53,6 +54,7 @@ def load_pipeline() -> Pipeline:
53
  # quantize_(pipeline.vae, int8_weight_only())
54
  pipeline.vae = torch.compile(pipeline.vae)
55
  pipeline.to("cuda")
 
56
 
57
  for _ in range(2):
58
  pipeline("cat", num_inference_steps=4)
 
9
  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
 
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)