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

Method __init__

diffusers/src/diffusers/callbacks.py:22–33  ·  view source on GitHub ↗
(self, cutoff_step_ratio=1.0, cutoff_step_index=None)

Source from the content-addressed store, hash-verified

20
21 @register_to_config
22 def __init__(self, cutoff_step_ratio=1.0, cutoff_step_index=None):
23 super().__init__()
24
25 if (cutoff_step_ratio is None and cutoff_step_index is None) or (
26 cutoff_step_ratio is not None and cutoff_step_index is not None
27 ):
28 raise ValueError("Either cutoff_step_ratio or cutoff_step_index should be provided, not both or none.")
29
30 if cutoff_step_ratio is not None and (
31 not isinstance(cutoff_step_ratio, float) or not (0.0 <= cutoff_step_ratio <= 1.0)
32 ):
33 raise ValueError("cutoff_step_ratio must be a float between 0.0 and 1.0.")
34
35 @property
36 def tensor_inputs(self) -> List[str]:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected