FluxPipeline error while loading Flux.1 dev

I tried with the sample code and I’m getting the same error

RuntimeError: Failed to import diffusers.pipelines.flux.pipeline_flux because of the following error (look up to see its traceback):
'Config' object has no attribute 'define_bool_state'