modelscope / modelscope/DiffSynth-Studio

kontext全参数训练进行sft:data_process处理时报错

Open
#1,107 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
13.1k
Forks
1.3k
Avg merge
13h 12m
Merged PRs (30d)
45

Description

[rank0]: Traceback (most recent call last):
[rank0]: File "/picassox/intelligent-cpfs/innovation/lsh2/github_projects/DiffSynth-Studio/examples/flux/model_training/train.py", line 193, in
[rank0]: launcher_map[args.task](accelerator, dataset, model, model_logger, args=args)
[rank0]: File "/picassox/intelligent-cpfs/innovation/lsh2/github_projects/DiffSynth-Studio/diffsynth/diffusion/runner.py", line 62, in launch_data_process_task
[rank0]: model, dataloader = accelerator.prepare(model, dataloader)
[rank0]: File "/picassox/intelligent-cpfs/innovation/lsh2/site-packages/accelerate/accelerator.py", line 1551, in prepare
[rank0]: result = self._prepare_deepspeed(*args)
[rank0]: File "/picassox/intelligent-cpfs/innovation/lsh2/site-packages/accelerate/accelerator.py", line 2296, in _prepare_deepspeed
[rank0]: engine, optimizer, _, lr_scheduler = ds_initialize(**kwargs)
[rank0]: File "/usr/local/lib/python3.10/site-packages/deepspeed/init.py", line 203, in initialize
[rank0]: engine = DeepSpeedEngine(args=args,
[rank0]: File "/usr/local/lib/python3.10/site-packages/deepspeed/runtime/engine.py", line 360, in init
[rank0]: self.optimizer = self._configure_zero_optimizer(optimizer=None)
[rank0]: File "/usr/local/lib/python3.10/site-packages/deepspeed/runtime/engine.py", line 1763, in _configure_zero_optimizer
[rank0]: assert not isinstance(optimizer, DummyOptim), "zero stage {} requires an optimizer".format(zero_stage)
[rank0]: AssertionError: zero stage 2 requires an optimizer

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with examples/flux/model_training/train.py at line 193 and diffsynth/diffusion/runner.py at line 62, where the data-processing task calls accelerator.prepare. Reproduce the full-parameter SFT data_process run and inspect the DeepSpeed initialization leading to the zero stage 2 optimizer assertion. Done means the task completes without this error and the affected training path is covered by a verified run.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.