MCPcopy
hub / github.com/TheLastBen/fast-stable-diffusion / replace

Method replace

Dreambooth/det.py:30–38  ·  view source on GitHub ↗
(self, obj, field, func)

Source from the content-addressed store, hash-verified

28 self.disable_clip = disable_clip
29
30 def replace(self, obj, field, func):
31 original = getattr(obj, field, None)
32 if original is None:
33 return None
34
35 self.replaced.append((obj, field, original))
36 setattr(obj, field, func)
37
38 return original
39
40 def __enter__(self):
41 def do_nothing(*args, **kwargs):

Callers 15

__enter__Method · 0.95
vparFunction · 0.80
renew_resnet_pathsFunction · 0.80
renew_vae_resnet_pathsFunction · 0.80
assign_to_checkpointFunction · 0.80
convert_keyFunction · 0.80
convert_vae_state_dictFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected