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
6 changes: 6 additions & 0 deletions optimum/neuron/modeling_diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import shutil
from abc import abstractmethod
from collections import OrderedDict
from contextlib import contextmanager
from dataclasses import asdict
from pathlib import Path
from tempfile import TemporaryDirectory
Expand Down Expand Up @@ -1321,6 +1322,11 @@ def forward(
outputs = (outputs,)
return outputs

# Dummy context manager
@contextmanager
def cache_context(self, name: str):
yield


class NeuronModelVaeEncoder(_NeuronDiffusionModelPart):
def __init__(
Expand Down
12 changes: 6 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ tests = [
"sentencepiece",
"datasets",
"sacremoses",
"diffusers>=0.31.0, <=0.34.0",
"diffusers==0.35.*",
"safetensors",
"sentence-transformers >= 2.2.0",
"peft==0.16.0",
"peft==0.17.0",
"trl==0.11.4",
"compel",
"rjieba",
Expand All @@ -75,15 +75,15 @@ tests = [
"mediapipe",
"timm >= 1.0.0",
"hf_transfer",
"torchcodec",
"torchcodec < 0.6.0",
]
quality = [
"ruff",
"isort",
]
training = [
"trl == 0.11.4",
"peft == 0.16.0",
"peft == 0.17.0",
"evaluate == 0.4.3",
"neuronx_distributed==0.13.14393",
]
Expand All @@ -106,8 +106,8 @@ neuronx = [
"libneuronxla==2.2.4410.0",
]
diffusers = [
"diffusers>=0.31.0, <=0.34.0",
"peft==0.16.0",
"diffusers==0.35.*",
"peft==0.17.0",
]
sentence-transformers = [
"sentence-transformers >= 2.2.0",
Expand Down
Loading