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