TheLastBen / fast-stable-diffusion

fast-stable-diffusion + DreamBooth
MIT License
7.42k stars 1.28k forks source link

Error merging checkpoints: Error while serializing: IoError(Os { code: 2, kind: NotFound, message: "No such file or directory" }) #2830

Open NissanSUTUTU opened 2 months ago

NissanSUTUTU commented 2 months ago

I can not merge checkpoints... Why? How can i fix this? image

Samael-1976 commented 1 month ago

same here! The problem is also trying pruning a model with model toolkit The same problem is usint Super Merger:

Traceback (most recent call last): File "/usr/local/lib/python3.10/dist-packages/gradio/routes.py", line 488, in run_predict output = await app.get_blocks().process_api( File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1431, in process_api result = await self.call_function( File "/usr/local/lib/python3.10/dist-packages/gradio/blocks.py", line 1103, in call_function prediction = await anyio.to_thread.run_sync( File "/usr/local/lib/python3.10/dist-packages/anyio/to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "/usr/local/lib/python3.10/dist-packages/anyio/_backends/_asyncio.py", line 807, in run result = context.run(func, args) File "/usr/local/lib/python3.10/dist-packages/gradio/utils.py", line 707, in wrapper response = f(args, **kwargs) File "/content/drive/MyDrive/SDXL/stable-diffusion-webui/extensions/stable-diffusion-webui-model-toolkit/scripts/toolkit_gui.py", line 533, in do_save save(model, METADATA, filename) File "/content/drive/MyDrive/SDXL/stable-diffusion-webui/extensions/stable-diffusion-webui-model-toolkit/toolkit.py", line 758, in save safetensors.torch.save_file(model, file) File "/usr/local/lib/python3.10/dist-packages/safetensors/torch.py", line 281, in save_file serialize_file(_flatten(tensors), filename, metadata=metadata) safetensors_rust.SafetensorError: Error while serializing: IoError(Os { code: 2, kind: NotFound, message: "No such file or directory" }) [ ]

Samael-1976 commented 1 month ago

and it give me this error during loading: /usr/local/lib/python3.10/dist-packages/diffusers/models/transformers/transformer_2d.py:34: FutureWarning: Transformer2DModelOutput is deprecated and will be removed in version 1.0.0. Importing Transformer2DModelOutput from diffusers.models.transformer_2d is deprecated and this will be removed in a future version. Please use from diffusers.models.modeling_outputs import Transformer2DModelOutput, instead. deprecate("Transformer2DModelOutput", "1.0.0", deprecation_message)

Samael-1976 commented 1 month ago

Fresh install A1111 v 1.9.4

Merging... 100% 1131/1131 [00:28<00:00, 40.16it/s] Saving to /content/drive/MyDrive/SD/models/test.safetensors... Calculating sha256 for /content/drive/MyDrive/SD/stable-diffusion-webui/models/Stable-diffusion/Animerge - Beta/AniMerge V5.0-Pruned.safetensors: 073a1ece8824dba70f287aa6704137e5533739ff8c0a59010ccc9905d5f318cd Calculating sha256 for /content/drive/MyDrive/SD/stable-diffusion-webui/models/Stable-diffusion/Animerge - Stable/Animerge V2.7-Pruned.safetensors: dd98dd2fe195654f9e17231c42ae96f1431c1f73bc8193601991bb3c2ce021e9 ** Error loading/saving model file Traceback (most recent call last): File "/content/drive/MyDrive/SD/stable-diffusion-webui/modules/ui_checkpoint_merger.py", line 21, in modelmerger results = extras.run_modelmerger(args) File "/content/drive/MyDrive/SD/stable-diffusion-webui/modules/extras.py", line 315, in run_modelmerger safetensors.torch.save_file(theta_0, output_modelname, metadata=metadata if len(metadata)>0 else None) File "/usr/local/lib/python3.10/dist-packages/safetensors/torch.py", line 281, in save_file serialize_file(_flatten(tensors), filename, metadata=metadata) safetensors_rust.SafetensorError: Error while serializing: IoError(Os { code: 2, kind: NotFound, message: "No such file or directory" })