Support non-quantized bundles

This commit is contained in:
Brandon Rising
2024-09-03 16:04:42 -04:00
committed by Brandon
parent a005d06255
commit 2d0e34e57b

View File

@@ -191,6 +191,8 @@ class FluxCheckpointModel(ModelLoader):
with SilenceWarnings():
model = Flux(params[config.config_path])
sd = load_file(model_path)
if "model.diffusion_model.double_blocks.0.img_attn.norm.key_norm.scale" in sd:
sd = convert_bundle_to_flux_transformer_checkpoint(sd)
model.load_state_dict(sd, assign=True)
return model