Skip to content

[BUG] Outdated Janus implementation needs refactoring #194

Closed
@htlou

Description

@htlou

Required prerequisites

What version of align-anything are you using?

Newest (cutoff 4.27)

System information

System version: 3.11.11 (main, Dec 11 2024, 16:28:39) [GCC 11.2.0] linux
Align Anything version: newest, cutoff date 0427, after commit eea5af6

Problem description

The existing Janus implementation was merged in February 2025. Since then, align-anything has undergone several major refactorings, which have resulted in the following issues with the Janus implementation:

  • The image output finetuning contains an outdated version of the chat template, which prevents it from simultaneously supporting both Janus and Janus Pro models
  • The image output DPO has a naming inconsistency with DPOTextTrainer, causing a TypeError: DPOTrainer.loss() got an unexpected keyword argument 'batch' error
  • The image input finetuning has issues with dataset loading and inconsistent function naming in the backend, causing a data loading error.

Reproducible example code

/

Traceback

Expected behavior

No response

Additional context

I'm currently fixing these bugs. To be specific:

  • All the bugs in the image output fine-tuning/DPO are fixed.
  • The dataset loading error in the image input fine-tuning has been successfully located. I will fix this error in the next few days.

After all the bugs are fixed and tested, I will open a PR and merge these modifications. All the updates during this process will be reported in this thread.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions