[core] pass diffusers library name to kernels calls by sayakpaul · Pull Request #14441 · huggingface/diffusers · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/diffusers/models/attention_dispatch.py
3 changes: 2 additions & 1 deletion src/diffusers/quantizers/gguf/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import torch
import torch.nn as nn

from ... import __version__
from ...utils import is_accelerate_available, is_kernels_available, is_kernels_version
from ...utils.constants import DIFFUSERS_TRUST_REMOTE_KERNELS

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

Expand Down
5 changes: 4 additions & 1 deletion src/diffusers/quantizers/nunchaku/utils.py
Loading