Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -56,13 +56,13 @@ print(f" device={device}")
|
|
| 56 |
|
| 57 |
model_ledger = ModelLedger(
|
| 58 |
dtype=torch.bfloat16,
|
| 59 |
-
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!")
|