Walking speed is recalculated every time the contents of the player's inventory are changed. This recalculation takes into account player's current inventory size and the stack sizes of the items in the inventory. If another mod changes the size of the player inventory, that will take effect the next time the player picks up or drops an item.