Skip to content

[Bug]int() parsing failure when component contains P suffix during RFD3 input parsing #362

Description

@seacid

Bug: int() parsing failure when component contains P suffix during RFD3 input parsing

Description

During RFD3 inference, the input parser fails when processing the generated design length component.

The parser function accumulate_components() expects each non-motif component to be an integer value and directly converts the component using:

n = int(component)

However, the component list generated by get_design_pattern_with_constraints() contains a string value with a protein type suffix:

component = "80P"

This value cannot be converted by Python's int() function:

int("80P")

resulting in:

ValueError: invalid literal for int() with base 10: '80P'

Reproduction

Input specification:

{
    "test_L80": {
        "input": "/content/L-homoserine_seed.pdb",
        "length": "80-80",
        "ligand": "LIG",
        "dialect": 2
    }
}

Component expansion result:

get_design_pattern_with_constraints(
    "80-80",
    length="80-80"
)

# returns:
['80P']

The generated component is then passed into:

accumulate_components()

where the parser assumes:

component == "80"

but receives:

component == "80P"

Expected behavior

The component format passed to accumulate_components() should match the parser expectation.

Either:

  1. The component generator should return an integer-compatible value:
80

or:

  1. The parser should explicitly support typed component strings:
80P

and extract the numeric length before integer conversion.


Affected code

File:

rfd3/src/rfd3/inference/input_parsing.py

Function:

accumulate_components()

Current logic:

else:
    n = int(component)

The current implementation assumes that all non-alphabetic components are pure integers.


Environment

Repository:

foundry_RFdiffusion3

Related modules:

foundry.utils.components
rfd3.inference.input_parsing

Model initialization and checkpoint loading complete successfully. The failure occurs only during input component parsing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions