ayushtewari / DFM

Implementation of "Diffusion with Forward Models: Solving Stochastic Inverse Problems Without Direct Supervision"

Home Page:https://diffusion-with-forward-models.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CNN_Refine not defined in DiT

1ssb opened this issue · comments

Hi, I am facing an issue with running the DFM code. It says that the DiT model seems not to have the cnn_refine defined. What is the workaround? Has anyone else faced this issue?

Input:

(dfm) Singularity> python experiment_scripts/re_results.py dataset=realestate batch_size=1 num_target=1 num_context=1 model_type=dit feats_cond=true sampling_type=simple max_scenes=10000 stage=test use_guidance=true guidance_scale=2.0 temperature=0.85 sampling_steps=50 name=re10k_inference image_size=128 checkpoint_path=files/re10k_model.pt wandb=local

Output:

...
model dit
Error executing job with overrides: ['dataset=realestate', 'batch_size=1', 'num_target=1', 'num_context=1', 'model_type=dit', 'feats_cond=true', 'sampling_type=simple', 'max_scenes=10000', 'stage=test', 'use_guidance=true', 'guidance_scale=2.0', 'temperature=0.85', 'sampling_steps=50', 'name=re10k_inference', 'image_size=128', 'checkpoint_path=files/re10k_model.pt', 'wandb=local']
Traceback (most recent call last):
  File "/home/usr/DFM/experiment_scripts/re_results.py", line 77, in train
    model = PixelNeRFModelCond(
  File "/home/usr/EK/DFM/PixelNeRF/pixelnerf_model_cond.py", line 70, in __init__
    self.enc = DiT(
  File "/home/usr/DFM/PixelNeRF/transformer/DiT.py", line 271, in __init__
    self.initialize_weights()
  File "/home/usr/DFM/PixelNeRF/transformer/DiT.py", line 319, in initialize_weights
    self.cnn_refine.weight.data.fill_(0)
  File "/home/usr/.conda/envs/dfm/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1614, in __getattr__
    raise AttributeError("'{}' object has no attribute '{}'".format(
AttributeError: 'DiT' object has no attribute 'cnn_refine'

Hi! How do you solve this problem?