Skip to content

Refactoring for enhanced scheduler #22

Open
mlinmg wants to merge 42 commits into
mainfrom
enhanced_scheduler
Open

Refactoring for enhanced scheduler #22
mlinmg wants to merge 42 commits into
mainfrom
enhanced_scheduler

Conversation

@mlinmg

@mlinmg mlinmg commented Dec 4, 2024

Copy link
Copy Markdown
Contributor

Preparing for the addition of new models the scheduler needs refactoring

current behavior:

The scheduler have two phases in the first one the model class prepare the async generators and the generation context ( the generation conditioning for instance and/or the voice cloining conditioning for the vocoder)
This work well with vllm but other models that do not use it might have problems

Desired Behavior

Ideally the scheduler should work like the vllm scheduler and add the request to the queue, and then dynamically batch them based on the system constraint, the scheduler should have three distinct phases:

  1. The conditioning generation (if present)
  2. The Phonetic generation phase
  3. The speech generation phase

The step needed for this taks are

  • profiling of the model to get the concurrency values if the model will wold in a worst case scenario (avoid OOM during the process)
  • add a dynamic batch generation logic which will batch request till the concurrency limit
  • divide each queue(three in total) for better efficiency
  • process and store each queue results in buffer waiting to be passes to the next step every output is inserted in the next queue

I've also introduced a memory manager class, but due to our limited bandwidth we can't introduce it by ourselfs, so any help is welcome!
I'll open an issue as a tracker for that implementation

@mlinmg mlinmg self-assigned this Dec 4, 2024
@mlinmg
mlinmg force-pushed the enhanced_scheduler branch from 6cdd1ce to e06e084 Compare December 28, 2024 14:45
…d_scheduler

# Conflicts:
#	src/auralis/__init__.py
#	src/auralis/common/definitions/dto/requests.py
#	src/auralis/common/definitions/protocols/openai.py
#	src/auralis/common/metrics/performance.py
#	src/auralis/common/utilities.py
#	src/auralis/common/vllm/hijack.py
#	src/auralis/core/tts.py
#	src/auralis/models/base.py
#	src/auralis/models/xttsv2/XTTSv2.py
#	tests/integration/memory_usage.py
#	tests/integration/test_genearte_audio_sync.py
#	tests/integration/test_generate_audio_async.py
…d_scheduler

# Conflicts:
#	src/auralis/core/tts.py
#	src/auralis/models/xttsv2/utils/checkpoint_converter.py
@mlinmg

mlinmg commented Jan 23, 2025

Copy link
Copy Markdown
Contributor Author

@GiacomoLeoneMaria Can you check over the weekend to see where are the issues so we can merge this?

@juangon

juangon commented Mar 9, 2025

Copy link
Copy Markdown

Seems there is a conflict...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants