MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / model_has_vae

Function model_has_vae

diffusers/examples/dreambooth/train_dreambooth.py:761–768  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

759
760
761def model_has_vae(args):
762 config_file_name = Path("vae", AutoencoderKL.config_name).as_posix()
763 if os.path.isdir(args.pretrained_model_name_or_path):
764 config_file_name = os.path.join(args.pretrained_model_name_or_path, config_file_name)
765 return os.path.isfile(config_file_name)
766 else:
767 files_in_repo = model_info(args.pretrained_model_name_or_path, revision=args.revision).siblings
768 return any(file.rfilename == config_file_name for file in files_in_repo)
769
770
771def tokenize_prompt(tokenizer, prompt, tokenizer_max_length=None):

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected