Tts swapping out torch with torchWithCuda

In 24.11 the torch package that was used with tts supported cuda, but that seems to have been changed with 25.05 , we now get an error that torch isn’t compiled with cuda support.

Unfortunately I need to use CUDA to have decent speed. I copied the source for the tts package located at nixpkgs/pkgs/by-name/tt/tts/package.nix at 7c43f080a7f28b2774f3b3f43234ca11661bf334 · NixOS/nixpkgs · GitHub and replaced torch with torchWithCuda under propagatedBuildInputs and am getting the following error when it tries to builld:

unning phase: pythonCatchConflictsPhase
Found duplicated packages in closure for dependency 'triton': 
  triton 3.1.0 (/nix/store/l1iijhnkywlsjp5jcdycxh5jzai4pi5y-python3.12-triton-3.1.0)
    dependency chain:
      this derivation: /nix/store/myqnmwwz2d2x7cq4lyxgcdbxkp6zdwx7-coqui-tts-0.26.0
      ...depending on: /nix/store/9yxm47yydbyjdz5m7dh5f39i57inpswj-python3.12-encodec-0.1.1
      ...depending on: /nix/store/831imiy4g9v6g3pk23hqchx1j11j0jkd-python3.12-torch-2.6.0-dev
      ...depending on: /nix/store/l1iijhnkywlsjp5jcdycxh5jzai4pi5y-python3.12-triton-3.1.0
  triton 3.1.0 (/nix/store/byc9yb19xysr9w9k43pcq3jzb3wa2dfy-python3.12-triton-3.1.0)
    dependency chain:
      this derivation: /nix/store/myqnmwwz2d2x7cq4lyxgcdbxkp6zdwx7-coqui-tts-0.26.0
      ...depending on: /nix/store/a81x39qbnpaq8lpmqjf5xags9ckyg21j-python3.12-torch-2.6.0-dev
      ...depending on: /nix/store/byc9yb19xysr9w9k43pcq3jzb3wa2dfy-python3.12-triton-3.1.0
Found duplicated packages in closure for dependency 'torch': 
  torch 2.6.0 (/nix/store/nxmbns8b85pl1lz86zmcdibyhczkygsw-python3.12-torch-2.6.0)
    dependency chain:
      this derivation: /nix/store/myqnmwwz2d2x7cq4lyxgcdbxkp6zdwx7-coqui-tts-0.26.0
      ...depending on: /nix/store/9yxm47yydbyjdz5m7dh5f39i57inpswj-python3.12-encodec-0.1.1
      ...depending on: /nix/store/831imiy4g9v6g3pk23hqchx1j11j0jkd-python3.12-torch-2.6.0-dev
      ...depending on: /nix/store/nxmbns8b85pl1lz86zmcdibyhczkygsw-python3.12-torch-2.6.0
  torch 2.6.0 (/nix/store/fravx29kwpz2472c6q8cniwnfg1ymvca-python3.12-torch-2.6.0)
    dependency chain:
      this derivation: /nix/store/myqnmwwz2d2x7cq4lyxgcdbxkp6zdwx7-coqui-tts-0.26.0
      ...depending on: /nix/store/a81x39qbnpaq8lpmqjf5xags9ckyg21j-python3.12-torch-2.6.0-dev
      ...depending on: /nix/store/fravx29kwpz2472c6q8cniwnfg1ymvca-python3.12-torch-2.6.0

Package duplicates found in closure, see above. Usually this happens if two packages depend on different version of the same dependency.
error: builder for '/nix/store/47lnjf5y4l255x4jqawhjknvvhkhjs9p-coqui-tts-0.26.0.drv' failed with exit code 1
error: 1 dependencies of derivation '/nix/store/v08wxwljxxxfvf11kcsxlchs3sx9fb1z-system-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/ficzc65yl4yjpa82rfwhii0m8zr2s9s7-nixos-system-cornwall-office-dan-25.05.802491.7c43f080a7f2.drv' failed to build

the copied package works fine before changing the dependency, does any one know how to fix this?