[Diffusion] Match rotary_embedding module name style (#19179)
This commit is contained in:
@@ -26,10 +26,10 @@
|
|||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
"""Rotary Positional Embeddings — unified public API (drop-in replacement)."""
|
"""Rotary Positional Embeddings — unified public API (drop-in replacement)."""
|
||||||
|
|
||||||
from ._base import RotaryEmbedding
|
from .base import RotaryEmbedding
|
||||||
from ._factory import get_rope, get_rotary_pos_embed
|
from .factory import get_rope, get_rotary_pos_embed
|
||||||
from ._mrope import NDRotaryEmbedding
|
from .mrope import NDRotaryEmbedding
|
||||||
from ._utils import (
|
from .utils import (
|
||||||
_apply_rotary_emb,
|
_apply_rotary_emb,
|
||||||
apply_flashinfer_rope_qk_inplace,
|
apply_flashinfer_rope_qk_inplace,
|
||||||
)
|
)
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ import torch
|
|||||||
|
|
||||||
from sglang.multimodal_gen.runtime.layers.custom_op import CustomOp
|
from sglang.multimodal_gen.runtime.layers.custom_op import CustomOp
|
||||||
|
|
||||||
from ._utils import _apply_rotary_emb
|
from .utils import _apply_rotary_emb
|
||||||
|
|
||||||
|
|
||||||
@CustomOp.register("rotary_embedding")
|
@CustomOp.register("rotary_embedding")
|
||||||
+2
-2
@@ -5,8 +5,8 @@ from typing import Any
|
|||||||
|
|
||||||
import torch
|
import torch
|
||||||
|
|
||||||
from ._base import LinearScalingRotaryEmbedding, RotaryEmbedding
|
from .base import LinearScalingRotaryEmbedding, RotaryEmbedding
|
||||||
from ._mrope import NDRotaryEmbedding, _to_tuple
|
from .mrope import NDRotaryEmbedding, _to_tuple
|
||||||
|
|
||||||
_ROPE_DICT: dict[tuple, RotaryEmbedding] = {}
|
_ROPE_DICT: dict[tuple, RotaryEmbedding] = {}
|
||||||
_ND_ROPE_CACHE: "OrderedDict[tuple, NDRotaryEmbedding]" = OrderedDict()
|
_ND_ROPE_CACHE: "OrderedDict[tuple, NDRotaryEmbedding]" = OrderedDict()
|
||||||
Reference in New Issue
Block a user