mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
ruff fixes
This commit is contained in:
parent
f81b8bc9f6
commit
9f9379682e
@ -57,11 +57,13 @@ def test_load_from_path(mock_context: InvocationContext, embedding_file: Path) -
|
||||
assert isinstance(loaded_model_3.model, dict)
|
||||
assert torch.equal(loaded_model_1.model["emb_params"], loaded_model_3.model["emb_params"])
|
||||
|
||||
|
||||
def test_load_from_dir(mock_context: InvocationContext, vae_directory: Path) -> None:
|
||||
loaded_model = mock_context.models.load_and_cache_model(vae_directory)
|
||||
assert isinstance(loaded_model, LoadedModelWithoutConfig)
|
||||
assert isinstance(loaded_model.model, AutoencoderTiny)
|
||||
|
||||
|
||||
def test_download_and_load(mock_context: InvocationContext) -> None:
|
||||
loaded_model_1 = mock_context.models.load_and_cache_model(
|
||||
"https://www.test.foo/download/test_embedding.safetensors"
|
||||
|
@ -60,6 +60,7 @@ def mm2_model_files(tmp_path_factory) -> Path:
|
||||
def embedding_file(mm2_model_files: Path) -> Path:
|
||||
return mm2_model_files / "test_embedding.safetensors"
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def vae_directory(mm2_model_files: Path) -> Path:
|
||||
return mm2_model_files / "taesdxl"
|
||||
|
Loading…
Reference in New Issue
Block a user