gojasper / flash-diffusion

Official implementation of ⚡ Flash Diffusion ⚡: Accelerating Any Conditional Diffusion Model for Few Steps Image Generation
https://gojasper.github.io/flash-diffusion-project/
Other
397 stars 26 forks source link

DataPipeline setup missing self.setup() #6

Open bkari2 opened 1 month ago

bkari2 commented 1 month ago

in flashdiffusion.src.flash.data.datasets.dataset.py

If not done then

data_module.train_pipeline = DataPipeline(
            config=data_module.train_config,
            filters_mappers=data_module.train_filters_mappers,
        )
data_module.train_dataloader()

returns

Cell In[43], [line 145](vscode-notebook-cell:?execution_count=43&line=145)
    [142](vscode-notebook-cell:?execution_count=43&line=142) def dataloader(self):
    [143](vscode-notebook-cell:?execution_count=43&line=143)     # return the loader
    [144](vscode-notebook-cell:?execution_count=43&line=144)     return wds.WebLoader(
--> [145](vscode-notebook-cell:?execution_count=43&line=145)         self.pipeline,
    [146](vscode-notebook-cell:?execution_count=43&line=146)         batch_size=None,
    [147](vscode-notebook-cell:?execution_count=43&line=147)         num_workers=self.config.num_workers,
    [148](vscode-notebook-cell:?execution_count=43&line=148)     )

AttributeError: 'DataPipeline' object has no attribute 'pipeline'

Please let me know if you have a better option. Otherwise, I am happy to do the PR.