MCPcopy
hub / github.com/thygate/stable-diffusion-webui-depthmap-script / flatten

Function flatten

dzoedepth/utils/config.py:257–268  ·  view source on GitHub ↗
(config, except_keys=('bin_conf'))

Source from the content-addressed store, hash-verified

255
256
257def flatten(config, except_keys=('bin_conf')):
258 def recurse(inp):
259 if isinstance(inp, dict):
260 for key, value in inp.items():
261 if key in except_keys:
262 yield (key, value)
263 if isinstance(value, dict):
264 yield from recurse(value)
265 else:
266 yield (key, value)
267
268 return dict(list(recurse(config)))
269
270
271def split_combined_args(kwargs):

Callers 5

trainMethod · 0.90
update_model_configFunction · 0.85
get_configFunction · 0.85
flattenMethod · 0.85
load_modelsMethod · 0.85

Calls 1

recurseFunction · 0.85

Tested by

no test coverage detected