Skip to content

Commit 7add115

Browse files
committed
up
1 parent 1396672 commit 7add115

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/diffusers/modular_pipelines/modular_pipeline.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,15 @@ def to_dict(self) -> Dict[str, Any]:
210210
"""
211211
return {**self.__dict__, "inputs": self.inputs, "intermediates": self.intermediates}
212212

213+
def __getattr__(self, name):
214+
"""
215+
Allow attribute access to intermediate values.
216+
If an attribute is not found in the object, look for it in the intermediates dict.
217+
"""
218+
if name in self.intermediates:
219+
return self.intermediates[name]
220+
raise AttributeError(f"'{self.__class__.__name__}' object has no attribute '{name}'")
221+
213222
def __repr__(self):
214223
def format_value(v):
215224
if hasattr(v, "shape") and hasattr(v, "dtype"):
@@ -874,7 +883,7 @@ def __call__(self, pipeline, state: PipelineState) -> PipelineState:
874883
break
875884

876885
if block is None:
877-
logger.warning(f"skipping auto block: {self.__class__.__name__}")
886+
logger.info(f"skipping auto block: {self.__class__.__name__}")
878887
return pipeline, state
879888

880889
try:

0 commit comments

Comments
 (0)