multimodalart HF Staff commited on
Commit
0f112bb
·
verified ·
1 Parent(s): feecb48

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -56,13 +56,13 @@ print(f" device={device}")
56
 
57
  model_ledger = ModelLedger(
58
  dtype=torch.bfloat16,
59
- device=device,
60
  checkpoint_path=checkpoint_path,
61
  gemma_root_path=gemma_local_path,
62
  )
63
 
64
  # Load text encoder once and keep it in memory
65
- text_encoder = model_ledger.text_encoder()
66
 
67
  print("=" * 80)
68
  print("Text encoder loaded and ready!")
 
56
 
57
  model_ledger = ModelLedger(
58
  dtype=torch.bfloat16,
59
+ device="cpu",
60
  checkpoint_path=checkpoint_path,
61
  gemma_root_path=gemma_local_path,
62
  )
63
 
64
  # Load text encoder once and keep it in memory
65
+ text_encoder = model_ledger.text_encoder().to("cuda")
66
 
67
  print("=" * 80)
68
  print("Text encoder loaded and ready!")