Flax `.from_pretrained` fails to use `subfolder`
### System Info

- transformers 4.23.1
- Ubuntu 22.04
- jax 0.3.23
- huggingface_hub 10.0.1

`!transformers-cli env`:

<details>
<summary>ModuleNotFoundError: No module named 'datasets'</summary>

```
Traceback (most recent call last):
  File "🏠/venv.lab/bin/transformers-cli", line 5, in <module>
    from transformers.commands.transformers_cli import main
  File "🏠/venv.lab/lib/python3.10/site-packages/transformers/commands/transformers_cli.py", line 24, in <module>
    from .pt_to_tf import PTtoTFCommand
  File "🏠/venv.lab/lib/python3.10/site-packages/transformers/commands/pt_to_tf.py", line 21, in <module>
    from datasets import load_dataset
ModuleNotFoundError: No module named 'datasets'
```

</details>


### Who can help?

@patil-suraj for Flax and also CLIP


### Information

- My own modified scripts


### Reproduction

```py
from transformers import FlaxCLIPTextModel
text_encoder = FlaxCLIPTextModel.from_pretrained(
    "CompVis/stable-diffusion-v1-4",
    revision="flax",
    subfolder="text_encoder",
)
```

fails with 
> HTTPError: 404 Client Error: Not Found for url: 
https://huggingface.co/CompVis/stable-diffusion-v1-4/resolve/flax/config.json
> OSError: CompVis/stable-diffusion-v1-4 does not appear to have a file named config.json. Checkout 
'https://huggingface.co/CompVis/stable-diffusion-v1-4/flax' for available files.


### Expected behavior

a FlaxCLIPTextModel is created from https://huggingface.co/CompVis/stable-diffusion-v1-4/blob/flax/text_encoder/config.json

related: #18184 
note that this _does_ work with the non-Flax CLIPTextModel.<|||||>cc @sanchit-gandhi <|||||>Hey @keturn! The command `transformers-cli env` is failing as you don't have `datasets` installed. You can install `datasets` through:
```
pip install datasets
```
or from main: https://github.com/huggingface/datasets

With regards to the Flax `.from_pretrained()` method failing with `subfolder`, the PR you've mentioned implemented the `subfolder` feature for PyTorch but not Flax! Would you like to have a go at implementing this feature in Flax? The PR can largely follow the changes made in https://github.com/huggingface/transformers/pull/18184.<|||||>Hey @keturn, just following up here! Let me know if you'd be keen to open a PR - I can help you with with pointers and any questions you might have! Otherwise I can take look next week 🤗<|||||>oh, I don't expect to get to this anytime soon myself. <|||||>Hey @keturn - have added it to my TODOs!<|||||>This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

Please note that issues that do not follow the [contributing guidelines](https://github.com/huggingface/transformers/blob/main/CONTRIBUTING.md) are likely to be ignored.