Instructions to use hacnho/keras-modelscan-plot-gallery-bypass-poc with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use hacnho/keras-modelscan-plot-gallery-bypass-poc with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://hacnho/keras-modelscan-plot-gallery-bypass-poc") - Notebooks
- Google Colab
- Kaggle
Keras modelscan non-Lambda file-write bypass PoC
This repository contains a bounded .keras proof of concept for a modelscan
0.8.8 scanner gap. The model contains no Lambda layer. Instead, an
unconnected Functional keras.src.ops.core.Switch operation calls the exported
Keras API keras.visualization.plot_image_gallery during
keras.saving.load_model(..., safe_mode=True).
The modelscan Keras scanner only checks top-level layers[].class_name == "Lambda", so it reports the artifact clean even though a normal Keras load
writes /tmp/mfv_keras_plot_gallery_marker.png.
Reproduce
python -m venv .venv
. .venv/bin/activate
pip install -r requirements.txt
python reproduce.py
Expected:
picklescanexits0withInfected files: 0andDangerous globals: 0modelscanexits0withNo issues found!keras.saving.load_model(..., safe_mode=True)returnsFunctional/tmp/mfv_keras_plot_gallery_marker.pngis created
The side effect is limited to a 42x42 PNG marker under /tmp.
- Downloads last month
- 18
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support