Skip to content

Commit 54ab164

Browse files
update huggingface app to use the new models
1 parent 06c25bf commit 54ab164

File tree

2 files changed

+18
-20
lines changed

2 files changed

+18
-20
lines changed

configs/experiments/diffusion/ddim.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
"restorator": {
99
"sampler": {
1010
"name": "DDIM",
11-
"stochasticity": 0.0,
11+
"stochasticity": 1.0,
12+
"project noise": true,
1213
"steps skip type": {
1314
"name": "uniform",
1415
"K": 5

huggingface/app.py

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -35,36 +35,33 @@ def run2inference(run, runName=None):
3535
runConfig['huggingface'] = { "name": runName, "wandb": run.fullId }
3636
return list(inference_from_config(runConfig))
3737

38-
def SPModels(project):
39-
bestPerGroup = project.groups(onlyBest=True)
40-
bestPerGroup = {k: v for k, v in bestPerGroup.items() if k.startswith('Single-pass | ')}
41-
for run in bestPerGroup.values():
42-
for model in run2inference(run):
43-
yield model
44-
continue
45-
return
4638

4739
def main(args):
4840
WBProject = CWBProject('green_wizard/FranNet')
4941
folder = os.path.dirname(os.path.abspath(__file__))
5042
# load list of models from the folder "configs"
51-
models = modelsFrom(os.path.join(folder, 'configs'))
52-
# add some models from W&B
53-
models.extend( list(SPModels(WBProject)) )
43+
models = []
5444
bestGroups = WBProject.groups(onlyBest=True)
5545
customRuns = [
56-
'DDPM v2 | Basic',
57-
# some of "DDPM-V, encoder v2, masking-8, residual"
58-
'DDPM-V, encoder v2, masking-8, residual, RGB',
59-
'DDPM-V, encoder v2, masking-8, residual, LAB',
60-
'DDPM-V, encoder v2, masking-8, residual, LAB, structured',
61-
# autorregressive direction
46+
'Single-pass | Basic+masking-8',
47+
'Single-pass | Basic+masking-uniform',
48+
'Single-pass | Basic+masking-dynamic',
49+
'Single-pass | Basic',
50+
'Single-pass | Basic+masking-4',
51+
'Single-pass | Basic+masking-32',
52+
'Single-pass | Basic+masking-16',
6253
'AR | direction',
6354
'AR direction, encoder v2, masking-8, residual, LAB, structured',
6455
'AR direction, masking-8, RGB, extra(grayscale), structured',
65-
56+
'DDPM-V, encoder v2, residual, RGB, extra(grayscale), structured, T-start',
57+
'DDPM-V, encoder v2, residual, RGB, extra(grayscale), structured, huge',
58+
'Single-pass | Basic+masking-16, encoder v2, huber, RGB, residual, extra(grayscale), structured',
59+
'Huge++',
60+
'DDPM-V | ONLY SR | huber, RGB, residual, extra(grayscale), structured, T start',
61+
'DDPM-V | ONLY SR | encoder v2, huber, RGB, residual, extra(grayscale), structured, T start',
62+
'AR direction | ONLY SR | masking-16, encoder v2, huber, RGB, residual, extra(grayscale), structured',
63+
'Single-pass | ONLY SR | Basic+masking-16, encoder v2, huber, RGB, residual, extra(grayscale), structured',
6664
'huge++, only SR',
67-
'Huge++'
6865
]
6966
for runName in customRuns:
7067
models.extend( run2inference(bestGroups[runName]) )

0 commit comments

Comments
 (0)