Open davidboxboro opened 1 year ago
Hi, The performance ceiling depends on the model's generative power. So I recommended using the conditional model for ImageNet Inpainting.
Thank you, that works!
I want to ask something. I use imagenet_256_cc.yml conditional simplified inpainting way, but there is error. But, when I try the SVD one, it can.
ERROR - main.py - 2023-04-23 14:03:16,556 - Traceback (most recent call last):
File "main.py", line 166, in main
runner.sample(args.simplified)
File "/workspace/DDNM/guided_diffusion/diffusion.py", line 284, in sample
self.simplified_ddnm_plus(model, cls_fn)
File "/workspace/DDNM/guided_diffusion/diffusion.py", line 470, in simplified_ddnm_plus
et = model(xt, t)
File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/torch/nn/parallel/data_parallel.py", line 166, in forward
return self.module(*inputs[0], **kwargs[0])
File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/workspace/DDNM/guided_diffusion/unet.py", line 644, in forward
assert (y is not None) == (
AssertionError: must specify y if and only if the model is class-conditional
Thank you
I want to ask something. I use imagenet_256_cc.yml conditional simplified inpainting way, but there is error. But, when I try the SVD one, it can.
ERROR - main.py - 2023-04-23 14:03:16,556 - Traceback (most recent call last): File "main.py", line 166, in main runner.sample(args.simplified) File "/workspace/DDNM/guided_diffusion/diffusion.py", line 284, in sample self.simplified_ddnm_plus(model, cls_fn) File "/workspace/DDNM/guided_diffusion/diffusion.py", line 470, in simplified_ddnm_plus et = model(xt, t) File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(*input, **kwargs) File "/opt/conda/lib/python3.8/site-packages/torch/nn/parallel/data_parallel.py", line 166, in forward return self.module(*inputs[0], **kwargs[0]) File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(*input, **kwargs) File "/workspace/DDNM/guided_diffusion/unet.py", line 644, in forward assert (y is not None) == ( AssertionError: must specify y if and only if the model is class-conditional
Thank you
It seems that you did not provide condition y, usually a class number.
How to provide y? When I provide number, the error say int has no attribute shape. When I add --class 950 in command, it still didnt work like in hq demo.
ERROR - main.py - 2023-04-23 14:17:28,881 - Traceback (most recent call last):
File "main.py", line 166, in main
runner.sample(args.simplified)
File "/workspace/DDNM/guided_diffusion/diffusion.py", line 284, in sample
self.simplified_ddnm_plus(model, cls_fn)
File "/workspace/DDNM/guided_diffusion/diffusion.py", line 470, in simplified_ddnm_plus
et = model(xt, t)
File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/opt/conda/lib/python3.8/site-packages/torch/nn/parallel/data_parallel.py", line 166, in forward
return self.module(*inputs[0], **kwargs[0])
File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl
return forward_call(*input, **kwargs)
File "/workspace/DDNM/guided_diffusion/unet.py", line 652, in forward
assert y.shape == (x.shape[0],)
AttributeError: 'int' object has no attribute 'shape'
How to provide y? When I provide number, the error say int has no attribute shape. When I add --class 950 in command, it still didnt work like in hq demo.
ERROR - main.py - 2023-04-23 14:17:28,881 - Traceback (most recent call last): File "main.py", line 166, in main runner.sample(args.simplified) File "/workspace/DDNM/guided_diffusion/diffusion.py", line 284, in sample self.simplified_ddnm_plus(model, cls_fn) File "/workspace/DDNM/guided_diffusion/diffusion.py", line 470, in simplified_ddnm_plus et = model(xt, t) File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(*input, **kwargs) File "/opt/conda/lib/python3.8/site-packages/torch/nn/parallel/data_parallel.py", line 166, in forward return self.module(*inputs[0], **kwargs[0]) File "/opt/conda/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1110, in _call_impl return forward_call(*input, **kwargs) File "/workspace/DDNM/guided_diffusion/unet.py", line 652, in forward assert y.shape == (x.shape[0],) AttributeError: 'int' object has no attribute 'shape'
Maybe you need to define a tensor y, not an int number. what about y=torch.tensor([950])
, with batch size 1?
When I run the unconditional ImageNet model on sample ImageNet validation images, the inpainted portion is often very blurry. Is there a way to fix this?