Instructions to use zeromodels/dfine-medium with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ZeroModels
How to use zeromodels/dfine-medium with ZeroModels:
# pip install -U zeromodels # ZeroModels is pure Keras 3, so pick a backend: "jax", "torch" or "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" from zeromodels import AutoZModel # AutoZModel reads the repo's model_type and loads the matching class. # For a task head use the matching loader, e.g. AutoZMImageClassify / AutoZMDetect / # AutoZMSemanticSegment / AutoZMTextGenerate (see zeromodels.auto). model = AutoZModel.from_weights("zeromodels/dfine-medium") - Keras
How to use zeromodels/dfine-medium with Keras:
# !pip install -U keras tensorflow huggingface_hub # Keras needs TensorFlow installed to read "hf://" paths, so the tensorflow backend is selected here; # "jax" and "torch" also work for computation once TensorFlow is installed. import os os.environ["KERAS_BACKEND"] = "tensorflow" import keras model = keras.saving.load_model("hf://zeromodels/dfine-medium") - Notebooks
- Google Colab
- Kaggle
Fix Collection badge link to the current zeromodels collection slug
Browse files15 unmodified lines161718192021222324252615 unmodified lines- tf---## ***See [our collection](https://huggingface.co/collections/zeromodels/d-fine-6a69d56d4bee59c3f582ebf0) for all versions of D-FINE.***# Run D-FINE with Keras 3: JAX, PyTorch, or TensorFlow[](https://github.com/IMvision12/ZeroModels) [](https://imvision12.github.io/ZeroModels/dfine/) [](https://huggingface.co/collections/zeromodels/d-fine-6a69d56d4bee59c3f582ebf0)# zeromodels/dfine-medium15 unmodified lines161718192021222324252615 unmodified lines- tf---## ***See [our collection](https://huggingface.co/collections/zeromodels/d-fine-6a8eaf8bc6d10755c3e14a80) for all versions of D-FINE.***# Run D-FINE with Keras 3: JAX, PyTorch, or TensorFlow[](https://github.com/IMvision12/ZeroModels) [](https://imvision12.github.io/ZeroModels/dfine/) [](https://huggingface.co/collections/zeromodels/d-fine-6a8eaf8bc6d10755c3e14a80)# zeromodels/dfine-medium
README.md+2-2