mirror of
https://github.com/deepseek-ai/Janus.git
synced 2026-11-05 00:57:18 +00:00
[PR #137] [CLOSED] Fix: Handle past_key_values AttributeError in generate Function #221
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/Janus#221
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/deepseek-ai/Janus/pull/137
Author: @scifisatan
Created: 2/4/2025
Status: ❌ Closed
Base:
main← Head:main📝 Commits (1)
25466b5fix: streamline past_key_values handling in generate function📊 Changes
1 file changed (+9 additions, -14 deletions)
View changed files
📝
demo/app_janusflow.py(+9 -14)📄 Description
Issue
The
generatefunction inapp_janusflow.pyencountered the following error:I was running
Python 3.10.12and it error occured when i ranpython3 demo/app_janusflow.pyCause:
The error occurred because
past_key_valueswas being passed as atupletovl_gpt.language_model.model, while the expected structure required eitherNoneor a properly formatted past key-value state.Fix
past_key_valuesis correctly initialized asNoneat the start (step == 0).tuplefrom being incorrectly accessed whenpast_key_valuesisNone.Testing
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.