Jump to content

Connect Leeroopedia MCP: Equip your AI agents to search best practices, build plans, verify code, diagnose failures, and look up hyperparameter defaults.

Implementation:Alibaba ROLL Diffusion DeepSpeed Cluster

From Leeroopedia


Knowledge Sources
Domains Distributed_Systems, Diffusion_Models
Last Updated 2026-02-07 20:00 GMT

Overview

Concrete diffusion-specific DeepSpeed cluster initialization provided by the Alibaba ROLL library.

Description

The reward flow pipeline creates a single actor_train cluster with strategy_name="diffusion_deepspeed_train". The diffusion DeepSpeed strategy wraps the WanTrainingModule with DeepSpeed engine management.

Usage

Called during RewardFLPipeline initialization.

Code Reference

Source Location

  • Repository: Alibaba ROLL
  • File: roll/distributed/strategy/diffusion_strategy.py
  • Lines: L19-84

Signature

# Diffusion-specific DeepSpeed train strategy
class DeepSpeedTrainStrategy:
    """Diffusion-specific DeepSpeed wrapper."""

    def train_step(self, batch: DataProto, loss_func: Callable) -> Dict:
        """Execute diffusion training step through DeepSpeed engine."""

    def save_checkpoint(self, save_dir, global_step, ckpt_id, **kwargs) -> None:
        """Save only trainable (LoRA) parameters."""

Import

from roll.distributed.strategy.diffusion_strategy import DeepSpeedTrainStrategy

I/O Contract

Inputs

Name Type Required Description
config RewardFLConfig Yes Config with actor_train WorkerConfig

Outputs

Name Type Description
actor_train Cluster Single cluster with WanTrainingModule wrapped in DeepSpeed

Usage Examples

pipeline = RewardFLPipeline(pipeline_config=reward_fl_config)
# actor_train cluster with diffusion_deepspeed_train strategy

Related Pages

Implements Principle

Requires Environment

Environment Dependencies

This implementation requires the following environment constraints:

Heuristics Applied

This implementation uses the following heuristics:

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment