Palette-Image-to-Image-Diffusion-Models
Palette-Image-to-Image-Diffusion-Models copied to clipboard
sr3 network
Hello,
I tried to run the inpainting.json with sr3(I changed from guided_diffusion to sr3 in the config file) but I got the following error:
praser.py", line 49, in init_obj
raise NotImplementedError('{} [{:s}() form {:s}] not recognized.'.format(init_type, class_name, file_name))
NotImplementedError: Network [Network() form models.network] not recognized.
does sr3 works?
Maybe there are some minor problems, can you provide a more detailed log?
I encountered the same issue and found the solution.
If you scroll a bit the error message, you will find there's a problem with UNet
initialization.
This is because UNet
in guided_diffusion
and in sr3
has different UNet
and they require different inputs.
You should adjust the config so it's setting sr3
UNet
initialization parameters:
https://github.com/Janspiry/Palette-Image-to-Image-Diffusion-Models/blob/136b29f58d0af6e5db9f3655d2891f5a855fcdaa/models/sr3_modules/unet.py#L6-L19
For example you could try setting config json as:
...
"module_name": "sr3", // sr3 | guided_diffusion
"unet": {
"in_channel": 6,
"out_channel": 3,
"inner_channel": 64,
"norm_groups": 16,
"channel_mults": [
1,
2,
4,
8,
// 8,
// 16,
16
],
"attn_res": [
8
// 16
],
"res_blocks": 1,
"dropout": 0,
"image_size": 256
},
...