hako-mikan / sd-webui-supermerger

model merge extention for stable diffusion web ui
GNU Affero General Public License v3.0
740 stars 112 forks source link

Problem with mergin two models #166

Closed Aurety closed 1 year ago

Aurety commented 1 year ago

Since i tried to use SDXL in Vladmandic, I've got this error when i try to merge 2 models, and don't know how to retrieve my old settings.. Maybe you can help ?

In console

Traceback (most recent call last): File "G:\Vladmandic\automatic\venv\lib\site-packages\gradio\routes.py", line 422, in run_predict output = await app.get_blocks().process_api( File "G:\Vladmandic\automatic\venv\lib\site-packages\gradio\blocks.py", line 1323, in process_api result = await self.call_function( File "G:\Vladmandic\automatic\venv\lib\site-packages\gradio\blocks.py", line 1051, in call_function prediction = await anyio.to_thread.run_sync( File "G:\Vladmandic\automatic\venv\lib\site-packages\anyio\to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "G:\Vladmandic\automatic\venv\lib\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "G:\Vladmandic\automatic\venv\lib\site-packages\anyio_backends_asyncio.py", line 807, in run result = context.run(func, *args) File "G:\Vladmandic\automatic\extensions\sd-webui-supermerger\scripts\mergers\mergers.py", line 98, in smergegen usemodel(checkpoint_info, already_loaded_state_dict=theta_0) File "G:\Vladmandic\automatic\extensions\sd-webui-supermerger\scripts\mergers\model_util.py", line 913, in usemodel clip_is_included_into_sd = any(x for x in [msd.sd1_clip_weight, msd.sd2_clip_weight, msd.sdxl_clip_weight, msd.sdxl_refiner_clip_weight] if x in state_dict) AttributeError: module 'modules.sd_models' has no attribute 'sdxl_clip_weight'

Aurety commented 1 year ago

oups, i forget : Thanks for any help ! And thank you for this wonderfull extension !

CharlesCato commented 1 year ago

Same problem here: module 'modules.sd_models' has no attribute 'sdxl_clip_weight'

On AMD/windows10/directnl

Not sure if it's more concerning Vlado or Supermerger though.

serpeus3 commented 1 year ago

Same problem here/ same error occurs with webui V1.4.0 / SD 1.5

hako-mikan commented 1 year ago

May be fixed. However, I don't use vlad so i did not test it.

Aurety commented 1 year ago

Thanks, it doesn't fix but something changed.. here's the console

Loading weights: G:\Vladmandic\automatic\models\Stable-diffusion\MergeWip\mutation_04_4.safetensors ----- 0.0/2… -:--:… GB 18:30:57-918214 INFO Setting Torch parameters: dtype=torch.float16 vae=torch.float16 unet=torch.float16 LatentDiffusion: Running in eps-prediction mode DiffusionWrapper has 859.52 M params. Loading weights: G:\Vladmandic\automatic\models\VAE\vae-ft-mse-840000-ema-pruned.safetensors -------- 0.0/334.6 -:--:-- MB 18:31:01-201151 INFO Applying scaled dot product cross attention optimization (without memory efficient attention) 18:31:03-395114 INFO Embeddings: loaded=255 skipped=47 18:31:03-403122 INFO Model loaded in 5.9s (load=0.4s create=0.5s apply=0.9s vae=1.1s move=0.8s embeddings=2.2s) 18:31:03-813488 INFO Model load finished: {'ram': {'used': 3.88, 'total': 127.87}, 'gpu': {'used': 3.18, 'total': 11.0}, 'retries': 0, 'oom': 0} cached=0 Progress 5.17it/s ---------------------------------------- 100% 0:00:00 0:00:06 Progress 3.52it/s ---------------------------------------- 100% 0:00:00 0:00:05 model A : MergeWip_mutation_04_4 model B : Realiste_westmixV1PhotoRealistic_v10 model C : alpha,beta : (0.42, 0.25) weights_alpha : weights_beta : mode : Weight sum:A(1-alpha)+Balpha MBW : False CalcMode : normal Elemental : Weights Seed : 3871095084 Adjust : Loading weights [Realiste_westmixV1PhotoRealistic_v10] from file Loading weights: G:\Vladmandic\automatic\models\Stable-diffusion\Realiste\westmixV1PhotoRealistic_v10.safetensors - -… 18:31:48-141939 INFO Setting Torch parameters: dtype=torch.float16 vae=torch.float16 unet=torch.float16 Loading weights: G:\Vladmandic\automatic\models\Stable-diffusion\MergeWip\mutation_04_4.safetensors ----- 0.0/2… -:--:… GB LatentDiffusion: Running in eps-prediction mode DiffusionWrapper has 859.52 M params. Loading weights: G:\Vladmandic\automatic\models\VAE\vae-ft-mse-840000-ema-pruned.safetensors -------- 0.0/334.6 -:--:-- MB 18:31:51-883286 INFO Applying scaled dot product cross attention optimization (without memory efficient attention) 18:31:52-127504 INFO Model loaded in 4.0s (load=0.3s create=0.4s apply=0.9s vae=1.0s move=1.0s embeddings=0.2s) 18:31:52-544878 INFO Model load finished: {'ram': {'used': 8.19, 'total': 127.87}, 'gpu': {'used': 3.28, 'total': 11.0}, 'retries': 0, 'oom': 0} cached=0 Loading weights [MergeWip_mutation_04_4] from file Loading weights: G:\Vladmandic\automatic\models\Stable-diffusion\MergeWip\mutation_04_4.safetensors ----- 0.0/2… -:--:… GB Stage 1/2: 100%|██████████████████████████████████████████████████████████████████| 1546/1546 [00:04<00:00, 375.55it/s] Stage 2/2: 100%|███████████████████████████████████████████████████████████████████████████| 1884/1884 [00:00<?, ?it/s] Creating model from config: G:\Vladmandic\automatic\configs\v1-inference.yaml LatentDiffusion: Running in eps-prediction mode DiffusionWrapper has 859.52 M params. Traceback (most recent call last): File "G:\Vladmandic\automatic\venv\lib\site-packages\gradio\routes.py", line 422, in run_predict output = await app.get_blocks().process_api( File "G:\Vladmandic\automatic\venv\lib\site-packages\gradio\blocks.py", line 1323, in process_api result = await self.call_function( File "G:\Vladmandic\automatic\venv\lib\site-packages\gradio\blocks.py", line 1051, in call_function prediction = await anyio.to_thread.run_sync( File "G:\Vladmandic\automatic\venv\lib\site-packages\anyio\to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "G:\Vladmandic\automatic\venv\lib\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "G:\Vladmandic\automatic\venv\lib\site-packages\anyio_backends_asyncio.py", line 807, in run result = context.run(func, *args) File "G:\Vladmandic\automatic\extensions\sd-webui-supermerger\scripts\mergers\mergers.py", line 98, in smergegen usemodel(checkpoint_info, already_loaded_state_dict=theta_0) File "G:\Vladmandic\automatic\extensions\sd-webui-supermerger\scripts\mergers\model_util.py", line 944, in usemodel load_model_weights(sd_model, checkpoint_info, state_dict, timer) File "G:\Vladmandic\automatic\extensions\sd-webui-supermerger\scripts\mergers\model_util.py", line 1010, in load_model_weights if shared.cmd_opts.upcast_sampling and depth_model: AttributeError: 'Namespace' object has no attribute 'upcast_sampling'

hako-mikan commented 1 year ago

How about this fix.

Aurety commented 1 year ago

I would say nothing changed.. here's the console The strange behavior is about the stage 2, where the model is charging so fast ( too fast !! ) :

Stage 2/2: 100%|██████████████████████████████████████████████████████████████| 1884/1884 [00:00<00:00, 1880102.01it/s]

Thanks !

model A : MergeWip_mutation_04_4 model B : Realiste_westmixV1PhotoRealistic_v10 model C : alpha,beta : (0.5, 0.25) weights_alpha : weights_beta : mode : Weight sum:A(1-alpha)+Balpha MBW : False CalcMode : normal Elemental : Weights Seed : 2009808253 Adjust : Loading weights [Realiste_westmixV1PhotoRealistic_v10] from file Loading weights: G:\Vladmandic\automatic\models\Stable-diffusion\Realiste\westmixV1PhotoRealistic_v10.safetensors - -… 19:09:51-750620 INFO Setting Torch parameters: dtype=torch.float16 vae=torch.float16 unet=torch.float16 Loading weights: G:\Vladmandic\automatic\models\Stable-diffusion\MergeWip\mutation_04_4.safetensors ----- 0.0/2… -:--:… GB LatentDiffusion: Running in eps-prediction mode DiffusionWrapper has 859.52 M params. Loading weights: G:\Vladmandic\automatic\models\VAE\vae-ft-mse-840000-ema-pruned.safetensors -------- 0.0/334.6 -:--:-- MB 19:09:55-561008 INFO Applying scaled dot product cross attention optimization (without memory efficient attention) 19:09:55-803225 INFO Model loaded in 4.1s (load=0.3s create=0.4s apply=0.9s vae=1.0s move=1.1s embeddings=0.2s) 19:09:56-209588 INFO Model load finished: {'ram': {'used': 8.22, 'total': 127.87}, 'gpu': {'used': 3.28, 'total': 11.0}, 'retries': 0, 'oom': 0} cached=0 Loading weights [MergeWip_mutation_04_4] from file Loading weights: G:\Vladmandic\automatic\models\Stable-diffusion\MergeWip\mutation_04_4.safetensors ----- 0.0/2… -:--:… GB Stage 1/2: 100%|██████████████████████████████████████████████████████████████████| 1546/1546 [00:04<00:00, 378.12it/s] Stage 2/2: 100%|██████████████████████████████████████████████████████████████| 1884/1884 [00:00<00:00, 1880102.01it/s] Creating model from config: G:\Vladmandic\automatic\configs\v1-inference.yaml LatentDiffusion: Running in eps-prediction mode DiffusionWrapper has 859.52 M params. Traceback (most recent call last): File "G:\Vladmandic\automatic\venv\lib\site-packages\gradio\routes.py", line 422, in run_predict output = await app.get_blocks().process_api( File "G:\Vladmandic\automatic\venv\lib\site-packages\gradio\blocks.py", line 1323, in process_api result = await self.call_function( File "G:\Vladmandic\automatic\venv\lib\site-packages\gradio\blocks.py", line 1051, in call_function prediction = await anyio.to_thread.run_sync( File "G:\Vladmandic\automatic\venv\lib\site-packages\anyio\to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "G:\Vladmandic\automatic\venv\lib\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "G:\Vladmandic\automatic\venv\lib\site-packages\anyio_backends_asyncio.py", line 807, in run result = context.run(func, *args) File "G:\Vladmandic\automatic\extensions\sd-webui-supermerger\scripts\mergers\mergers.py", line 98, in smergegen usemodel(checkpoint_info, already_loaded_state_dict=theta_0) File "G:\Vladmandic\automatic\extensions\sd-webui-supermerger\scripts\mergers\model_util.py", line 944, in usemodel load_model_weights(sd_model, checkpoint_info, state_dict, timer) File "G:\Vladmandic\automatic\extensions\sd-webui-supermerger\scripts\mergers\model_util.py", line 1022, in load_model_weights devices.unet_needs_upcast = shared.cmd_opts.upcast_sampling and devices.dtype == torch.float16 and devices.dtype_unet == torch.float16 AttributeError: 'Namespace' object has no attribute 'upcast_sampling'

serpeus3 commented 1 year ago

Webui 1.3.2 ~ 1.4.1 & SD1.5

Other than the sdxl_clip_weight error message, an error message appears

Traceback (most recent call last): File "F:\Downloads\stable-diffusion-webui-1.4.1\venv\lib\site-packages\gradio\routes.py", line 422, in run_predict output = await app.get_blocks().process_api( File "F:\Downloads\stable-diffusion-webui-1.4.1\venv\lib\site-packages\gradio\blocks.py", line 1323, in process_api result = await self.call_function( File "F:\Downloads\stable-diffusion-webui-1.4.1\venv\lib\site-packages\gradio\blocks.py", line 1051, in call_function prediction = await anyio.to_thread.run_sync( File "F:\Downloads\stable-diffusion-webui-1.4.1\venv\lib\site-packages\anyio\to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "F:\Downloads\stable-diffusion-webui-1.4.1\venv\lib\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "F:\Downloads\stable-diffusion-webui-1.4.1\venv\lib\site-packages\anyio_backends_asyncio.py", line 807, in run result = context.run(func, *args) File "F:\Downloads\stable-diffusion-webui-1.4.1\extensions\sd-webui-supermerger\scripts\mergers\mergers.py", line 98, in smergegen usemodel(checkpoint_info, already_loaded_state_dict=theta_0) File "F:\Downloads\stable-diffusion-webui-1.4.1\extensions\sd-webui-supermerger\scripts\mergers\model_util.py", line 970, in usemodel sd_model.cond_stage_model_empty_prompt = msd.get_empty_cond(sd_model) AttributeError: module 'modules.sd_models' has no attribute 'get_empty_cond'

hako-mikan commented 1 year ago

How about this.

serpeus3 commented 1 year ago

How about this.

Replacing with #166 results in the same error message

TingTingin commented 1 year ago

I tested a in memory merge on vlad and it seems to be working

CharlesCato commented 1 year ago

Works for me as well. Thanks.

Aurety commented 1 year ago

Replacing with #166 but different message :

Calculating model hash: G:\Vladmandic\automatic\models\Stable-diffusion\3D\disneyStyleV1_v10.safetensors ---- 4.2… 0:0… GB model A : 3D_disneyStyleV1_v10 model B : 3D_disneyPixarCartoonB_v10 model C : alpha,beta : (0.5, 0.25) weights_alpha : weights_beta : mode : Weight sum:A(1-alpha)+Balpha MBW : False CalcMode : normal Elemental : Weights Seed : 2751831114 Adjust : Loading weights [3D_disneyPixarCartoonB_v10] from file Loading weights: G:\Vladmandic\automatic\models\Stable-diffusion\3D\disneyPixarCartoonB_v10.safetensors ---- 0.0… -:--… GB 01:45:02-612083 INFO Setting Torch parameters: dtype=torch.float16 vae=torch.float16 unet=torch.float16 Loading weights: G:\Vladmandic\automatic\models\Stable-diffusion\3D\disneyStyleV1_v10.safetensors ------ 0.0/4… -:--:-- GB LatentDiffusion: Running in eps-prediction mode DiffusionWrapper has 859.52 M params. Loading weights: G:\Vladmandic\automatic\models\VAE\vae-ft-mse-840000-ema-pruned.safetensors -------- 0.0/334.6 -:--:-- MB 01:45:06-067158 INFO Applying scaled dot product cross attention optimization (without memory efficient attention) 01:45:06-364424 INFO Embeddings: loaded=262 skipped=47 01:45:06-373432 INFO Model loaded in 3.8s (load=0.2s create=0.4s apply=1.2s vae=0.8s move=0.8s embeddings=0.3s) 01:45:06-746765 INFO Model load finished: {'ram': {'used': 5.68, 'total': 127.87}, 'gpu': {'used': 3.18, 'total': 11.0}, 'retries': 0, 'oom': 0} cached=0 Loading weights [3D_disneyStyleV1_v10] from file Loading weights: G:\Vladmandic\automatic\models\Stable-diffusion\3D\disneyStyleV1_v10.safetensors ------ 0.0/4… -:--:-- GB Stage 1/2: 100%|███████████████████████████████████████████████████████████████████| 1131/1131 [01:49<00:00, 10.33it/s] Stage 2/2: 100%|███████████████████████████████████████████████████████████████████████████| 1131/1131 [00:00<?, ?it/s] Creating model from config: G:\Vladmandic\automatic\configs\v1-inference.yaml LatentDiffusion: Running in eps-prediction mode DiffusionWrapper has 859.52 M params. Loading weights: G:\Vladmandic\automatic\models\VAE\vae-ft-mse-840000-ema-pruned.safetensors -------- 0.0/334.6 -:--:-- MB 01:47:00-064260 INFO Applying scaled dot product cross attention optimization (without memory efficient attention) Model loaded in 2.9s (create model=0.4s apply weights to model=0.5s apply half()=0.6s load VAE=0.2s move model to device=0.7s load textual inversion embeddings=0.2s calculate empty prompt=0.1s). Traceback (most recent call last): File "G:\Vladmandic\automatic\extensions\sd-webui-supermerger\scripts\mergers\mergers.py", line 952, in simggen p.sampler_name = sd_samplers.samplers[sampler].name if s_sampler == 0 or s_sampler == None else sd_samplers.samplers[s_sampler-1].name TypeError: list indices must be integers or slices, not NoneType

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "G:\Vladmandic\automatic\venv\lib\site-packages\gradio\routes.py", line 422, in run_predict output = await app.get_blocks().process_api( File "G:\Vladmandic\automatic\venv\lib\site-packages\gradio\blocks.py", line 1323, in process_api result = await self.call_function( File "G:\Vladmandic\automatic\venv\lib\site-packages\gradio\blocks.py", line 1051, in call_function prediction = await anyio.to_thread.run_sync( File "G:\Vladmandic\automatic\venv\lib\site-packages\anyio\to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "G:\Vladmandic\automatic\venv\lib\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "G:\Vladmandic\automatic\venv\lib\site-packages\anyio_backends_asyncio.py", line 807, in run result = context.run(func, *args) File "G:\Vladmandic\automatic\extensions\sd-webui-supermerger\scripts\mergers\mergers.py", line 107, in smergegen images = simggen(prompt,nprompt,steps,sampler,cfg,seed,w,h,hireson,hrupscaler,hr2ndsteps,denoise_str,hr_scale, File "G:\Vladmandic\automatic\extensions\sd-webui-supermerger\scripts\mergers\mergers.py", line 954, in simggen print(f"{bcolors.Fail}Error:sampler:{sampler},s_sampler:{s_sampler}{bcolors.ENDC}") AttributeError: type object 'bcolors' has no attribute 'Fail'

serpeus3 commented 1 year ago

Webui 1.3.2 ~ 1.4.1 / SD 1.5

supermerger " [Update mergers.py] abc2e5be26eed11cc9da15fb0a7a2e9c83192c8a" committed 36 minutes ago

The merger is finally going well. Thank You

LatentDiffusion: Running in eps-prediction mode DiffusionWrapper has 859.52 M params. Loading VAE weights specified in settings: Y:\webui\models\VAE\kl-f8-anime2.vae.pt Applying attention optimization: xformers... done. Model loaded in 39.1s (create model: 0.4s, apply weights to model: 27.7s, apply channels_last: 1.1s, apply half(): 1.3s, load VAE: 7.2s, move model to device: 1.2s). Saving... Done!

hako-mikan commented 1 year ago

@Aurety Your problem is maybe fixed in current version.

Aurety commented 1 year ago

Hi, thanks for the feedback, it works for first merging, but if I tried to merge the result with another model, i have now this kind of error.. Maybe it's my setup who cause issue ? I will try with a fresh install..

AttributeError: 'LatentDiffusion' object has no attribute 'has_accelerate'

here the full console :

model A : Realiste_photon_v1 model B : Anime_darksun_v40 model C : alpha,beta : (0.5, 0.25) weights_alpha : weights_beta : mode : Weight sum:A(1-alpha)+Balpha MBW : False CalcMode : normal Elemental : Weights Seed : 3304771021 Adjust : Loading weights [Anime_darksun_v40] from file Loading weights: G:\Vladmandic\automatic\models\Stable-diffusion\Anime\darksun_v40.safetensors -------- 0.0/2.1 -:--:-- GB 11:10:34-592489 INFO Setting Torch parameters: dtype=torch.float16 vae=torch.float16 unet=torch.float16 Loading weights: G:\Vladmandic\automatic\models\Stable-diffusion\Realiste\photon_v1.safetensors ------- 0.0/2.1 -:--:-- GB LatentDiffusion: Running in eps-prediction mode DiffusionWrapper has 859.52 M params. 11:11:49-326370 INFO Applying scaled dot product cross attention optimization (without memory efficient attention) 11:11:49-579597 INFO Model loaded in 76.1s (load=3.0s create=0.4s apply=71.0s vae=0.6s move=0.8s embeddings=0.2s) 11:11:49-950928 INFO Model load finished: {'ram': {'used': 4.0, 'total': 127.87}, 'gpu': {'used': 3.28, 'total': 11.0}, 'retries': 0, 'oom': 0} cached=0 Loading weights [Realiste_photon_v1] from file Loading weights: G:\Vladmandic\automatic\models\Stable-diffusion\Realiste\photon_v1.safetensors ------- 0.0/2.1 -:--:-- GB Stage 1/2: 100%|███████████████████████████████████████████████████████████████████| 1131/1131 [01:09<00:00, 16.18it/s] Stage 2/2: 100%|███████████████████████████████████████████████████████████████████████████| 1131/1131 [00:00<?, ?it/s] Creating model from config: G:\Vladmandic\automatic\configs\v1-inference.yaml LatentDiffusion: Running in eps-prediction mode DiffusionWrapper has 859.52 M params. 11:13:02-816965 INFO Applying scaled dot product cross attention optimization (without memory efficient attention) Model loaded in 2.5s (create model=0.4s apply weights to model=0.5s apply half()=0.6s move model to device=0.6s load textual inversion embeddings=0.3s calculate empty prompt=0.1s). Progress 9.26it/s ---------------------------------------- 100% 0:00:00 0:00:02 model A : Realiste_photon_v1 model B : Anime_darksun_v40 model C : alpha,beta : (0.5, 0.25) weights_alpha : weights_beta : mode : Weight sum:A(1-alpha)+Balpha MBW : False CalcMode : normal Elemental : Weights Seed : 2143332118 Adjust : Loading weights [Anime_darksun_v40] from file Loading weights: G:\Vladmandic\automatic\models\Stable-diffusion\Anime\darksun_v40.safetensors -------- 0.0/2.1 -:--:-- GB Loading weights [Realiste_photon_v1] from file Loading weights: G:\Vladmandic\automatic\models\Stable-diffusion\Realiste\photon_v1.safetensors ------- 0.0/2.1 -:--:-- GB Stage 1/2: 100%|██████████████████████████████████████████████████████████████████| 1131/1131 [00:03<00:00, 345.67it/s] Stage 2/2: 100%|███████████████████████████████████████████████████████████████████████████| 1131/1131 [00:00<?, ?it/s] Creating model from config: G:\Vladmandic\automatic\configs\v1-inference.yaml LatentDiffusion: Running in eps-prediction mode DiffusionWrapper has 859.52 M params. 11:14:02-209520 INFO Applying scaled dot product cross attention optimization (without memory efficient attention) Model loaded in 2.6s (create model=0.4s apply weights to model=0.5s apply half()=0.6s move model to device=0.7s load textual inversion embeddings=0.3s calculate empty prompt=0.1s). Saving... Done! Progress 8.07it/s ---------------------------------------- 100% 0:00:00 0:00:02 model A : Realiste_photon_v1 model B : Anime_darksun_v40 model C : alpha,beta : (0.236, 0.25) weights_alpha : weights_beta : mode : Weight sum:A(1-alpha)+Balpha MBW : False CalcMode : normal Elemental : Weights Seed : 3865621728 Adjust : Loading weights [Anime_darksun_v40] from file Loading weights: G:\Vladmandic\automatic\models\Stable-diffusion\Anime\darksun_v40.safetensors -------- 0.0/2.1 -:--:-- GB Loading weights [Realiste_photon_v1] from file Loading weights: G:\Vladmandic\automatic\models\Stable-diffusion\Realiste\photon_v1.safetensors ------- 0.0/2.1 -:--:-- GB Stage 1/2: 100%|██████████████████████████████████████████████████████████████████| 1131/1131 [00:03<00:00, 345.14it/s] Stage 2/2: 100%|███████████████████████████████████████████████████████████████████████████| 1131/1131 [00:00<?, ?it/s] Creating model from config: G:\Vladmandic\automatic\configs\v1-inference.yaml LatentDiffusion: Running in eps-prediction mode DiffusionWrapper has 859.52 M params. 11:14:39-930673 INFO Applying scaled dot product cross attention optimization (without memory efficient attention) Model loaded in 2.5s (create model=0.4s apply weights to model=0.5s apply half()=0.6s move model to device=0.7s load textual inversion embeddings=0.2s calculate empty prompt=0.1s). Saving... Done! Progress 9.02it/s ---------------------------------------- 100% 0:00:00 0:00:02 Progress 10.71it/s ---------------------------------------- 100% 0:00:00 0:00:01 11:15:24-117276 INFO Available models: G:\Vladmandic\automatic\models\Stable-diffusion 268 Calculating model hash: G:\Vladmandic\automatic\models\Stable-diffusion\Realiste\darkphot-01.safetensors ---- 2.1… 0:0… GB model A : Realiste_darkphot-01 model B : Realiste_chickmixflat_v10 model C : alpha,beta : (0.4, 0.25) weights_alpha : weights_beta : mode : Weight sum:A(1-alpha)+Balpha MBW : False CalcMode : normal Elemental : Weights Seed : 585096637 Adjust : Loading weights [Realiste_chickmixflat_v10] from file Loading weights: G:\Vladmandic\automatic\models\Stable-diffusion\Realiste\chickmixflat_v10.ckpt ------- 0.1/2.1 0:00:00 GB Traceback (most recent call last): File "G:\Vladmandic\automatic\venv\lib\site-packages\gradio\routes.py", line 422, in run_predict output = await app.get_blocks().process_api( File "G:\Vladmandic\automatic\venv\lib\site-packages\gradio\blocks.py", line 1323, in process_api result = await self.call_function( File "G:\Vladmandic\automatic\venv\lib\site-packages\gradio\blocks.py", line 1051, in call_function prediction = await anyio.to_thread.run_sync( File "G:\Vladmandic\automatic\venv\lib\site-packages\anyio\to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "G:\Vladmandic\automatic\venv\lib\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "G:\Vladmandic\automatic\venv\lib\site-packages\anyio_backends_asyncio.py", line 807, in run result = context.run(func, *args) File "G:\Vladmandic\automatic\extensions\sd-webui-supermerger\scripts\mergers\mergers.py", line 94, in smergegen result,currentmodel,modelid,theta_0,metadata = smerge( File "G:\Vladmandic\automatic\extensions\sd-webui-supermerger\scripts\mergers\mergers.py", line 271, in smerge theta_0=load_model_weights_m(model_a,True,False,save).copy() File "G:\Vladmandic\automatic\extensions\sd-webui-supermerger\scripts\mergers\mergers.py", line 727, in load_model_weights_m load_model(checkpoint_info) File "G:\Vladmandic\automatic\modules\sd_models.py", line 869, in load_model unload_model_weights(op=op) File "G:\Vladmandic\automatic\modules\sd_models.py", line 1004, in unload_model_weights if not model_data.sd_model.has_accelerate: File "G:\Vladmandic\automatic\venv\lib\site-packages\torch\nn\modules\module.py", line 1614, in getattr raise AttributeError("'{}' object has no attribute '{}'".format( AttributeError: 'LatentDiffusion' object has no attribute 'has_accelerate'

hako-mikan commented 1 year ago

@Aurety May be fixed.

Aurety commented 1 year ago

Thanks, I changed by the new file #166 posted 4 hours ago and I have errors in loading

16:41:20-896197 ERROR Module load: G:\Vladmandic\automatic\extensions\sd-webui-supermerger\scripts\GenParamGetter.py: NameError Module load: G:\Vladmandic\automatic\extensions\sd-webui-supermerger\scripts\GenParamGetter.py: NameError ┌───────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────┐ │ G:\Vladmandic\automatic\modules\script_loading.py:13 in load_module │ │ │ │ 12 │ try: │ │ > 13 │ │ module_spec.loader.exec_module(module) │ │ 14 │ except Exception as e: │ │ in exec_module:883 │ │ │ │ ... 2 frames hidden ... │ │ │ │ G:\Vladmandic\automatic\extensions\sd-webui-supermerger\scripts\mergers\mergers.py:24 in │ │ │ │ 23 from modules.generation_parameters_copypaste import create_override_settings_dict │ │ > 24 from scripts.mergers.model_util import VAE_PARAMS_CH, filenamecutter,savemodel,usemodel │ │ 25 from math import ceil │ │ │ │ G:\Vladmandic\automatic\extensions\sd-webui-supermerger\scripts\mergers\model_util.py:1 in │ │ │ │ > 1 {"payload":{"allShortcutsEnabled":true,"fileTree":{"scripts/mergers":{"items":[{"name":" │ │ 2 │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ NameError: name 'true' is not defined 16:41:23-250301 ERROR Module load: G:\Vladmandic\automatic\extensions\sd-webui-supermerger\scripts\supermerger.py: NameError Module load: G:\Vladmandic\automatic\extensions\sd-webui-supermerger\scripts\supermerger.py: NameError ┌───────────────────────────────────────── Traceback (most recent call last) ─────────────────────────────────────────┐ │ G:\Vladmandic\automatic\modules\script_loading.py:13 in load_module │ │ │ │ 12 │ try: │ │ > 13 │ │ module_spec.loader.exec_module(module) │ │ 14 │ except Exception as e: │ │ in exec_module:883 │ │ │ │ ... 2 frames hidden ... │ │ │ │ G:\Vladmandic\automatic\extensions\sd-webui-supermerger\scripts\mergers\mergers.py:24 in │ │ │ │ 23 from modules.generation_parameters_copypaste import create_override_settings_dict │ │ > 24 from scripts.mergers.model_util import VAE_PARAMS_CH, filenamecutter,savemodel,usemodel │ │ 25 from math import ceil │ │ │ │ G:\Vladmandic\automatic\extensions\sd-webui-supermerger\scripts\mergers\model_util.py:1 in │ │ │ │ > 1 {"payload":{"allShortcutsEnabled":true,"fileTree":{"scripts/mergers":{"items":[{"name":" │ │ 2 │ └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘ NameError: name 'true' is not defined

hako-mikan commented 1 year ago

I don't think I've changed the part that would cause that error. In the meantime, please try restarting webui.bat, etc.

Aurety commented 1 year ago

I changed not only the #166 script but all the files and it seems to work !! Thanks for all your hard work and feedback 🥇

Aurety commented 1 year ago

I tried several mergin without trouble ! Thanks !!