mirror of
https://github.com/huggingface/diffusers.git
synced 2026-01-27 17:22:53 +03:00
Flax: Ignore PyTorch, ONNX files when they coexist with Flax weights (#5237)
Ignore PyTorch, ONNX files when they coexist with Flax weights
This commit is contained in:
@@ -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__
|
||||
|
||||
Reference in New Issue
Block a user