From 94ff9e47801ded95f653f917efab39afc7127fc1 Mon Sep 17 00:00:00 2001 From: City <125218114+city96@users.noreply.github.com> Date: Mon, 31 Jul 2023 00:44:30 +0200 Subject: [PATCH] Remove v2 latent code v1 and v2 are compatible --- preprocess_latents.py | 2 +- train.py | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/preprocess_latents.py b/preprocess_latents.py index 43b32c7..8716f1c 100644 --- a/preprocess_latents.py +++ b/preprocess_latents.py @@ -47,5 +47,5 @@ def run_xl(file_path=None): if __name__ == "__main__": # run_v1("./vae/ft-mse-840000.ckpt") # probably doesn't reflect internal SD latent run_v1() - run_v2() + # run_v2() # v2 and v1 share a latent space run_xl("./vae/sdxl_v0.9.safetensors") # 1.0 has artifacts diff --git a/train.py b/train.py index bdf5091..3e8dbf5 100644 --- a/train.py +++ b/train.py @@ -20,11 +20,9 @@ latent_dst = "xl" class Latent: def __init__(self, md5, lat_src, lat_dst, dev): if lat_src == "v1": src = os.path.join("latent_v1", f"{md5}.npy") - if lat_src == "v2": src = os.path.join("latent_v2", f"{md5}.npy") if lat_src == "xl": src = os.path.join("latent_xl", f"{md5}.npy") if lat_dst == "v1": dst = os.path.join("latent_v1", f"{md5}.npy") - if lat_dst == "v2": dst = os.path.join("latent_v2", f"{md5}.npy") if lat_dst == "xl": dst = os.path.join("latent_xl", f"{md5}.npy") self.src = torch.from_numpy(np.load(src)).to(dev)