dalle-mini icon indicating copy to clipboard operation
dalle-mini copied to clipboard

AttributeError: 'DalleBart' object has no attribute '_is_initialized'

Open Hamdan85 opened this issue 2 years ago • 4 comments

Initialization failure

wandb: You can find your API key in your browser here: https://wandb.ai/authorize

wandb: Paste an API key from your profile and hit enter, or press ctrl+c to quit: ··········

wandb: Appending key for api.wandb.ai to your netrc file: /root/.netrc
wandb: Downloading large artifact wzoooa1c:latest, 1672.79MB. 7 files... Done. 0:0:0

---------------------------------------------------------------------------

AttributeError                            Traceback (most recent call last)

[<ipython-input-4-0247091842e9>](https://localhost:8080/#) in <module>()
      6 # Load dalle-mini
      7 model = DalleBart.from_pretrained(
----> 8     DALLE_MODEL, revision=DALLE_COMMIT_ID, abstract_init=True
      9 )
     10 

3 frames

[/usr/local/lib/python3.7/dist-packages/transformers/modeling_flax_utils.py](https://localhost:8080/#) in params(self, params)
    189     def params(self, params: Union[Dict, FrozenDict]):
    190         # don't set params if the model is not initialized
--> 191         if not self._is_initialized:
    192             raise ValueError(
    193                 "`params` cannot be set from model when the model is created with `_do_init=False`. "

AttributeError: 'DalleBart' object has no attribute '_is_initialized'

Hamdan85 avatar Apr 19 '22 18:04 Hamdan85

What transformers version do you use? It may be an issue with the new changes in master branch.

Edit: oh, I guess you're using the colab which uses master branch

borisdayma avatar Apr 19 '22 19:04 borisdayma

I think the issue is fixed

borisdayma avatar Apr 19 '22 23:04 borisdayma

TypeError                              Traceback (most recent call last)
[<ipython-input-4-fa25138b8662>](https://localhost:8080/#) in <module>()
     10 
     11 # Load VQGAN
---> 12 vqgan = VQModel.from_pretrained(VQGAN_REPO, revision=VQGAN_COMMIT_ID)
     13 
     14 # Load CLIP

1 frames
[/usr/local/lib/python3.7/dist-packages/vqgan_jax/modeling_flax_vqgan.py](https://localhost:8080/#) in __init__(self, config, input_shape, seed, dtype, **kwargs)
    592       **kwargs,
    593   ):
--> 594     module = self.module_class(config=config, dtype=dtype, **kwargs)
    595     super().__init__(config,
    596                      module,

TypeError: __init__() got an unexpected keyword argument '_do_init' 

upjabir avatar Apr 20 '22 05:04 upjabir

Thanks, it was an issue from another repo but should be fixed now

borisdayma avatar Apr 20 '22 13:04 borisdayma