jokerbit commited on
Commit
f135dc2
·
verified ·
1 Parent(s): aabf9fe

Upload src/pipeline.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. src/pipeline.py +2 -1
src/pipeline.py CHANGED
@@ -111,7 +111,8 @@ def load_pipeline() -> FluxPipeline:
111
  vae=vae,
112
  text_encoder=text_encoder,
113
  text_encoder_2=text_encoder_2,
114
- torch_dtype=torch.bfloat16).to("cuda")
 
115
  empty_cache()
116
  pipe("cat", guidance_scale=0., max_sequence_length=256, num_inference_steps=4)
117
  return pipe
 
111
  vae=vae,
112
  text_encoder=text_encoder,
113
  text_encoder_2=text_encoder_2,
114
+ torch_dtype=torch.bfloat16)
115
+ pipe.enable_model_cpu_offload()
116
  empty_cache()
117
  pipe("cat", guidance_scale=0., max_sequence_length=256, num_inference_steps=4)
118
  return pipe