From 578d89821eb7d679c4bf0029e902c5647031f68e Mon Sep 17 00:00:00 2001 From: lirui <771725652@qq.com> Date: Fri, 20 Dec 2024 14:54:20 +0800 Subject: [PATCH] Fix --- examples/ray/ray_flux_example.py | 4 ++-- examples/ray/ray_run.sh | 2 +- examples/ray/ray_sd3_example.py | 4 ++-- xfuser/config/config.py | 1 - xfuser/ray/worker/worker.py | 1 - 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/examples/ray/ray_flux_example.py b/examples/ray/ray_flux_example.py index 0def53e..1292d04 100644 --- a/examples/ray/ray_flux_example.py +++ b/examples/ray/ray_flux_example.py @@ -53,10 +53,10 @@ def main(): # output is a list of results from each worker, we take the last one for i, image in enumerate(output[-1].images): image.save( - f"/data/results/{model_name}_result_{i}.png" + f"./results/{model_name}_result_{i}.png" ) print( - f"image {i} saved to /data/results/{model_name}_result_{i}.png" + f"image {i} saved to ./results/{model_name}_result_{i}.png" ) diff --git a/examples/ray/ray_run.sh b/examples/ray/ray_run.sh index e90fc0a..97ecf50 100644 --- a/examples/ray/ray_run.sh +++ b/examples/ray/ray_run.sh @@ -3,7 +3,7 @@ set -x export PYTHONPATH=$PWD:$PYTHONPATH # Select the model type -export MODEL_TYPE="Sd3" +export MODEL_TYPE="Flux" # Configuration for different model types # script, model_id, inference_step declare -A MODEL_CONFIGS=( diff --git a/examples/ray/ray_sd3_example.py b/examples/ray/ray_sd3_example.py index 1b7294a..79bbc21 100644 --- a/examples/ray/ray_sd3_example.py +++ b/examples/ray/ray_sd3_example.py @@ -66,10 +66,10 @@ def main(): # output is a list of results from each worker, we take the last one for i, image in enumerate(output[-1].images): image.save( - f"/data/results/{model_name}_result_{i}.png" + f"./results/{model_name}_result_{i}.png" ) print( - f"image {i} saved to /data/results/{model_name}_result_{i}.png" + f"image {i} saved to ./results/{model_name}_result_{i}.png" ) diff --git a/xfuser/config/config.py b/xfuser/config/config.py index df302e6..eeb2214 100644 --- a/xfuser/config/config.py +++ b/xfuser/config/config.py @@ -192,7 +192,6 @@ class ParallelConfig: sp_config: SequenceParallelConfig pp_config: PipeFusionParallelConfig tp_config: TensorParallelConfig - distributed_executor_backend: Optional[str] = None world_size: int = 1 # FIXME: remove this worker_cls: str = "xfuser.ray.worker.worker.Worker" diff --git a/xfuser/ray/worker/worker.py b/xfuser/ray/worker/worker.py index d683c8f..574ea01 100644 --- a/xfuser/ray/worker/worker.py +++ b/xfuser/ray/worker/worker.py @@ -1,4 +1,3 @@ - from abc import ABC, abstractmethod from xfuser.core.distributed import (