diffusers-dynamic-offloader 0.1.0rc2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ddo_native_check.py +44 -0
- ddo_vmm_bootstrap.py +142 -0
- diffusers_dynamic_offloader/__init__.py +116 -0
- diffusers_dynamic_offloader/allocation_diagnostics.py +96 -0
- diffusers_dynamic_offloader/auxiliary_sources.py +126 -0
- diffusers_dynamic_offloader/backend.py +166 -0
- diffusers_dynamic_offloader/device_cache.py +60 -0
- diffusers_dynamic_offloader/dynamic_offload.py +3919 -0
- diffusers_dynamic_offloader/float8_compile.py +77 -0
- diffusers_dynamic_offloader/float8_loading.py +130 -0
- diffusers_dynamic_offloader/host_cache.py +101 -0
- diffusers_dynamic_offloader/host_memory.py +70 -0
- diffusers_dynamic_offloader/linear_convolution.py +105 -0
- diffusers_dynamic_offloader/metrics.py +217 -0
- diffusers_dynamic_offloader/metrics_journal.py +66 -0
- diffusers_dynamic_offloader/operator_diagnostics.py +167 -0
- diffusers_dynamic_offloader/profiles.py +495 -0
- diffusers_dynamic_offloader/quantized_sources.py +58 -0
- diffusers_dynamic_offloader/timing.py +129 -0
- diffusers_dynamic_offloader/vmm_model_arena.py +277 -0
- diffusers_dynamic_offloader/vmm_weight_store.py +840 -0
- diffusers_dynamic_offloader/weight_source_metadata.py +81 -0
- diffusers_dynamic_offloader/windows_file_reader.py +106 -0
- diffusers_dynamic_offloader-0.1.0rc2.dist-info/METADATA +90 -0
- diffusers_dynamic_offloader-0.1.0rc2.dist-info/RECORD +28 -0
- diffusers_dynamic_offloader-0.1.0rc2.dist-info/WHEEL +5 -0
- diffusers_dynamic_offloader-0.1.0rc2.dist-info/licenses/LICENSE +201 -0
- diffusers_dynamic_offloader-0.1.0rc2.dist-info/top_level.txt +3 -0
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"""Conservative loader-name association for immutable checkpoint byte ranges.
|
|
2
|
+
|
|
3
|
+
No tensor payload reads, copies, CUDA queries, architecture names or admission
|
|
4
|
+
policy. Payload conversions and unknown Transformers mapping APIs are refused.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from .vmm_weight_store import SafetensorSliceRegistry
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def associate_source_metadata(module, available, *, key_mapping=None):
|
|
11
|
+
registry = SafetensorSliceRegistry()
|
|
12
|
+
summary = {"bound": 0, "available": len(available), "resolver": "exact_names",
|
|
13
|
+
"rejected_storage_groups": 0, "missing_storage_groups": 0,
|
|
14
|
+
"ineligible_parameter_aliases": 0}
|
|
15
|
+
if getattr(module, "is_quantized", False) or getattr(module, "hf_quantizer", None) is not None:
|
|
16
|
+
summary["resolver"] = "unsupported_quantized_payload"
|
|
17
|
+
return registry, summary
|
|
18
|
+
try:
|
|
19
|
+
from transformers import PreTrainedModel
|
|
20
|
+
except ImportError:
|
|
21
|
+
PreTrainedModel = ()
|
|
22
|
+
if isinstance(module, PreTrainedModel):
|
|
23
|
+
try:
|
|
24
|
+
from transformers.conversion_mapping import get_model_conversion_mapping
|
|
25
|
+
from transformers.core_model_loading import WeightRenaming, rename_source_key
|
|
26
|
+
transforms = get_model_conversion_mapping(module, key_mapping=key_mapping)
|
|
27
|
+
except (ImportError, AttributeError, TypeError) as error:
|
|
28
|
+
summary["resolver"] = "unsupported_loader_mapping"
|
|
29
|
+
summary["diagnostic"] = str(error)
|
|
30
|
+
return registry, summary
|
|
31
|
+
if not isinstance(transforms, (list, tuple)):
|
|
32
|
+
summary["resolver"] = "unsupported_loader_mapping"
|
|
33
|
+
return registry, summary
|
|
34
|
+
if any(not isinstance(transform, WeightRenaming) for transform in transforms):
|
|
35
|
+
summary["resolver"] = "unsupported_payload_transform"
|
|
36
|
+
return registry, summary
|
|
37
|
+
names = {name: True for name, _ in module.named_parameters(remove_duplicate=False)}
|
|
38
|
+
|
|
39
|
+
def resolve(name):
|
|
40
|
+
return rename_source_key(name, transforms, [], module.base_model_prefix, names)[0]
|
|
41
|
+
|
|
42
|
+
summary["resolver"] = "transformers_name_mapping"
|
|
43
|
+
else:
|
|
44
|
+
if key_mapping is not None:
|
|
45
|
+
# Unknown loaders may implement mappings differently; never guess.
|
|
46
|
+
summary["resolver"] = "unsupported_loader_mapping"
|
|
47
|
+
return registry, summary
|
|
48
|
+
resolve = lambda name: name
|
|
49
|
+
|
|
50
|
+
mapped = {}
|
|
51
|
+
for name, descriptor in available.items():
|
|
52
|
+
mapped.setdefault(resolve(name), []).append(descriptor)
|
|
53
|
+
groups = {}
|
|
54
|
+
for name, parameter in module.named_parameters(remove_duplicate=False):
|
|
55
|
+
if parameter.device.type != "cpu" or not parameter.is_contiguous() or parameter.numel() == 0:
|
|
56
|
+
summary["ineligible_parameter_aliases"] += 1
|
|
57
|
+
continue
|
|
58
|
+
key = (parameter.data_ptr(), parameter.numel() * parameter.element_size())
|
|
59
|
+
group = groups.setdefault(key, {"parameters": [], "descriptors": []})
|
|
60
|
+
group["parameters"].append(parameter)
|
|
61
|
+
group["descriptors"].extend(mapped.get(name, []))
|
|
62
|
+
# Transactional per storage: reject conflicting source aliases/mappings,
|
|
63
|
+
# including different Parameters sharing the same pointer and byte length.
|
|
64
|
+
for group in groups.values():
|
|
65
|
+
candidates = set(group["descriptors"])
|
|
66
|
+
if not candidates:
|
|
67
|
+
summary["missing_storage_groups"] += 1
|
|
68
|
+
continue
|
|
69
|
+
if len(candidates) != 1:
|
|
70
|
+
summary["rejected_storage_groups"] += 1
|
|
71
|
+
continue
|
|
72
|
+
descriptor = next(iter(candidates))
|
|
73
|
+
# Validate every owner before publication; a shape/dtype conflict must
|
|
74
|
+
# not leave the first alias bound to a potentially wrong source.
|
|
75
|
+
probe = SafetensorSliceRegistry()
|
|
76
|
+
if not all(probe.bind(parameter, descriptor) for parameter in group["parameters"]):
|
|
77
|
+
summary["rejected_storage_groups"] += 1
|
|
78
|
+
continue
|
|
79
|
+
registry.bind(group["parameters"][0], descriptor)
|
|
80
|
+
summary["bound"] = registry.descriptor_count
|
|
81
|
+
return registry, summary
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"""Windows overlapped file reads into already pinned host memory.
|
|
2
|
+
|
|
3
|
+
This is a small file transport primitive for the optional DDO VMM runtime.
|
|
4
|
+
It uses only documented Win32 I/O through ``ctypes``; CUDA ownership remains
|
|
5
|
+
with the cuda-python/PyTorch caller. Non-Windows callers deliberately use the
|
|
6
|
+
ordinary Python file fallback.
|
|
7
|
+
"""
|
|
8
|
+
|
|
9
|
+
from __future__ import annotations
|
|
10
|
+
|
|
11
|
+
import ctypes
|
|
12
|
+
import os
|
|
13
|
+
import threading
|
|
14
|
+
from concurrent.futures import Future, ThreadPoolExecutor
|
|
15
|
+
from pathlib import Path
|
|
16
|
+
|
|
17
|
+
_CHUNK_BYTES = 2 * 1024**2
|
|
18
|
+
_WORKERS = 8
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class _OVERLAPPED(ctypes.Structure):
|
|
22
|
+
_fields_ = [
|
|
23
|
+
("Internal", ctypes.c_size_t),
|
|
24
|
+
("InternalHigh", ctypes.c_size_t),
|
|
25
|
+
("Offset", ctypes.c_uint32),
|
|
26
|
+
("OffsetHigh", ctypes.c_uint32),
|
|
27
|
+
("hEvent", ctypes.c_void_p),
|
|
28
|
+
]
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
class WindowsPinnedFileReader:
|
|
32
|
+
"""Concurrent positional reads into raw addresses of pinned CPU tensors."""
|
|
33
|
+
|
|
34
|
+
def __init__(self, *, workers: int = _WORKERS, chunk_bytes: int = _CHUNK_BYTES) -> None:
|
|
35
|
+
if os.name != "nt":
|
|
36
|
+
raise RuntimeError("WindowsPinnedFileReader is only available on Windows")
|
|
37
|
+
self.chunk_bytes = chunk_bytes
|
|
38
|
+
self._kernel32 = ctypes.WinDLL("kernel32", use_last_error=True)
|
|
39
|
+
self._kernel32.CreateFileW.argtypes = [ctypes.c_wchar_p, ctypes.c_uint32, ctypes.c_uint32, ctypes.c_void_p, ctypes.c_uint32, ctypes.c_uint32, ctypes.c_void_p]
|
|
40
|
+
self._kernel32.CreateFileW.restype = ctypes.c_void_p
|
|
41
|
+
self._kernel32.ReadFile.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_uint32, ctypes.c_void_p, ctypes.POINTER(_OVERLAPPED)]
|
|
42
|
+
self._kernel32.ReadFile.restype = ctypes.c_int
|
|
43
|
+
self._kernel32.GetOverlappedResult.argtypes = [ctypes.c_void_p, ctypes.POINTER(_OVERLAPPED), ctypes.POINTER(ctypes.c_uint32), ctypes.c_int]
|
|
44
|
+
self._kernel32.GetOverlappedResult.restype = ctypes.c_int
|
|
45
|
+
self._kernel32.CreateEventW.argtypes = [ctypes.c_void_p, ctypes.c_int, ctypes.c_int, ctypes.c_wchar_p]
|
|
46
|
+
self._kernel32.CreateEventW.restype = ctypes.c_void_p
|
|
47
|
+
self._kernel32.CloseHandle.argtypes = [ctypes.c_void_p]
|
|
48
|
+
self._kernel32.CloseHandle.restype = ctypes.c_int
|
|
49
|
+
self._handles: dict[Path, int] = {}
|
|
50
|
+
self._handles_lock = threading.Lock()
|
|
51
|
+
self._executor = ThreadPoolExecutor(max_workers=workers, thread_name_prefix="ddo-file-read")
|
|
52
|
+
# Request workers own only request orchestration; chunk reads stay on
|
|
53
|
+
# the I/O pool so a caller can overlap one staged shard range with GPU
|
|
54
|
+
# work without occupying its Python execution hook.
|
|
55
|
+
self._requests = ThreadPoolExecutor(max_workers=2, thread_name_prefix="ddo-file-request")
|
|
56
|
+
|
|
57
|
+
def _handle(self, path: Path) -> int:
|
|
58
|
+
with self._handles_lock:
|
|
59
|
+
existing = self._handles.get(path)
|
|
60
|
+
if existing is not None:
|
|
61
|
+
return existing
|
|
62
|
+
# GENERIC_READ, FILE_SHARE_READ, OPEN_EXISTING, FILE_FLAG_OVERLAPPED | FILE_FLAG_RANDOM_ACCESS.
|
|
63
|
+
handle = self._kernel32.CreateFileW(str(path), 0x80000000, 0x00000001, None, 3, 0x40000000 | 0x10000000, None)
|
|
64
|
+
if handle in (-1, 0, 0xFFFFFFFFFFFFFFFF, None, ctypes.c_void_p(-1).value):
|
|
65
|
+
raise ctypes.WinError(ctypes.get_last_error())
|
|
66
|
+
self._handles[path] = int(handle)
|
|
67
|
+
return int(handle)
|
|
68
|
+
|
|
69
|
+
def _read_chunk(self, handle: int, offset: int, destination: int, size: int) -> None:
|
|
70
|
+
event = self._kernel32.CreateEventW(None, True, False, None)
|
|
71
|
+
if not event:
|
|
72
|
+
raise ctypes.WinError(ctypes.get_last_error())
|
|
73
|
+
try:
|
|
74
|
+
overlapped = _OVERLAPPED(Offset=offset & 0xFFFFFFFF, OffsetHigh=offset >> 32, hEvent=event)
|
|
75
|
+
ok = self._kernel32.ReadFile(handle, destination, size, None, ctypes.byref(overlapped))
|
|
76
|
+
if not ok and ctypes.get_last_error() != 997: # ERROR_IO_PENDING
|
|
77
|
+
raise ctypes.WinError(ctypes.get_last_error())
|
|
78
|
+
read = ctypes.c_uint32()
|
|
79
|
+
if not self._kernel32.GetOverlappedResult(handle, ctypes.byref(overlapped), ctypes.byref(read), True):
|
|
80
|
+
raise ctypes.WinError(ctypes.get_last_error())
|
|
81
|
+
if read.value != size:
|
|
82
|
+
raise OSError(f"Short overlapped read: expected {size}, got {read.value}")
|
|
83
|
+
finally:
|
|
84
|
+
self._kernel32.CloseHandle(event)
|
|
85
|
+
|
|
86
|
+
def read_at(self, path: Path, offset: int, destination: int, size: int) -> None:
|
|
87
|
+
handle = self._handle(path)
|
|
88
|
+
futures = []
|
|
89
|
+
for done in range(0, size, self.chunk_bytes):
|
|
90
|
+
chunk = min(self.chunk_bytes, size - done)
|
|
91
|
+
futures.append(self._executor.submit(self._read_chunk, handle, offset + done, destination + done, chunk))
|
|
92
|
+
for future in futures:
|
|
93
|
+
future.result()
|
|
94
|
+
|
|
95
|
+
def read_at_async(self, path: Path, offset: int, destination: int, size: int) -> Future[None]:
|
|
96
|
+
"""Schedule a positional read into pinned storage without blocking the caller."""
|
|
97
|
+
|
|
98
|
+
return self._requests.submit(self.read_at, path, offset, destination, size)
|
|
99
|
+
|
|
100
|
+
def close(self) -> None:
|
|
101
|
+
self._requests.shutdown(wait=True)
|
|
102
|
+
self._executor.shutdown(wait=True)
|
|
103
|
+
with self._handles_lock:
|
|
104
|
+
for handle in self._handles.values():
|
|
105
|
+
self._kernel32.CloseHandle(handle)
|
|
106
|
+
self._handles.clear()
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: diffusers-dynamic-offloader
|
|
3
|
+
Version: 0.1.0rc2
|
|
4
|
+
Summary: Model-agnostic dynamic offload helpers for Diffusers-style low-VRAM inference.
|
|
5
|
+
Requires-Python: >=3.10
|
|
6
|
+
Description-Content-Type: text/markdown
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Requires-Dist: torch
|
|
9
|
+
Requires-Dist: diffusers
|
|
10
|
+
Requires-Dist: safetensors
|
|
11
|
+
Requires-Dist: accelerate
|
|
12
|
+
Requires-Dist: psutil
|
|
13
|
+
Provides-Extra: dev
|
|
14
|
+
Requires-Dist: pytest; extra == "dev"
|
|
15
|
+
Requires-Dist: ruff>=0.14.3; extra == "dev"
|
|
16
|
+
Provides-Extra: vmm
|
|
17
|
+
Requires-Dist: ddo-vmm-allocator==0.1.0rc2; extra == "vmm"
|
|
18
|
+
Requires-Dist: cuda-core>=1.2.0; extra == "vmm"
|
|
19
|
+
Requires-Dist: cuda-bindings>=13.4.0; extra == "vmm"
|
|
20
|
+
Provides-Extra: vmm-dev
|
|
21
|
+
Requires-Dist: pytest; extra == "vmm-dev"
|
|
22
|
+
Requires-Dist: ruff>=0.14.3; extra == "vmm-dev"
|
|
23
|
+
Requires-Dist: cuda-core>=1.2.0; extra == "vmm-dev"
|
|
24
|
+
Requires-Dist: cuda-bindings>=13.4.0; extra == "vmm-dev"
|
|
25
|
+
Requires-Dist: torch==2.12.1+cu132; (sys_platform == "win32" and python_version == "3.12") and extra == "vmm-dev"
|
|
26
|
+
Requires-Dist: torchvision==0.27.1+cu132; (sys_platform == "win32" and python_version == "3.12") and extra == "vmm-dev"
|
|
27
|
+
Requires-Dist: accelerate==1.14.0; extra == "vmm-dev"
|
|
28
|
+
Requires-Dist: transformers==5.15.1; extra == "vmm-dev"
|
|
29
|
+
Requires-Dist: einops==0.8.2; extra == "vmm-dev"
|
|
30
|
+
Requires-Dist: peft==0.20.0; extra == "vmm-dev"
|
|
31
|
+
Requires-Dist: diffusers==0.41.0; extra == "vmm-dev"
|
|
32
|
+
Provides-Extra: vmm-dev-linux
|
|
33
|
+
Requires-Dist: pytest; extra == "vmm-dev-linux"
|
|
34
|
+
Requires-Dist: ruff>=0.14.3; extra == "vmm-dev-linux"
|
|
35
|
+
Requires-Dist: cuda-core>=1.2.0; extra == "vmm-dev-linux"
|
|
36
|
+
Requires-Dist: cuda-bindings>=13.4.0; extra == "vmm-dev-linux"
|
|
37
|
+
Requires-Dist: cuda-toolkit[cccl,nvcc]==13.2.1; (sys_platform == "linux" and python_version == "3.12") and extra == "vmm-dev-linux"
|
|
38
|
+
Requires-Dist: torch==2.12.1+cu132; (sys_platform == "linux" and python_version == "3.12") and extra == "vmm-dev-linux"
|
|
39
|
+
Requires-Dist: torchvision==0.27.1+cu132; (sys_platform == "linux" and python_version == "3.12") and extra == "vmm-dev-linux"
|
|
40
|
+
Requires-Dist: accelerate==1.14.0; extra == "vmm-dev-linux"
|
|
41
|
+
Requires-Dist: transformers==5.15.1; extra == "vmm-dev-linux"
|
|
42
|
+
Requires-Dist: einops==0.8.2; extra == "vmm-dev-linux"
|
|
43
|
+
Requires-Dist: peft==0.20.0; extra == "vmm-dev-linux"
|
|
44
|
+
Requires-Dist: safetensors==0.8.0; extra == "vmm-dev-linux"
|
|
45
|
+
Requires-Dist: diffusers==0.41.0; extra == "vmm-dev-linux"
|
|
46
|
+
Dynamic: license-file
|
|
47
|
+
|
|
48
|
+
# Diffusers Dynamic Offloader
|
|
49
|
+
|
|
50
|
+
DDO is a model-agnostic offload manager for low-VRAM Diffusers-style inference.
|
|
51
|
+
It provides dense-weight routes and official Diffusers compatibility routes
|
|
52
|
+
while preserving quantized backend math.
|
|
53
|
+
|
|
54
|
+
## Getting started
|
|
55
|
+
|
|
56
|
+
Follow the [installation guide](docs/user/installation.md), then choose
|
|
57
|
+
[full-pipeline](docs/user/full-pipeline.md), [staged](docs/user/staged-pipeline.md)
|
|
58
|
+
or [Modular Diffusers](docs/user/modular-pipeline.md) integration.
|
|
59
|
+
|
|
60
|
+
Normal linear use requires no native allocator or compiler. Native VMM is optional:
|
|
61
|
+
it uses a matching packaged DLL/.so and bootstrap before CUDA initialization.
|
|
62
|
+
The installation guide describes local candidate wheels; it does not assume
|
|
63
|
+
they are available on a package index.
|
|
64
|
+
|
|
65
|
+
```python
|
|
66
|
+
from diffusers_dynamic_offloader import enable_offload
|
|
67
|
+
|
|
68
|
+
result = enable_offload(transformer, preset="auto", component="transformer")
|
|
69
|
+
transformer = result.module
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
This snippet selects the default linear route. See
|
|
73
|
+
[native VMM integration](docs/user/native-vmm.md) for its separate loading contract.
|
|
74
|
+
|
|
75
|
+
## Documentation
|
|
76
|
+
|
|
77
|
+
- [User guides](docs/user/README.md): installation, integration, presets and reporting.
|
|
78
|
+
- [Developer guides](docs/developer/README.md): architecture, diagnostics, builds and validation.
|
|
79
|
+
|
|
80
|
+
## Examples and benchmarks
|
|
81
|
+
|
|
82
|
+
Model runners, custom-block integration and measured comparisons live in
|
|
83
|
+
[DDO examples](https://github.com/DEVAIEXP/ddo-examples).
|
|
84
|
+
See the [test hardware](docs/developer/hardware.md) and
|
|
85
|
+
[support boundaries](docs/developer/support.md) when interpreting results.
|
|
86
|
+
Selected workloads do not establish universal speedups or model support.
|
|
87
|
+
|
|
88
|
+
## License
|
|
89
|
+
|
|
90
|
+
Apache-2.0; preserve required copyright, license and attribution notices.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
ddo_native_check.py,sha256=ckSbSGgUd46P0UK97EYbSs_Q-ot9U99xvahmLgbV_3A,1322
|
|
2
|
+
ddo_vmm_bootstrap.py,sha256=BjupA66MYYVk9E6ElXLzNXmq_2Br_6qOEyZu2nXduI8,5929
|
|
3
|
+
diffusers_dynamic_offloader/__init__.py,sha256=G7sx5XBv3_x8afPS1HetpoOxl3YaxTkG3j0Wr18QohI,4094
|
|
4
|
+
diffusers_dynamic_offloader/allocation_diagnostics.py,sha256=-EHVCl65JN_pHs4JirexdD6SkZVwdweUiVKaDiEBeoU,4376
|
|
5
|
+
diffusers_dynamic_offloader/auxiliary_sources.py,sha256=QkkyUZwOmKdihNfifsSOpr-0nbYGRCcx3MfzIDtmFTs,6919
|
|
6
|
+
diffusers_dynamic_offloader/backend.py,sha256=wVlAJwO2exoXAAh1NeMW-QBmzLuPSTc-yUyUsoZsbgE,8522
|
|
7
|
+
diffusers_dynamic_offloader/device_cache.py,sha256=ZmINbhqNIUW3Sat4l00wNhfsLxocPHX44yDqcgXcZ8U,2825
|
|
8
|
+
diffusers_dynamic_offloader/dynamic_offload.py,sha256=GGqRuwWI0O-6wLwLkdl5tUajqSNXAjDidA76_yq7CWw,194386
|
|
9
|
+
diffusers_dynamic_offloader/float8_compile.py,sha256=u7-qqDQ7SURsCl3imnqihU8K0bPu7A6APKVR2XpGn3U,3792
|
|
10
|
+
diffusers_dynamic_offloader/float8_loading.py,sha256=l25ITDNzalVGm_8md9FN00A-4PSPJG2r8tZy5ee_Uk4,7589
|
|
11
|
+
diffusers_dynamic_offloader/host_cache.py,sha256=qVX4dvMS1o2a1Pd1-7OVU8QFzEnC09olZhH3TsU8D6M,4632
|
|
12
|
+
diffusers_dynamic_offloader/host_memory.py,sha256=83Wt68A3hB3q8efwA4hkit9MgR2XqINpqkJWPg1uuno,4033
|
|
13
|
+
diffusers_dynamic_offloader/linear_convolution.py,sha256=ubKXNmAFVHmSHa1UmrwO99kP_PV5jJUSoMth7QAlk2A,5658
|
|
14
|
+
diffusers_dynamic_offloader/metrics.py,sha256=tsx_0rK9jugqsPnTucy7sqYwYU-1WHSoSNmD_nFwGTY,12637
|
|
15
|
+
diffusers_dynamic_offloader/metrics_journal.py,sha256=Y8B3XEpefahuGGZvGa56emLctDwP1zBoTK-bnMPQTYM,2807
|
|
16
|
+
diffusers_dynamic_offloader/operator_diagnostics.py,sha256=xNX0fCiUitbM4CUiC8YHYXiCIoNL0EsI-zBjQ7oUeZA,8095
|
|
17
|
+
diffusers_dynamic_offloader/profiles.py,sha256=fFDy7F7G3GxeRnmSE3QJNpIV43v4qFzMM0zFfygI46k,25092
|
|
18
|
+
diffusers_dynamic_offloader/quantized_sources.py,sha256=OFvio0LPpc2FwoYIG0EyhKmkVHUUB_-AAy9Tf_FQr_c,2744
|
|
19
|
+
diffusers_dynamic_offloader/timing.py,sha256=-mXwDlHIFzZbDWTNW0DLmn42Yp3_dje-v4yuFzeIyuc,5690
|
|
20
|
+
diffusers_dynamic_offloader/vmm_model_arena.py,sha256=olt6M0ULY38G0J4psJ36gc2xdQcsIFVj4142pnWf3bg,10797
|
|
21
|
+
diffusers_dynamic_offloader/vmm_weight_store.py,sha256=YCz6dN8PEOKc_h9wZBNKUwFIB-cFfHPzy803UJntN6o,36229
|
|
22
|
+
diffusers_dynamic_offloader/weight_source_metadata.py,sha256=jH_atPY1KscDbmCyHhiV014lzm9httxHu-m5eaWgRVY,3980
|
|
23
|
+
diffusers_dynamic_offloader/windows_file_reader.py,sha256=5XDL1zbCZUGHntgX0zWLIWVA6w6SMdR5ayMI3BOHNjQ,5307
|
|
24
|
+
diffusers_dynamic_offloader-0.1.0rc2.dist-info/licenses/LICENSE,sha256=0EEVAUOojxLhLxALmORw-AA0cxzWVt29eePPDD8viiQ,11465
|
|
25
|
+
diffusers_dynamic_offloader-0.1.0rc2.dist-info/METADATA,sha256=8ZljnqAJUXHuw56XOMUjdREyFh80H0_evRf8ksvD_cE,4181
|
|
26
|
+
diffusers_dynamic_offloader-0.1.0rc2.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
|
|
27
|
+
diffusers_dynamic_offloader-0.1.0rc2.dist-info/top_level.txt,sha256=VoKVzbP4HyIFSbHA7s2N20R1mjXCjmFfl7N5gQG3sxw,63
|
|
28
|
+
diffusers_dynamic_offloader-0.1.0rc2.dist-info/RECORD,,
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for describing the origin of the Work and
|
|
141
|
+
reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Support. While redistributing the Work or
|
|
166
|
+
Derivative Works thereof, You may choose to offer, and charge a
|
|
167
|
+
fee for, acceptance of support, warranty, indemnity, or other
|
|
168
|
+
liability obligations and/or rights consistent with this License.
|
|
169
|
+
However, in accepting such obligations, You may act only on Your
|
|
170
|
+
own behalf and on Your sole responsibility, not on behalf of any
|
|
171
|
+
other Contributor, and only if You agree to indemnify, defend,
|
|
172
|
+
and hold each Contributor harmless for any liability incurred by,
|
|
173
|
+
or claims asserted against, such Contributor by reason of your
|
|
174
|
+
accepting any such warranty or support.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright 2026 Alvaro Somoza
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
200
|
+
implied. See the License for the specific permissions and
|
|
201
|
+
limitations under the License.
|