mirror of
https://github.com/SakanaAI/doc-to-lora.git
synced 2026-07-23 17:01:04 +02:00
Reset model hooks prior to base feature extraction and base model inference passes
This commit is contained in:
parent
70e60aa6aa
commit
073d909468
1 changed files with 6 additions and 0 deletions
|
|
@ -500,6 +500,9 @@
|
|||
" \"\"\"\n",
|
||||
" Extracts visual features layer-by-layer and generates the dynamic LoRA adapter.\n",
|
||||
" \"\"\"\n",
|
||||
" # Ensure any patched LoRA hooks are cleared before feature extraction\n",
|
||||
" model.reset()\n",
|
||||
"\n",
|
||||
" internalize_messages = [\n",
|
||||
" [\n",
|
||||
" {\n",
|
||||
|
|
@ -571,6 +574,9 @@
|
|||
" Runs inference comparing base model (using visual tokens) vs Video2LoRA (zero visual tokens).\n",
|
||||
" \"\"\"\n",
|
||||
" # === Part A: Base Model Inference (with visual tokens) ===\n",
|
||||
" # Ensure any patched LoRA hooks are cleared for a clean base VLM forward pass\n",
|
||||
" model.reset()\n",
|
||||
"\n",
|
||||
" base_messages = [\n",
|
||||
" [\n",
|
||||
" {\n",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue