MCPcopy Index your code
hub / github.com/huggingface/diffusers / load_pt

Function load_pt

src/diffusers/utils/testing_utils.py:708–712  ·  view source on GitHub ↗
(url: str, map_location: str | None = None, weights_only: bool | None = True)

Source from the content-addressed store, hash-verified

706
707
708def load_pt(url: str, map_location: str | None = None, weights_only: bool | None = True):
709 response = requests.get(url, timeout=DIFFUSERS_REQUEST_TIMEOUT)
710 response.raise_for_status()
711 arry = torch.load(BytesIO(response.content), map_location=map_location, weights_only=weights_only)
712 return arry
713
714
715def load_image(image: str | PIL.Image.Image) -> PIL.Image.Image:

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
loadMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…