import pytorch_lightning as L from configs.config import Config from utils.data_loader import get_dataloaders from models.diffusion import Diffusion # Get dataloaders _, _, test_loader = get_dataloaders(Config) # Initialize model checkpoint_path = Config.training["save_dir"] + "example.ckpt" latent_diffusion_model = Diffusion.load_from_checkpoint(checkpoint_path, config=Config, latent_dim=Config.latent_dim) # Initialize trainer trainer = L.Trainer(gpus=Config.training["gpus"], precision=Config.training["precision"]) # Test the model trainer.test(latent_diffusion_model, test_loader)