Revert "Use correct key to get the number of layers, I accidentally used a layer with a 'final' layer giving me an out by one error"

This reverts commit e43ecbeb64.
This commit is contained in:
gchapman
2024-06-18 23:42:08 +01:00
parent e43ecbeb64
commit 5b082f424d
2 changed files with 1 additions and 3 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ conversion_map_ms = [ # for multi_scale_train (MS)
] ]
def get_depth(state_dict): def get_depth(state_dict):
return sum(key.endswith('cross_attn.proj.weight') for key in state_dict.keys()) return sum(key.endswith('.scale_shift_table') for key in state_dict.keys())
def get_conversion_map(state_dict): def get_conversion_map(state_dict):
conversion_map = [ # main SD conversion map (PixArt reference, HF Diffusers) conversion_map = [ # main SD conversion map (PixArt reference, HF Diffusers)
-2
View File
@@ -76,8 +76,6 @@ def load_pixart(model_path, model_conf):
device=model_management.get_torch_device() device=model_management.get_torch_device()
) )
model_conf.unet_config['depth'] = sum(key.endswith('cross_attn.proj.weight') for key in state_dict.keys())
if model_conf.model_target == "PixArtMS": if model_conf.model_target == "PixArtMS":
from .models.PixArtMS import PixArtMS from .models.PixArtMS import PixArtMS
model.diffusion_model = PixArtMS(**model_conf.unet_config) model.diffusion_model = PixArtMS(**model_conf.unet_config)