MCPcopy Index your code
hub / github.com/thygate/stable-diffusion-webui-depthmap-script / create_model

Function create_model

pix2pix/models/__init__.py:54–67  ·  view source on GitHub ↗

Create a model given the option. This function warps the class CustomDatasetDataLoader. This is the main interface between this package and 'train.py'/'test.py' Example: >>> from models import create_model >>> model = create_model(opt)

(opt)

Source from the content-addressed store, hash-verified

52
53
54def create_model(opt):
55 """Create a model given the option.
56
57 This function warps the class CustomDatasetDataLoader.
58 This is the main interface between this package and 'train.py'/'test.py'
59
60 Example:
61 >>> from models import create_model
62 >>> model = create_model(opt)
63 """
64 model = find_model_using_name(opt.model)
65 instance = model(opt)
66 print("model [%s] was created" % type(instance).__name__)
67 return instance

Callers 2

train.pyFile · 0.90
test.pyFile · 0.90

Calls 1

find_model_using_nameFunction · 0.85

Tested by

no test coverage detected