stable-diffusion-webui-forge icon indicating copy to clipboard operation
stable-diffusion-webui-forge copied to clipboard

Cannot load created models from new NF4 checkpoint maker

Open pflky opened this issue 1 year ago • 1 comments

New checkpoint saving option in Checkpoint Merger does not result in a valid checkpoint when trying to save model in NF4 format. This happens regardless of how I save the converted model, whether I select a VAE or leave it empty, regardless of low diffusion settings when trying to generate, it fails to recognize model type and does not run the model.

Loading Model: {'checkpoint_info': {'filename': 'C:\Forge\webui\models\Stable-diffusion\TestNF4.safetensors', 'hash': '44bb77a4'}, 'additional_modules': [], 'unet_storage_dtype': None} [Unload] Trying to free 953674316406250018963456.00 MB for cuda:0 with 0 models keep loaded ... Exception ignored in: <function Popen.del at 0x00000165981709D0> Traceback (most recent call last): File "subprocess.py", line 1073, in del File "subprocess.py", line 1475, in internal_poll OSError: [WinError 6] The handle is invalid Traceback (most recent call last): File "C:\Forge\webui\backend\loader.py", line 248, in forge_loader state_dicts, estimated_config = split_state_dict(sd, additional_state_dicts=additional_state_dicts) File "C:\Forge\webui\backend\loader.py", line 216, in split_state_dict guess = huggingface_guess.guess(sd) File "C:\Forge\webui\repositories\huggingface_guess\huggingface_guess_init.py", line 7, in guess result.unet_key_prefix = [unet_key_prefix] AttributeError: 'NoneType' object has no attribute 'unet_key_prefix'

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Forge\webui\modules_forge\main_thread.py", line 30, in work self.result = self.func(*self.args, **self.kwargs) File "C:\Forge\webui\modules\txt2img.py", line 110, in txt2img_function processed = processing.process_images(p) File "C:\Forge\webui\modules\processing.py", line 796, in process_images p.sd_model, just_reloaded = forge_model_reload() File "C:\Forge\system\python\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) File "C:\Forge\webui\modules\sd_models.py", line 501, in forge_model_reload sd_model = forge_loader(state_dict, additional_state_dicts=additional_state_dicts) File "C:\Forge\system\python\lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) File "C:\Forge\webui\backend\loader.py", line 250, in forge_loader raise ValueError('Failed to recognize model type!') ValueError: Failed to recognize model type! Failed to recognize model type!

pflky avatar Aug 19 '24 20:08 pflky

same here

Edu2014 avatar Aug 20 '24 10:08 Edu2014

guys, are you able to find the solution?

krigeta avatar Dec 19 '24 14:12 krigeta