RosettaCommons / RosettaCommons/foundry

RFD3 error with inference_sampler.allow_realignment option

Open
#154 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug RFdiffusion3
Dominant language
Python
Stars
966
Forks
181
Avg merge
4d 4h
Merged PRs (30d)
2

Description

I'm getting this error in RFdiffusion3 when running motif scaffolding with allow_realignment=True

foundry/utils/alignment.py:60 in weighted_rigid_align                          │
│                                                                              │
│   57 │   # Computation of the covariance matrix                              │
│   58 │   C = torch.einsum("bji,bjk->bik", w_resolved[..., None] * X_gt_resol │
│   59 │                                                                       │
│ ❱ 60 │   U, S, V = torch.linalg.svd(C)                                       │
│   61 │                                                                       │
│   62 │   R = U @ V                                                           │
│   63 │   B, _, _ = X_L.shape                                                 │

RuntimeError: "svd_cuda_gesvdjBatched" not implemented for 'BFloat16'

I'm wondering if this is a bug or a mistake in my command

rfd3 design \
        out_dir=test \
        inputs=input.json \
        dump_trajectories=True \
        prevalidate_inputs=True \
        inference_sampler.allow_realignment=True \
        n_batches=1 \
        diffusion_batch_size=1

with this example json file used as input:

 {
     "test": {
         "input": "7v11.pdb",
         "ligand": "OQO",
         "unindex": "A431,A572-573",
         "length": "200",
         "select_fixed_atoms": {
             "A431": "TIP",
             "A572": "BKBN",
            "A573": "BKBN"
        }
    }
}

The error does not occur when doing unconditional generation with allow_realignment=True set or when doing motif scaffolding without the argument.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at foundry/utils/alignment.py:60 and reproduce the provided rfd3 command with the example input. Compare the dtype paths for motif scaffolding with allow_realignment=True against unconditional generation and motif scaffolding without the option. Done means the reported BFloat16 SVD error no longer occurs for the supplied motif-scaffolding case.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, pytorch
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.