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

Function prior_image

diffusers/scripts/convert_shap_e_to_diffusers.py:948–964  ·  view source on GitHub ↗
(*, args, checkpoint_map_location)

Source from the content-addressed store, hash-verified

946
947
948def prior_image(*, args, checkpoint_map_location):
949 print("loading prior_image")
950
951 print(f"load checkpoint from {args.prior_image_checkpoint_path}")
952 prior_checkpoint = torch.load(args.prior_image_checkpoint_path, map_location=checkpoint_map_location)
953
954 prior_model = prior_image_model_from_original_config()
955
956 prior_diffusers_checkpoint = prior_image_original_checkpoint_to_diffusers_checkpoint(prior_model, prior_checkpoint)
957
958 del prior_checkpoint
959
960 load_prior_checkpoint_to_model(prior_diffusers_checkpoint, prior_model)
961
962 print("done loading prior_image")
963
964 return prior_model
965
966
967def renderer(*, args, checkpoint_map_location):

Callers 1

Tested by

no test coverage detected