import ast import json from pathlib import Path import struct import sys import tempfile import threading from types import SimpleNamespace import unittest from unittest.mock import Mock, patch sys.path.insert(0, str(Path(__file__).resolve().parents[1])) from int8_backend import ( INT8_ANIMA_MODELS, INT8_COMMIT, MODEL_ALIASES, ensure_int8_node, load_anima_model, validate_int8_file, make_int8_loader, ) NAME = "tekitoMix_v32_INT8.safetensors" class TestInt8Backend(unittest.TestCase): def write_header(self, directory, header): path = Path(directory) / NAME data = json.dumps(header).encode() path.write_bytes(struct.pack("