Skip to content

Remove Hardcoded Paths in Config and Test Files #15

Description

@ArrKss

Description

The project contains hardcoded file paths in both the configuration file (diffusion/configs/config_relactrl_pixart_1024.py) and test script (pipeline/test_relactrl_pixart_1024.py). These paths reference specific user directories (e.g., /home/jovyan/maao-data-cephfs-0/...) which will not work for other users running the code.

Examples

In pipeline/test_relactrl_pixart_1024.py:

t5_model_path = "/home/jovyan/maao-data-cephfs-0/dataspace/maao/projects/Common/models/PixArt-alpha/"

In diffusion/configs/config_relactrl_pixart_1024.py:

model_path = '/home/jovyan/maao-data-cephfs-0/dataspace/maao/projects/Common/models/PixArt-alpha/PixArt-ControlNet/PixArt-XL-2-1024-ControlNet.pth'

Proposed Solution

Replace hardcoded paths with environment variables or relative paths. Consider:

  1. Using environment variables for model paths: os.environ.get('PIXART_MODEL_PATH')
  2. Supporting path configuration through command-line arguments with reasonable defaults
  3. Creating a standardized model directory structure that's relative to the project root

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions