MCPcopy Create free account
hub / github.com/TheLastBen/fast-stable-diffusion / render

Method render

Dreambooth/blocks.py:89–103  ·  view source on GitHub ↗

Adds self into appropriate BlockContext

(self)

Source from the content-addressed store, hash-verified

87 check_deprecated_parameters(self.__class__.__name__, **kwargs)
88
89 def render(self):
90 """
91 Adds self into appropriate BlockContext
92 """
93 if Context.root_block is not None and self._id in Context.root_block.blocks:
94 raise DuplicateBlockError(
95 f"A block with id: {self._id} has already been rendered in the current Blocks."
96 )
97 if Context.block is not None:
98 Context.block.add(self)
99 if Context.root_block is not None:
100 Context.root_block.blocks[self._id] = self
101 if hasattr(self, "temp_dir"):
102 Context.root_block.temp_dirs.add(self.temp_dir)
103 return self
104
105 def unrender(self):
106 """

Callers 1

__init__Method · 0.95

Calls 1

addMethod · 0.45

Tested by

no test coverage detected