Testing2 / app.py
DonImages's picture
Update app.py
f09410f verified
raw
history blame
382 Bytes
import torch
# Check if CUDA (GPU) is available, otherwise use CPU
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
# Load the checkpoint
lora_path = "./lora_checkpoint.pt" # Path to the checkpoint file
checkpoint = torch.load(lora_path, map_location=device)
# Print the checkpoint keys to inspect the structure
print("Checkpoint keys:", checkpoint.keys())