[PR #87] Adding memory management capabilities #213

Open
opened 2026-10-26 21:14:09 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/deepseek-ai/Janus/pull/87
Author: @ElkanaBaris
Created: 1/29/2025
Status: 🔄 Open

Base: main ← Head: memory_management


📝 Commits (2)

  • cab2784 adding memory monitoring decorator
  • edd64d8 adding memory monitoring to janus flow

📊 Changes

8 files changed (+116 additions, -13 deletions)

View changed files

📝 generation_inference.py (+27 -13)
📝 janus/janusflow/models/clip_encoder.py (+4 -0)
📝 janus/janusflow/models/modeling_vlm.py (+2 -0)
📝 janus/janusflow/models/processing_vlm.py (+2 -0)
📝 janus/models/clip_encoder.py (+4 -0)
📝 janus/models/modeling_vlm.py (+5 -0)
📝 janus/models/processing_vlm.py (+4 -0)
➕ janus/utils/cuda_memory_manager.py (+68 -0)

📄 Description

In order to support low-cost development and training,
this PR add memory management decorators to memory-heavy operations.
This enables users to better control and reduce memory footprint in low-mem low-cost environments.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/deepseek-ai/Janus/pull/87 **Author:** [@ElkanaBaris](https://github.com/ElkanaBaris) **Created:** 1/29/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `memory_management` --- ### 📝 Commits (2) - [`cab2784`](https://github.com/deepseek-ai/Janus/commit/cab2784c2040c6f273c8c27bab00fd2cd079729a) adding memory monitoring decorator - [`edd64d8`](https://github.com/deepseek-ai/Janus/commit/edd64d88f5d02a691818c19472a91f889ba17322) adding memory monitoring to janus flow ### 📊 Changes **8 files changed** (+116 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `generation_inference.py` (+27 -13) 📝 `janus/janusflow/models/clip_encoder.py` (+4 -0) 📝 `janus/janusflow/models/modeling_vlm.py` (+2 -0) 📝 `janus/janusflow/models/processing_vlm.py` (+2 -0) 📝 `janus/models/clip_encoder.py` (+4 -0) 📝 `janus/models/modeling_vlm.py` (+5 -0) 📝 `janus/models/processing_vlm.py` (+4 -0) ➕ `janus/utils/cuda_memory_manager.py` (+68 -0) </details> ### 📄 Description In order to support low-cost development and training, this PR add memory management decorators to memory-heavy operations. This enables users to better control and reduce memory footprint in low-mem low-cost environments. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/Janus#213
No description provided.