Unverified Commit 0c7cb9a6 authored by Pedro Cuenca's avatar Pedro Cuenca Committed by GitHub
Browse files

Flax: Ignore PyTorch, ONNX files when they coexist with Flax weights (#5237)

Ignore PyTorch, ONNX files when they coexist with Flax weights
parent 84e5cc59
......@@ -341,8 +341,8 @@ class FlaxDiffusionPipeline(ConfigMixin, PushToHubMixin):
allow_patterns = [os.path.join(k, "*") for k in folder_names]
allow_patterns += [FLAX_WEIGHTS_NAME, SCHEDULER_CONFIG_NAME, CONFIG_NAME, cls.config_name]
# make sure we don't download PyTorch weights, unless when using from_pt
ignore_patterns = "*.bin" if not from_pt else []
ignore_patterns = ["*.bin", "*.safetensors"] if not from_pt else []
ignore_patterns += ["*.onnx", "*.onnx_data", "*.xml", "*.pb"]
if cls != FlaxDiffusionPipeline:
requested_pipeline_class = cls.__name__
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment