mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
add concept of repo variant
This commit is contained in:
committed by
psychedelicious
parent
f505ec64ba
commit
a1307b9f2e
@ -3,7 +3,7 @@ from pathlib import Path
|
||||
import pytest
|
||||
|
||||
from invokeai.backend import BaseModelType
|
||||
from invokeai.backend.model_management.model_probe import VaeFolderProbe
|
||||
from invokeai.backend.model_manager.probe import VaeFolderProbe
|
||||
|
||||
|
||||
@pytest.mark.parametrize(
|
||||
@ -20,3 +20,10 @@ def test_get_base_type(vae_path: str, expected_type: BaseModelType, datadir: Pat
|
||||
probe = VaeFolderProbe(sd1_vae_path)
|
||||
base_type = probe.get_base_type()
|
||||
assert base_type == expected_type
|
||||
repo_variant = probe.get_repo_variant()
|
||||
assert repo_variant == 'default'
|
||||
|
||||
def test_repo_variant(datadir: Path):
|
||||
probe = VaeFolderProbe(datadir / "vae" / "taesdxl-fp16")
|
||||
repo_variant = probe.get_repo_variant()
|
||||
assert repo_variant == 'fp16'
|
||||
|
37
tests/test_model_probe/vae/taesdxl-fp16/config.json
Normal file
37
tests/test_model_probe/vae/taesdxl-fp16/config.json
Normal file
@ -0,0 +1,37 @@
|
||||
{
|
||||
"_class_name": "AutoencoderTiny",
|
||||
"_diffusers_version": "0.20.0.dev0",
|
||||
"act_fn": "relu",
|
||||
"decoder_block_out_channels": [
|
||||
64,
|
||||
64,
|
||||
64,
|
||||
64
|
||||
],
|
||||
"encoder_block_out_channels": [
|
||||
64,
|
||||
64,
|
||||
64,
|
||||
64
|
||||
],
|
||||
"force_upcast": false,
|
||||
"in_channels": 3,
|
||||
"latent_channels": 4,
|
||||
"latent_magnitude": 3,
|
||||
"latent_shift": 0.5,
|
||||
"num_decoder_blocks": [
|
||||
3,
|
||||
3,
|
||||
3,
|
||||
1
|
||||
],
|
||||
"num_encoder_blocks": [
|
||||
1,
|
||||
3,
|
||||
3,
|
||||
3
|
||||
],
|
||||
"out_channels": 3,
|
||||
"scaling_factor": 1.0,
|
||||
"upsampling_scaling_factor": 2
|
||||
}
|
Reference in New Issue
Block a user