Merge pull request #194 from AMorporkian/dowg-optimizer

Dowg optimizer
This commit is contained in:
Victor Hall 2023-06-10 12:13:12 -04:00 committed by GitHub
commit 5ca2bce2ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -303,6 +303,15 @@ class EveryDreamOptimizer():
)
elif optimizer_name == "adamw":
opt_class = torch.optim.AdamW
if "dowg" in optimizer_name:
# coordinate_dowg, scalar_dowg require no additional parameters. Epsilon is overrideable but is unnecessary in all stable diffusion training situations.
import dowg
if optimizer_name == "coordinate_dowg":
opt_class = dowg.CoordinateDoWG
elif optimizer_name == "scalar_dowg":
opt_class = dowg.ScalarDoWG
else:
raise ValueError(f"Unknown DoWG optimizer {optimizer_name}. Available options are coordinate_dowg and scalar_dowg")
elif optimizer_name in ["dadapt_adam", "dadapt_lion", "dadapt_sgd"]:
import dadaptation

View File

@ -13,6 +13,7 @@ xformers==0.0.20
pytorch-lightning==1.6.5
OmegaConf==2.2.3
numpy==1.23.5
dowg
lion-pytorch
compel~=1.1.3
OmegaConf==2.2.3