Skip to content

Commit c266e7e

Browse files
committed
Fix load_ESM config inference and revision
1 parent b608f1e commit c266e7e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ seq_ints = sequence_to_af2_indices("ACDEFGHIK")
6464

6565
- `repo_id = "facebook/esmfold_v1"`
6666
- `filename = "model.safetensors"`
67-
- `revision = "refs/pr/6"`
67+
- `revision = "ba837a3"`
6868

6969
Downloaded files are cached by HuggingFaceApi in your Julia depot (via OhMyArtifacts).
7070
You can override the source if you want to point at a PR or a specific commit:

src/weights.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,10 @@ function load_esmfold_safetensors!(model::ESMFoldEmbed, path::AbstractString)
142142
end
143143

144144
function _infer_esmfold_config(reader::SafeTensors.Reader)
145-
keys = collect(keys(reader.header))
145+
header_keys = collect(keys(reader.header))
146146

147147
layer_ids = Int[]
148-
for key in keys
148+
for key in header_keys
149149
startswith(key, "esm.encoder.layer.") || continue
150150
parts = split(key, '.')
151151
length(parts) < 4 && continue
@@ -177,7 +177,7 @@ end
177177
function load_ESM(;
178178
repo_id::AbstractString = "facebook/esmfold_v1",
179179
filename::AbstractString = "model.safetensors",
180-
revision::AbstractString = "refs/pr/6",
180+
revision::AbstractString = "ba837a3",
181181
cache::Bool = true,
182182
local_files_only::Bool = false,
183183
use_esm_attn_map::Bool = false,

0 commit comments

Comments
 (0)