from lightning_fabric import Fabric


def initialize_fabric(seed: int, devices: str | int = "auto"):
    fabric = Fabric(devices=devices)
    fabric.seed_everything(seed)
    fabric.launch()
    return fabric
