mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-01-11 23:00:51 +08:00
Further fixes to unit tests when running in GitHub
This commit is contained in:
parent
cb45b86b63
commit
acd98ceef3
@ -31,18 +31,30 @@ _latent = {"samples": torch.randn((1, 4, 64, 64))}
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def vae():
|
||||
vae, = VAELoader().load_vae("vae-ft-mse-840000-ema-pruned.safetensors")
|
||||
vae_file = "vae-ft-mse-840000-ema-pruned.safetensors"
|
||||
try:
|
||||
vae, = VAELoader().load_vae(vae_file)
|
||||
except FileNotFoundError:
|
||||
pytest.skip(f"{vae_file} not present on machine")
|
||||
return vae
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def clip(vae):
|
||||
return CheckpointLoaderSimple().load_checkpoint("v1-5-pruned-emaonly.safetensors")[1]
|
||||
def clip():
|
||||
checkpoint = "v1-5-pruned-emaonly.safetensors"
|
||||
try:
|
||||
return CheckpointLoaderSimple().load_checkpoint(checkpoint)[1]
|
||||
except FileNotFoundError:
|
||||
pytest.skip(f"{checkpoint} not present on machine")
|
||||
|
||||
|
||||
@pytest.fixture(scope="module")
|
||||
def model(clip, vae):
|
||||
return CheckpointLoaderSimple().load_checkpoint("v1-5-pruned-emaonly.safetensors")[0]
|
||||
def model(clip):
|
||||
checkpoint = "v1-5-pruned-emaonly.safetensors"
|
||||
try:
|
||||
return CheckpointLoaderSimple().load_checkpoint(checkpoint)[0]
|
||||
except FileNotFoundError:
|
||||
pytest.skip(f"{checkpoint} not present on machine")
|
||||
|
||||
|
||||
def test_clip_text_encode(clip):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user