manbeast3b commited on
Commit
2df90bd
·
verified ·
1 Parent(s): e360995

Update src/pipeline.py

Browse files
Files changed (1) hide show
  1. src/pipeline.py +2 -3
src/pipeline.py CHANGED
@@ -46,7 +46,7 @@ def load_pipeline() -> Pipeline:
46
  dtype, device = torch.bfloat16, "cuda"
47
  vae = AutoencoderKL.from_pretrained(
48
  ckpt_id, subfolder="vae", torch_dtype=torch.bfloat16
49
- ).to(device)
50
  quantize_(vae, int8_weight_only())
51
 
52
  # prune.l1_unstructured(module, 'weight', amount=0.1)
@@ -54,8 +54,7 @@ def load_pipeline() -> Pipeline:
54
  ckpt_id,
55
  vae=vae,
56
  torch_dtype=dtype,
57
- ).to(device)
58
-
59
 
60
  # # List comprehensions to get devices of modules
61
  # cpu_modules = [name for name, module in pipeline.transformer.named_modules() if next(module.parameters(), None) is None or next(module.parameters()).device == torch.device('cpu')]
 
46
  dtype, device = torch.bfloat16, "cuda"
47
  vae = AutoencoderKL.from_pretrained(
48
  ckpt_id, subfolder="vae", torch_dtype=torch.bfloat16
49
+ )
50
  quantize_(vae, int8_weight_only())
51
 
52
  # prune.l1_unstructured(module, 'weight', amount=0.1)
 
54
  ckpt_id,
55
  vae=vae,
56
  torch_dtype=dtype,
57
+ )
 
58
 
59
  # # List comprehensions to get devices of modules
60
  # cpu_modules = [name for name, module in pipeline.transformer.named_modules() if next(module.parameters(), None) is None or next(module.parameters()).device == torch.device('cpu')]