MCPcopy
hub / github.com/huggingface/diffusers / test_save_load_model

Method test_save_load_model

tests/others/test_flashpack.py:34–39  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

32
33 @require_flashpack
34 def test_save_load_model(self):
35 model = AutoModel.from_pretrained(self.model_id, subfolder="transformer")
36 with tempfile.TemporaryDirectory() as temp_dir:
37 model.save_pretrained(temp_dir, use_flashpack=True)
38 self.assertTrue((pathlib.Path(temp_dir) / "model.flashpack").exists())
39 model = AutoModel.from_pretrained(temp_dir, use_flashpack=True)
40
41 @require_flashpack
42 def test_save_load_pipeline(self):

Callers

nothing calls this directly

Calls 3

existsMethod · 0.80
from_pretrainedMethod · 0.45
save_pretrainedMethod · 0.45

Tested by

no test coverage detected