File size: 522 Bytes
b5fb94e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
from __future__ import annotations

import unittest
from pathlib import Path


HDRI_PATH = Path(__file__).resolve().parents[1] / "trellis" / "models" / "structured_latent_vae" / "hdri_encoder.py"


class HdriEncoderTorchLoadTests(unittest.TestCase):
    def test_load_weights_uses_full_unpickle_on_cpu(self) -> None:
        text = HDRI_PATH.read_text(encoding="utf-8")
        self.assertIn("weights_only=False", text)
        self.assertIn("torch.device(\"cpu\")", text)


if __name__ == "__main__":
    unittest.main()