manbeast3b commited on
Commit
af5e6f7
·
verified ·
1 Parent(s): fb25ad1

Update src/pipeline.py

Browse files
Files changed (1) hide show
  1. src/pipeline.py +3 -3
src/pipeline.py CHANGED
@@ -139,13 +139,13 @@ def load_pipeline() -> Pipeline:
139
  quantize_(pipeline.vae, int8_weight_only())
140
  pipeline.vae = torch.compile(pipeline.vae, mode="max-autotune", fullgraph=True)
141
  with torch.inference_mode():
142
- for _ in range(2):
143
- pipeline(prompt="insensible, timbale, pothery, electrovital, actinogram, taxis, intracerebellar, centrodesmus", width=1024, height=1024, guidance_scale=0.0, num_inference_steps=4, max_sequence_length=256)
144
  torch.cuda.empty_cache()
145
  return pipeline
146
 
147
 
148
- sample = 1
149
  @torch.inference_mode()
150
  def infer(request: TextToImageRequest, pipeline: Pipeline, generator: Generator) -> Image:
151
  global sample
 
139
  quantize_(pipeline.vae, int8_weight_only())
140
  pipeline.vae = torch.compile(pipeline.vae, mode="max-autotune", fullgraph=True)
141
  with torch.inference_mode():
142
+ # for _ in range(2):
143
+ pipeline(prompt="insensible, timbale, pothery, electrovital, actinogram, taxis, intracerebellar, centrodesmus", width=1024, height=1024, guidance_scale=0.0, num_inference_steps=4, max_sequence_length=256)
144
  torch.cuda.empty_cache()
145
  return pipeline
146
 
147
 
148
+ sample = False
149
  @torch.inference_mode()
150
  def infer(request: TextToImageRequest, pipeline: Pipeline, generator: Generator) -> Image:
151
  global sample