MCPcopy Create free account
hub / github.com/YesianRohn/TextSSR / forward

Method forward

diffusers/src/diffusers/models/attention.py:1196–1202  ·  view source on GitHub ↗
(self, hidden_states: torch.Tensor, *args, **kwargs)

Source from the content-addressed store, hash-verified

1194 self.net.append(nn.Dropout(dropout))
1195
1196 def forward(self, hidden_states: torch.Tensor, *args, **kwargs) -> torch.Tensor:
1197 if len(args) > 0 or kwargs.get("scale", None) is not None:
1198 deprecation_message = "The `scale` argument is deprecated and will be ignored. Please remove it, as passing it will raise an error in the future. `scale` should directly be passed while calling the underlying pipeline component i.e., via `cross_attention_kwargs`."
1199 deprecate("scale", "1.0.0", deprecation_message)
1200 for module in self.net:
1201 hidden_states = module(hidden_states)
1202 return hidden_states

Callers

nothing calls this directly

Calls 1

deprecateFunction · 0.85

Tested by

no test coverage detected