Spaces:
Runtime error
Runtime error
Zhyever
commited on
Commit
·
23a0842
1
Parent(s):
fec478c
debug push
Browse files
estimator/models/patchfusion.py
CHANGED
@@ -61,17 +61,21 @@ class PatchFusion(BaselinePretrain, PyTorchModelHubMixin):
|
|
61 |
"""
|
62 |
nn.Module.__init__(self)
|
63 |
|
|
|
64 |
if isinstance(config, ConfigDict):
|
65 |
# convert a ConfigDict to a PretrainedConfig for hf saving
|
66 |
config = PretrainedConfig.from_dict(config.to_dict())
|
67 |
config.load_branch = True
|
|
|
68 |
else:
|
69 |
# used when loading patchfusion from hf model space
|
70 |
config = PretrainedConfig.from_dict(ConfigDict(**config).to_dict())
|
71 |
config.load_branch = False
|
72 |
config.coarse_branch.pretrained_resource = None
|
73 |
config.fine_branch.pretrained_resource = None
|
74 |
-
|
|
|
|
|
75 |
self.config = config
|
76 |
|
77 |
self.min_depth = config.min_depth
|
|
|
61 |
"""
|
62 |
nn.Module.__init__(self)
|
63 |
|
64 |
+
print(config)
|
65 |
if isinstance(config, ConfigDict):
|
66 |
# convert a ConfigDict to a PretrainedConfig for hf saving
|
67 |
config = PretrainedConfig.from_dict(config.to_dict())
|
68 |
config.load_branch = True
|
69 |
+
print("test1")
|
70 |
else:
|
71 |
# used when loading patchfusion from hf model space
|
72 |
config = PretrainedConfig.from_dict(ConfigDict(**config).to_dict())
|
73 |
config.load_branch = False
|
74 |
config.coarse_branch.pretrained_resource = None
|
75 |
config.fine_branch.pretrained_resource = None
|
76 |
+
print("test2")
|
77 |
+
|
78 |
+
print(config.coarse_branch)
|
79 |
self.config = config
|
80 |
|
81 |
self.min_depth = config.min_depth
|