Function
load_pt
(url: str, map_location: str | None = None, weights_only: bool | None = True)
Source from the content-addressed store, hash-verified
| 706 | |
| 707 | |
| 708 | def 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 | |
| 715 | def load_image(image: str | PIL.Image.Image) -> PIL.Image.Image: |
Callers
nothing calls this directly
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…