mirror of
https://github.com/huggingface/diffusers.git
synced 2026-01-29 07:22:12 +03:00
fix VAE loading issue in train_dreambooth (#7632)
* fixed vae loading issue #7619 * rerun make style && make quality * bring back model_has_vae and add change \ to / in config_file_name on windows os to make match work * add missing import platform * bring back import model_info * make config_file_name OS independent * switch to using Path.as_posix() to resolve OS dependence * improve style --------- Co-authored-by: Sayak Paul <spsayakpaul@gmail.com> Co-authored-by: bssrdf <bssrdf@gmail.com> Co-authored-by: Dhruv Nair <dhruv.nair@gmail.com>
This commit is contained in:
@@ -759,7 +759,7 @@ class PromptDataset(Dataset):
|
||||
|
||||
|
||||
def model_has_vae(args):
|
||||
config_file_name = os.path.join("vae", AutoencoderKL.config_name)
|
||||
config_file_name = Path("vae", AutoencoderKL.config_name).as_posix()
|
||||
if os.path.isdir(args.pretrained_model_name_or_path):
|
||||
config_file_name = os.path.join(args.pretrained_model_name_or_path, config_file_name)
|
||||
return os.path.isfile(config_file_name)
|
||||
|
||||
Reference in New Issue
Block a user