def main(args, self_id):
    """
    Start multiple script tasks using multiple processes, each process using one GPU.

    Args:
        self_id (str): Identifier for the current process.

    Returns:
        None
    """
    disabled_ids = []
    if args.disabled_gpu_ids:
        disabled_ids = [int(i) for i in args.disabled_gpu_ids.split(",")]
        logger.info(f"CUDA_DISABLE_ID is set, not using: {disabled_ids}")

    gpus_count = get_gpu_nums()

    available_gpus = [i for i in range(gpus_count) if i not in disabled_ids]
    processes = []

    for gpu_id in available_gpus:
        process = multiprocessing.Process(
            target=run_script, args=(args, gpu_id, self_id)
        )
        process.start()
        logger.info(f"GPU {gpu_id}: started...")
        time.sleep(1)
        processes.append(process)

    for process in processes:
        process.join()
Start multiple script tasks using multiple processes, each process using one GPU.

Args:
self_id (str): Identifier for the current process.

Returns:
None
preprocessors/Emilia/main_multi.py