MCPcopy Index your code
hub / github.com/TheLastBen/fast-stable-diffusion / BlockFunction

Class BlockFunction

Dreambooth/blocks.py:326–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

324
325
326class BlockFunction:
327 def __init__(
328 self,
329 fn: Optional[Callable],
330 inputs: List[Component],
331 outputs: List[Component],
332 preprocess: bool,
333 postprocess: bool,
334 inputs_as_dict: bool,
335 ):
336 self.fn = fn
337 self.inputs = inputs
338 self.outputs = outputs
339 self.preprocess = preprocess
340 self.postprocess = postprocess
341 self.total_runtime = 0
342 self.total_runs = 0
343 self.inputs_as_dict = inputs_as_dict
344
345 def __str__(self):
346 return str(
347 {
348 "fn": getattr(self.fn, "__name__", "fn")
349 if self.fn is not None
350 else None,
351 "preprocess": self.preprocess,
352 "postprocess": self.postprocess,
353 }
354 )
355
356 def __repr__(self):
357 return str(self)
358
359
360class class_or_instancemethod(classmethod):

Callers 2

set_event_triggerMethod · 0.70
renderMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected