liasece / sd-webui-train-tools

The stable diffusion webui training aid extension helps you quickly and visually train models such as Lora.
Other
393 stars 48 forks source link

RuntimeError: Error(s) in loading state_dict for UNet2DConditionModel: #57

Closed charming386 closed 3 months ago

charming386 commented 3 months ago

I need some help!

`Train Tools: get_project_version_list: outputs\train_tools\projects\mmj_ori_1.0\versions\v1 Train Tools: ui_refresh_project: ['mmj_ori_1.0'] Train Tools: on_ui_change_project_click: mmj_ori_1.0 Train Tools: get_project_version_list: outputs\train_tools\projects\mmj_ori_1.0\versions\v1 Train Tools: on_ui_change_project_version_click: mmj_ori_1.0 v1 Train Tools: on_train_begin_click {'base_model': 'G:\AI Program\sd-webui-aki\sd-webui-aki\sd-webui-aki-v4\sd-webui-aki-v4\models\Stable-diffusion\7th_anime_v3_A.safetensors', 'img_folder': 'G:\AI Program\sd-webui-aki\sd-webui-aki\sd-webui-aki-v4\sd-webui-aki-v4\outputs\train_tools\projects\mmj_ori_1.0\versions\v1\dataset\processed', 'output_folder': 'G:\AI Program\sd-webui-aki\sd-webui-aki\sd-webui-aki-v4\sd-webui-aki-v4\outputs\train_tools\projects\mmj_ori_1.0\versions\v1\trains\7th_anime_v3_A-bs-1-ep-20-op-Lion-lr-0_0001-net-128-ap-64', 'save_json_folder': None, 'save_json_name': None, 'load_json_path': None, 'reg_img_folder': None, 'sample_prompts': None, 'change_output_name': 'mmj_ori_1.0-v1', 'json_load_skip_list': None, 'training_comment': None, 'save_json_only': False, 'tag_occurrence_txt_file': True, 'sort_tag_occurrence_alphabetically': False, 'optimizer_type': 'Lion', 'optimizer_args': {'weight_decay': '0.1', 'betas': '0.9,0.99'}, 'scheduler': 'cosine', 'cosine_restarts': 1, 'scheduler_power': 1, 'learning_rate': 0.0001, 'unet_lr': None, 'text_encoder_lr': None, 'warmup_lr_ratio': None, 'unet_only': False, 'net_dim': 128, 'alpha': 64, 'train_resolution': 512, 'height_resolution': None, 'batch_size': 1, 'clip_skip': 2, 'test_seed': 23, 'mixed_precision': 'fp16', 'save_precision': 'fp16', 'lyco': False, 'network_args': None, 'num_epochs': 20, 'save_every_n_epochs': 2, 'save_n_epoch_ratio': None, 'save_last_n_epochs': None, 'max_steps': None, 'sample_sampler': None, 'sample_every_n_steps': None, 'sample_every_n_epochs': None, 'buckets': True, 'min_bucket_resolution': 320, 'max_bucket_resolution': 960, 'bucket_reso_steps': None, 'bucket_no_upscale': False, 'shuffle_captions': False, 'keep_tokens': None, 'xformers': True, 'cache_latents': True, 'flip_aug': False, 'v2': True, 'v_parameterization': False, 'gradient_checkpointing': False, 'gradient_acc_steps': None, 'noise_offset': None, 'mem_eff_attn': False, 'lora_model_for_resume': None, 'save_state': False, 'resume': None, 'text_only': False, 'vae': None, 'log_dir': None, 'log_prefix': None, 'tokenizer_cache_dir': None, 'dataset_config': None, 'lowram': False, 'no_meta': False, 'color_aug': False, 'random_crop': False, 'use_8bit_adam': False, 'use_lion': False, 'caption_dropout_rate': None, 'caption_dropout_every_n_epochs': None, 'caption_tag_dropout_rate': None, 'prior_loss_weight': 1, 'max_grad_norm': 1, 'save_as': 'safetensors', 'caption_extension': '.txt', 'max_clip_token_length': 150, 'save_last_n_epochs_state': None, 'num_workers': 8, 'persistent_workers': True, 'face_crop_aug_range': None, 'network_module': 'networks.lora', 'locon_dim': None, 'locon_alpha': None, 'locon': False, 'use_sdxl': False, 'no_half_vae': False, 'cache_text_encoder_outputs': False, 'cache_text_encoder_outputs_to_disk': False, 'ext_sd_script_args': ''} G:\AI Program\sd-webui-aki\sd-webui-aki\sd-webui-aki-v4\sd-webui-aki-v4\outputs\train_tools\projects\mmj_ori_1.0\versions\v1\dataset\processed 36_mmj_ori_1.0 Created a txt file named mmj_ori_1.0-v1.txt in the output folder Train Tools: train begin Namespace(console_log_level=None, console_log_file=None, console_log_simple=False, v2=True, v_parameterization=False, pretrained_model_name_or_path='G:\AI Program\sd-webui-aki\sd-webui-aki\sd-webui-aki-v4\sd-webui-aki-v4\models\Stable-diffusion\7th_anime_v3_A.safetensors', tokenizer_cache_dir=None, train_data_dir='G:\AI Program\sd-webui-aki\sd-webui-aki\sd-webui-aki-v4\sd-webui-aki-v4\outputs\train_tools\projects\mmj_ori_1.0\versions\v1\dataset\processed', shuffle_caption=False, caption_separator=',', caption_extension='.txt', caption_extention=None, keep_tokens=0, keep_tokens_separator='', caption_prefix=None, caption_suffix=None, color_aug=False, flip_aug=False, face_crop_aug_range=None, random_crop=False, debug_dataset=False, resolution='512', cache_latents=True, vae_batch_size=1, cache_latents_to_disk=False, enable_bucket=True, min_bucket_reso=320, max_bucket_reso=960, bucket_reso_steps=64, bucket_no_upscale=False, token_warmup_min=1, token_warmup_step=0, dataset_class=None, caption_dropout_rate=0.0, caption_dropout_every_n_epochs=0, caption_tag_dropout_rate=0.0, reg_data_dir=None, in_json=None, dataset_repeats=1, output_dir='G:\AI Program\sd-webui-aki\sd-webui-aki\sd-webui-aki-v4\sd-webui-aki-v4\outputs\train_tools\projects\mmj_ori_1.0\versions\v1\trains\7th_anime_v3_A-bs-1-ep-20-op-Lion-lr-0_0001-net-128-ap-64', output_name='mmj_ori_1.0-v1', huggingface_repo_id=None, huggingface_repo_type=None, huggingface_path_in_repo=None, huggingface_token=None, huggingface_repo_visibility=None, save_state_to_huggingface=False, resume_from_huggingface=False, async_upload=False, save_precision='fp16', save_every_n_epochs=2, save_every_n_steps=None, save_n_epoch_ratio=None, save_last_n_epochs=None, save_last_n_epochs_state=None, save_last_n_steps=None, save_last_n_steps_state=None, save_state=False, resume=None, train_batch_size=1, max_token_length=150, mem_eff_attn=False, torch_compile=False, dynamo_backend='inductor', xformers=True, sdpa=False, vae=None, max_train_steps=1600, max_train_epochs=20, max_data_loader_n_workers=8, persistent_data_loader_workers=True, seed=23, gradient_checkpointing=False, gradient_accumulation_steps=1, mixed_precision='fp16', full_fp16=False, full_bf16=False, fp8_base=False, ddp_timeout=None, ddp_gradient_as_bucket_view=False, ddp_static_graph=False, clip_skip=2, logging_dir=None, log_with=None, log_prefix=None, log_tracker_name=None, wandb_run_name=None, log_tracker_config=None, wandb_api_key=None, noise_offset=None, multires_noise_iterations=None, ip_noise_gamma=None, multires_noise_discount=0.3, adaptive_noise_scale=None, zero_terminal_snr=False, min_timestep=None, max_timestep=None, lowram=False, highvram=False, sample_every_n_steps=None, sample_at_first=False, sample_every_n_epochs=None, sample_prompts=None, sample_sampler='ddim', config_file=None, output_config=False, metadata_title=None, metadata_author=None, metadata_description=None, metadata_license=None, metadata_tags=None, prior_loss_weight=1.0, optimizer_type='Lion', use_8bit_adam=False, use_lion_optimizer=False, learning_rate=0.0001, max_grad_norm=1.0, optimizer_args=['weight_decay=0.1', 'betas=0.9,0.99'], lr_scheduler_type='', lr_scheduler_args=None, lr_scheduler='cosine', lr_warmup_steps=0, lr_scheduler_num_cycles=1, lr_scheduler_power=1.0, dataset_config=None, min_snr_gamma=None, scale_v_pred_loss_like_noise_pred=False, v_pred_like_loss=None, debiased_estimation_loss=False, weighted_captions=False, no_metadata=False, save_model_as='safetensors', unet_lr=None, text_encoder_lr=None, network_weights=None, network_module='networks.lora', network_dim=128, network_alpha=64.0, network_dropout=None, network_args=None, network_train_unet_only=False, network_train_text_encoder_only=False, training_comment=None, dim_from_weights=False, scale_weight_norms=None, base_weights=None, base_weights_multiplier=None, no_half_vae=False, cache_text_encoder_outputs=False, cache_text_encoder_outputs_to_disk=False) WARNING:library.train_util:v2 with clip_skip will be unexpected / v2でclip_skipを使用することは想定されていません rich is not installed, using basic logging prepare tokenizer update token length: 150 Using DreamBooth method. prepare images. found directory G:\AI Program\sd-webui-aki\sd-webui-aki\sd-webui-aki-v4\sd-webui-aki-v4\outputs\train_tools\projects\mmj_ori_1.0\versions\v1\dataset\processed\36_mmj_ori_1.0 contains 28 image files 1008 train images with repeating. 0 reg images. no regularization images / 正則化画像が見つかりませんでした [Dataset 0] batch_size: 1 resolution: (512, 512) enable_bucket: True network_multiplier: 1.0 min_bucket_reso: 320 max_bucket_reso: 960 bucket_reso_steps: 64 bucket_no_upscale: False

[Subset 0 of Dataset 0] image_dir: "G:\AI Program\sd-webui-aki\sd-webui-aki\sd-webui-aki-v4\sd-webui-aki-v4\outputs\train_tools\projects\mmj_ori_1.0\versions\v1\dataset\processed\36_mmj_ori_1.0" image_count: 28 num_repeats: 36 shuffle_caption: False keep_tokens: 0 keep_tokens_separator: caption_dropout_rate: 0.0 caption_dropout_every_n_epoches: 0 caption_tag_dropout_rate: 0.0 caption_prefix: None caption_suffix: None color_aug: False flip_aug: False face_crop_aug_range: None random_crop: False token_warmup_min: 1, token_warmup_step: 0, is_reg: False class_tokens: mmj_ori_1.0 caption_extension: .txt

[Dataset 0] loading image sizes. make buckets number of images (including repeats) / 各bucketの画像枚数(繰り返し回数を含む) bucket 0: resolution (512, 512), count: 1008 mean ar error (without repeats): 0.0 preparing accelerator accelerator device: cuda loading model for process 0/1 load StableDiffusion checkpoint: G:\AI Program\sd-webui-aki\sd-webui-aki\sd-webui-aki-v4\sd-webui-aki-v4\models\Stable-diffusion\7th_anime_v3_A.safetensors UNet2DConditionModel: 64, [5, 10, 20, 20], 1024, False, False Train Tools: train.train error Error(s) in loading state_dict for UNet2DConditionModel: size mismatch for down_blocks.0.attentions.0.transformer_blocks.0.attn2.to_k.weight: copying a param with shape torch.Size([320, 768]) from checkpoint, the shape in current model is torch.Size([320, 1024]). size mismatch for down_blocks.0.attentions.0.transformer_blocks.0.attn2.to_v.weight: copying a param with shape torch.Size([320, 768]) from checkpoint, the shape in current model is torch.Size([320, 1024]). size mismatch for down_blocks.0.attentions.1.transformer_blocks.0.attn2.to_k.weight: copying a param with shape torch.Size([320, 768]) from checkpoint, the shape in current model is torch.Size([320, 1024]). size mismatch for down_blocks.0.attentions.1.transformer_blocks.0.attn2.to_v.weight: copying a param with shape torch.Size([320, 768]) from checkpoint, the shape in current model is torch.Size([320, 1024]). size mismatch for down_blocks.1.attentions.0.transformer_blocks.0.attn2.to_k.weight: copying a param with shape torch.Size([640, 768]) from checkpoint, the shape in current model is torch.Size([640, 1024]). size mismatch for down_blocks.1.attentions.0.transformer_blocks.0.attn2.to_v.weight: copying a param with shape torch.Size([640, 768]) from checkpoint, the shape in current model is torch.Size([640, 1024]). size mismatch for down_blocks.1.attentions.1.transformer_blocks.0.attn2.to_k.weight: copying a param with shape torch.Size([640, 768]) from checkpoint, the shape in current model is torch.Size([640, 1024]). size mismatch for down_blocks.1.attentions.1.transformer_blocks.0.attn2.to_v.weight: copying a param with shape torch.Size([640, 768]) from checkpoint, the shape in current model is torch.Size([640, 1024]). size mismatch for down_blocks.2.attentions.0.transformer_blocks.0.attn2.to_k.weight: copying a param with shape torch.Size([1280, 768]) from checkpoint, the shape in current model is torch.Size([1280, 1024]). size mismatch for down_blocks.2.attentions.0.transformer_blocks.0.attn2.to_v.weight: copying a param with shape torch.Size([1280, 768]) from checkpoint, the shape in current model is torch.Size([1280, 1024]). size mismatch for down_blocks.2.attentions.1.transformer_blocks.0.attn2.to_k.weight: copying a param with shape torch.Size([1280, 768]) from checkpoint, the shape in current model is torch.Size([1280, 1024]). size mismatch for down_blocks.2.attentions.1.transformer_blocks.0.attn2.to_v.weight: copying a param with shape torch.Size([1280, 768]) from checkpoint, the shape in current model is torch.Size([1280, 1024]). size mismatch for up_blocks.1.attentions.0.transformer_blocks.0.attn2.to_k.weight: copying a param with shape torch.Size([1280, 768]) from checkpoint, the shape in current model is torch.Size([1280, 1024]). size mismatch for up_blocks.1.attentions.0.transformer_blocks.0.attn2.to_v.weight: copying a param with shape torch.Size([1280, 768]) from checkpoint, the shape in current model is torch.Size([1280, 1024]). size mismatch for up_blocks.1.attentions.1.transformer_blocks.0.attn2.to_k.weight: copying a param with shape torch.Size([1280, 768]) from checkpoint, the shape in current model is torch.Size([1280, 1024]). size mismatch for up_blocks.1.attentions.1.transformer_blocks.0.attn2.to_v.weight: copying a param with shape torch.Size([1280, 768]) from checkpoint, the shape in current model is torch.Size([1280, 1024]). size mismatch for up_blocks.1.attentions.2.transformer_blocks.0.attn2.to_k.weight: copying a param with shape torch.Size([1280, 768]) from checkpoint, the shape in current model is torch.Size([1280, 1024]). size mismatch for up_blocks.1.attentions.2.transformer_blocks.0.attn2.to_v.weight: copying a param with shape torch.Size([1280, 768]) from checkpoint, the shape in current model is torch.Size([1280, 1024]). size mismatch for up_blocks.2.attentions.0.transformer_blocks.0.attn2.to_k.weight: copying a param with shape torch.Size([640, 768]) from checkpoint, the shape in current model is torch.Size([640, 1024]). size mismatch for up_blocks.2.attentions.0.transformer_blocks.0.attn2.to_v.weight: copying a param with shape torch.Size([640, 768]) from checkpoint, the shape in current model is torch.Size([640, 1024]). size mismatch for up_blocks.2.attentions.1.transformer_blocks.0.attn2.to_k.weight: copying a param with shape torch.Size([640, 768]) from checkpoint, the shape in current model is torch.Size([640, 1024]). size mismatch for up_blocks.2.attentions.1.transformer_blocks.0.attn2.to_v.weight: copying a param with shape torch.Size([640, 768]) from checkpoint, the shape in current model is torch.Size([640, 1024]). size mismatch for up_blocks.2.attentions.2.transformer_blocks.0.attn2.to_k.weight: copying a param with shape torch.Size([640, 768]) from checkpoint, the shape in current model is torch.Size([640, 1024]). size mismatch for up_blocks.2.attentions.2.transformer_blocks.0.attn2.to_v.weight: copying a param with shape torch.Size([640, 768]) from checkpoint, the shape in current model is torch.Size([640, 1024]). size mismatch for up_blocks.3.attentions.0.transformer_blocks.0.attn2.to_k.weight: copying a param with shape torch.Size([320, 768]) from checkpoint, the shape in current model is torch.Size([320, 1024]). size mismatch for up_blocks.3.attentions.0.transformer_blocks.0.attn2.to_v.weight: copying a param with shape torch.Size([320, 768]) from checkpoint, the shape in current model is torch.Size([320, 1024]). size mismatch for up_blocks.3.attentions.1.transformer_blocks.0.attn2.to_k.weight: copying a param with shape torch.Size([320, 768]) from checkpoint, the shape in current model is torch.Size([320, 1024]). size mismatch for up_blocks.3.attentions.1.transformer_blocks.0.attn2.to_v.weight: copying a param with shape torch.Size([320, 768]) from checkpoint, the shape in current model is torch.Size([320, 1024]). size mismatch for up_blocks.3.attentions.2.transformer_blocks.0.attn2.to_k.weight: copying a param with shape torch.Size([320, 768]) from checkpoint, the shape in current model is torch.Size([320, 1024]). size mismatch for up_blocks.3.attentions.2.transformer_blocks.0.attn2.to_v.weight: copying a param with shape torch.Size([320, 768]) from checkpoint, the shape in current model is torch.Size([320, 1024]). size mismatch for mid_block.attentions.0.transformer_blocks.0.attn2.to_k.weight: copying a param with shape torch.Size([1280, 768]) from checkpoint, the shape in current model is torch.Size([1280, 1024]). size mismatch for mid_block.attentions.0.transformer_blocks.0.attn2.to_v.weight: copying a param with shape torch.Size([1280, 768]) from checkpoint, the shape in current model is torch.Size([1280, 1024]). Traceback (most recent call last): File "G:\AI Program\sd-webui-aki\sd-webui-aki\sd-webui-aki-v4\sd-webui-aki-v4\extensions\sd-webui-train-tools\liasece_sd_webui_train_tools\train_ui.py", line 133, in on_train_begin_click train.train(cfg) File "G:\AI Program\sd-webui-aki\sd-webui-aki\sd-webui-aki-v4\sd-webui-aki-v4\extensions\sd-webui-train-tools\liasece_sd_webui_train_tools\train.py", line 44, in train trainer.train(args) File "G:\AI Program\sd-webui-aki\sd-webui-aki\sd-webui-aki-v4\sd-webui-aki-v4\extensions\sd-webui-train-tools\liasece_sd_webui_train_tools\sd_scripts\train_network.py", line 235, in train model_version, text_encoder, vae, unet = self.load_target_model(args, weight_dtype, accelerator) File "G:\AI Program\sd-webui-aki\sd-webui-aki\sd-webui-aki-v4\sd-webui-aki-v4\extensions\sd-webui-train-tools\liasece_sd_webui_train_tools\sd_scripts\train_network.py", line 103, in load_target_model textencoder, vae, unet, = train_util.load_target_model(args, weight_dtype, accelerator) File "G:\AI Program\sd-webui-aki\sd-webui-aki\sd-webui-aki-v4\sd-webui-aki-v4\extensions\sd-webui-train-tools\liasece_sd_webui_train_tools\sd_scripts\library\train_util.py", line 4113, in load_target_model text_encoder, vae, unet, load_stable_diffusion_format = _load_target_model( File "G:\AI Program\sd-webui-aki\sd-webui-aki\sd-webui-aki-v4\sd-webui-aki-v4\extensions\sd-webui-train-tools\liasece_sd_webui_train_tools\sd_scripts\library\train_util.py", line 4067, in _load_target_model text_encoder, vae, unet = model_util.load_models_from_stable_diffusion_checkpoint( File "G:\AI Program\sd-webui-aki\sd-webui-aki\sd-webui-aki-v4\sd-webui-aki-v4\extensions\sd-webui-train-tools\liasece_sd_webui_train_tools\sd_scripts\library\model_util.py", line 1008, in load_models_from_stable_diffusion_checkpoint info = unet.load_state_dict(converted_unet_checkpoint) File "G:\AI Program\sd-webui-aki\sd-webui-aki\sd-webui-aki-v4\sd-webui-aki-v4\py310\lib\site-packages\torch\nn\modules\module.py", line 2041, in load_state_dict raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format( RuntimeError: Error(s) in loading state_dict for UNet2DConditionModel: size mismatch for down_blocks.0.attentions.0.transformer_blocks.0.attn2.to_k.weight: copying a param with shape torch.Size([320, 768]) from checkpoint, the shape in current model is torch.Size([320, 1024]). size mismatch for down_blocks.0.attentions.0.transformer_blocks.0.attn2.to_v.weight: copying a param with shape torch.Size([320, 768]) from checkpoint, the shape in current model is torch.Size([320, 1024]). size mismatch for down_blocks.0.attentions.1.transformer_blocks.0.attn2.to_k.weight: copying a param with shape torch.Size([320, 768]) from checkpoint, the shape in current model is torch.Size([320, 1024]). size mismatch for down_blocks.0.attentions.1.transformer_blocks.0.attn2.to_v.weight: copying a param with shape torch.Size([320, 768]) from checkpoint, the shape in current model is torch.Size([320, 1024]). size mismatch for down_blocks.1.attentions.0.transformer_blocks.0.attn2.to_k.weight: copying a param with shape torch.Size([640, 768]) from checkpoint, the shape in current model is torch.Size([640, 1024]). size mismatch for down_blocks.1.attentions.0.transformer_blocks.0.attn2.to_v.weight: copying a param with shape torch.Size([640, 768]) from checkpoint, the shape in current model is torch.Size([640, 1024]). size mismatch for down_blocks.1.attentions.1.transformer_blocks.0.attn2.to_k.weight: copying a param with shape torch.Size([640, 768]) from checkpoint, the shape in current model is torch.Size([640, 1024]). size mismatch for down_blocks.1.attentions.1.transformer_blocks.0.attn2.to_v.weight: copying a param with shape torch.Size([640, 768]) from checkpoint, the shape in current model is torch.Size([640, 1024]). size mismatch for down_blocks.2.attentions.0.transformer_blocks.0.attn2.to_k.weight: copying a param with shape torch.Size([1280, 768]) from checkpoint, the shape in current model is torch.Size([1280, 1024]). size mismatch for down_blocks.2.attentions.0.transformer_blocks.0.attn2.to_v.weight: copying a param with shape torch.Size([1280, 768]) from checkpoint, the shape in current model is torch.Size([1280, 1024]). size mismatch for down_blocks.2.attentions.1.transformer_blocks.0.attn2.to_k.weight: copying a param with shape torch.Size([1280, 768]) from checkpoint, the shape in current model is torch.Size([1280, 1024]). size mismatch for down_blocks.2.attentions.1.transformer_blocks.0.attn2.to_v.weight: copying a param with shape torch.Size([1280, 768]) from checkpoint, the shape in current model is torch.Size([1280, 1024]). size mismatch for up_blocks.1.attentions.0.transformer_blocks.0.attn2.to_k.weight: copying a param with shape torch.Size([1280, 768]) from checkpoint, the shape in current model is torch.Size([1280, 1024]). size mismatch for up_blocks.1.attentions.0.transformer_blocks.0.attn2.to_v.weight: copying a param with shape torch.Size([1280, 768]) from checkpoint, the shape in current model is torch.Size([1280, 1024]). size mismatch for up_blocks.1.attentions.1.transformer_blocks.0.attn2.to_k.weight: copying a param with shape torch.Size([1280, 768]) from checkpoint, the shape in current model is torch.Size([1280, 1024]). size mismatch for up_blocks.1.attentions.1.transformer_blocks.0.attn2.to_v.weight: copying a param with shape torch.Size([1280, 768]) from checkpoint, the shape in current model is torch.Size([1280, 1024]). size mismatch for up_blocks.1.attentions.2.transformer_blocks.0.attn2.to_k.weight: copying a param with shape torch.Size([1280, 768]) from checkpoint, the shape in current model is torch.Size([1280, 1024]). size mismatch for up_blocks.1.attentions.2.transformer_blocks.0.attn2.to_v.weight: copying a param with shape torch.Size([1280, 768]) from checkpoint, the shape in current model is torch.Size([1280, 1024]). size mismatch for up_blocks.2.attentions.0.transformer_blocks.0.attn2.to_k.weight: copying a param with shape torch.Size([640, 768]) from checkpoint, the shape in current model is torch.Size([640, 1024]). size mismatch for up_blocks.2.attentions.0.transformer_blocks.0.attn2.to_v.weight: copying a param with shape torch.Size([640, 768]) from checkpoint, the shape in current model is torch.Size([640, 1024]). size mismatch for up_blocks.2.attentions.1.transformer_blocks.0.attn2.to_k.weight: copying a param with shape torch.Size([640, 768]) from checkpoint, the shape in current model is torch.Size([640, 1024]). size mismatch for up_blocks.2.attentions.1.transformer_blocks.0.attn2.to_v.weight: copying a param with shape torch.Size([640, 768]) from checkpoint, the shape in current model is torch.Size([640, 1024]). size mismatch for up_blocks.2.attentions.2.transformer_blocks.0.attn2.to_k.weight: copying a param with shape torch.Size([640, 768]) from checkpoint, the shape in current model is torch.Size([640, 1024]). size mismatch for up_blocks.2.attentions.2.transformer_blocks.0.attn2.to_v.weight: copying a param with shape torch.Size([640, 768]) from checkpoint, the shape in current model is torch.Size([640, 1024]). size mismatch for up_blocks.3.attentions.0.transformer_blocks.0.attn2.to_k.weight: copying a param with shape torch.Size([320, 768]) from checkpoint, the shape in current model is torch.Size([320, 1024]). size mismatch for up_blocks.3.attentions.0.transformer_blocks.0.attn2.to_v.weight: copying a param with shape torch.Size([320, 768]) from checkpoint, the shape in current model is torch.Size([320, 1024]). size mismatch for up_blocks.3.attentions.1.transformer_blocks.0.attn2.to_k.weight: copying a param with shape torch.Size([320, 768]) from checkpoint, the shape in current model is torch.Size([320, 1024]). size mismatch for up_blocks.3.attentions.1.transformer_blocks.0.attn2.to_v.weight: copying a param with shape torch.Size([320, 768]) from checkpoint, the shape in current model is torch.Size([320, 1024]). size mismatch for up_blocks.3.attentions.2.transformer_blocks.0.attn2.to_k.weight: copying a param with shape torch.Size([320, 768]) from checkpoint, the shape in current model is torch.Size([320, 1024]). size mismatch for up_blocks.3.attentions.2.transformer_blocks.0.attn2.to_v.weight: copying a param with shape torch.Size([320, 768]) from checkpoint, the shape in current model is torch.Size([320, 1024]). size mismatch for mid_block.attentions.0.transformer_blocks.0.attn2.to_k.weight: copying a param with shape torch.Size([1280, 768]) from checkpoint, the shape in current model is torch.Size([1280, 1024]). size mismatch for mid_block.attentions.0.transformer_blocks.0.attn2.to_v.weight: copying a param with shape torch.Size([1280, 768]) from checkpoint, the shape in current model is torch.Size([1280, 1024]).

`

My images are all in 512*512, all parameters are default

liasece commented 3 months ago

Did you check "Base on Stable Diffusion V2" in the Training Parameters area? If your model is not based on sd2, uncheck this box.

charming386 commented 3 months ago

Did you check "Base on Stable Diffusion V2" in the Training Parameters area? If your model is not based on sd2, uncheck this box.

Yes, that's the problem. Now it works. Thank you!