initial support for training textual inversion

This commit is contained in:
AUTOMATIC
2022-10-02 15:03:39 +03:00
parent 84e97a98c5
commit 820f1dc96b
19 changed files with 828 additions and 315 deletions

View File

@@ -32,10 +32,9 @@ def enable_tf32():
errors.run(enable_tf32, "Enabling TF32")
device = get_optimal_device()
device_codeformer = cpu if has_mps else device
dtype = torch.float16
def randn(seed, shape):
# Pytorch currently doesn't handle setting randomness correctly when the metal backend is used.