atong01 / conditional-flow-matching

TorchCFM: a Conditional Flow Matching library
https://arxiv.org/abs/2302.00482
MIT License
1.25k stars 100 forks source link

AttributeError: 'functools.partial' object has no attribute 'parameters' when running image_cfm lightning train #141

Open c0g opened 3 weeks ago

c0g commented 3 weeks ago

Trying to run python src/train.py trainer=gpu +trainer.precision=16 experiment=image_cfm from runner, it seems like model is a partial at conditional-flow-matching/runner/src/utils/utils.py, line 152. I tried calling the function to initialize the model but it says:

*** TypeError: CFMLitModule.__init__() missing 1 required positional argument: 'datamodule'

I then tried passing python src/train.py trainer=gpu +trainer.precision=16 experiment=image_cfm datamodule=cifar but same problem, sadly.

I'd expect this to work due to the following lines in the runner's readme:

Train model with chosen experiment configuration from configs/experiment/ python src/train.py experiment=experiment_name

atong01 commented 1 week ago

Hi!

I'm not exactly sure what is going on here. This worked for me at one point. Note that this code for the images is missing a couple of tricks so in the paper we used something very similar to the example notebooks. Would recommend trying that instead.