[core] pass diffusers library name to kernels calls (#14441) · huggingface/diffusers@95c0d46 · GitHub
Skip to content

Commit 95c0d46

Browse files
authored
[core] pass diffusers library name to kernels calls (#14441)
up
1 parent be81dd0 commit 95c0d46

3 files changed

Lines changed: 13 additions & 3 deletions

File tree

‎src/diffusers/models/attention_dispatch.py‎

Lines changed: 7 additions & 1 deletion

‎src/diffusers/quantizers/gguf/utils.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import torch
2121
import torch.nn as nn
2222

23+
from ... import __version__
2324
from ...utils import is_accelerate_available, is_kernels_available, is_kernels_version
2425
from ...utils.constants import DIFFUSERS_TRUST_REMOTE_KERNELS
2526

@@ -46,7 +47,7 @@
4647
)
4748
# `kernels<0.14.0` has no `trust_remote_code` argument and executes the downloaded code unconditionally.
4849
trust_kwargs = {"trust_remote_code": True} if is_kernels_version(">=", "0.14.0") else {}
49-
ops = get_kernel("Isotr0py/ggml", **trust_kwargs)
50+
ops = get_kernel("Isotr0py/ggml", user_agent={"diffusers": __version__}, **trust_kwargs)
5051
else:
5152
ops = None
5253

‎src/diffusers/quantizers/nunchaku/utils.py‎

Lines changed: 4 additions & 1 deletion

0 commit comments

Comments
 (0)