Unverified Commit 61fc0bf5 authored by kirillrdy's avatar kirillrdy Committed by GitHub
Browse files

exo: 1.0.63 -> 1.0.65 (#482834)

parents 8cad31cf 91da7729
Loading
Loading
Loading
Loading
+12 −11
Original line number Diff line number Diff line
@@ -18,13 +18,13 @@
  nix-update-script,
}:
let
  version = "1.0.63";
  version = "1.0.65";
  src = fetchFromGitHub {
    name = "exo";
    owner = "exo-explore";
    repo = "exo";
    tag = "v${version}";
    hash = "sha256-aQ3rGLtT/zvIVdKQcwqODulzEHBKg7KMkBg3KJEscho=";
    hash = "sha256-Zj174EySIILdj7+QJVT6ZGYvjO+jXHj+GizVsve2lFk=";
  };

  pyo3-bindings = python3Packages.buildPythonPackage (finalAttrs: {
@@ -71,7 +71,7 @@ let
        sourceRoot
        ;
      fetcherVersion = 2;
      hash = "sha256-w3FZL/yy8R+SWCQF7+v21sKyizvZMmipG6IfhJeSjyQ=";
      hash = "sha256-3ZgE1ysb1OeB4BNszvlrnYcc7gOo7coPfOEQmMHC6E0=";
    };
  });
in
@@ -100,15 +100,10 @@ python3Packages.buildPythonApplication (finalAttrs: {
        "_MemoryObjectStreamState as AnyioState,"
  ''
  + lib.optionalString stdenv.hostPlatform.isDarwin ''
    substituteInPlace src/exo/worker/utils/macmon.py \
    substituteInPlace src/exo/utils/info_gatherer/info_gatherer.py \
      --replace-fail \
        'path = shutil.which("macmon")' \
        'path = "${lib.getExe macmon}"'

    substituteInPlace src/exo/worker/utils/tests/test_macmon.py \
      --replace-fail \
        'cmd=["macmon"' \
        'cmd=["${lib.getExe macmon}"'
        'shutil.which("macmon")' \
        '"${lib.getExe macmon}"'
  '';

  build-system = with python3Packages; [
@@ -137,6 +132,7 @@ python3Packages.buildPythonApplication (finalAttrs: {
      hypercorn
      jinja2
      loguru
      mflux
      mlx
      mlx-lm
      nvidia-ml-py
@@ -148,10 +144,12 @@ python3Packages.buildPythonApplication (finalAttrs: {
      psutil
      pydantic
      pyo3-bindings
      python-multipart
      rustworkx
      scapy
      tiktoken
      tinygrad
      tomlkit
      transformers
      uvloop
    ]
@@ -179,6 +177,9 @@ python3Packages.buildPythonApplication (finalAttrs: {

    # ValueError: zip() argument 2 is longer than argument 1
    "test_events_processed_in_correct_order"

    # system_profiler is not available in the sandbox
    "test_tb_parsing"
  ];

  disabledTestPaths = [
+160 −0
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  buildPythonPackage,
  fetchFromGitHub,

  # build-system
  uv-build,

  # dependencies
  filelock,
  fonttools,
  huggingface-hub,
  matplotlib,
  mlx,
  numpy,
  opencv-python,
  piexif,
  pillow,
  platformdirs,
  regex,
  requests,
  safetensors,
  sentencepiece,
  tokenizers,
  toml,
  torch,
  tqdm,
  transformers,
  twine,
  urllib3,

  # tests
  pytestCheckHook,
  writableTmpDirAsHomeHook,
}:

buildPythonPackage (finalAttrs: {
  pname = "mflux";
  version = "0.15.4";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "filipstrand";
    repo = "mflux";
    tag = "v.${finalAttrs.version}";
    hash = "sha256-rubwj4/XCUajnr1wp64rnzbvS+yXt9zbG6eT+DXEdko=";
  };

  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace-fail "uv_build>=0.7.19,<0.8.0" "uv_build"
  '';

  build-system = [
    uv-build
  ];

  pythonRelaxDeps = [
    "huggingface-hub"
    "mlx"
    "pillow"
    "transformers"
  ];
  dependencies = [
    filelock
    fonttools
    huggingface-hub
    matplotlib
    mlx
    numpy
    opencv-python
    piexif
    pillow
    platformdirs
    regex
    requests
    safetensors
    sentencepiece
    tokenizers
    toml
    torch
    tqdm
    transformers
    twine
    urllib3
  ];

  pythonImportsCheck = [ "mflux" ];

  nativeCheckInputs = [
    pytestCheckHook
    writableTmpDirAsHomeHook
  ];

  disabledTests = [
    # Require internet access
    "test_concept_attention_from_image"
    "test_concept_attention_generation"
    "test_empty_stdin_fails_generation"
    "test_fill"
    "test_flux2_klein_9b_edit_dalmatian"
    "test_flux2_klein_9b_edit_glasses_wide"
    "test_flux2_klein_9b_edit_sunglasses_wide"
    "test_flux2_klein_9b_text_to_image"
    "test_flux2_klein_text_to_image"
    "test_ic_edit_with_instruction"
    "test_image_generation_dev"
    "test_image_generation_dev_controlnet"
    "test_image_generation_dev_image_to_image"
    "test_image_generation_dev_lora"
    "test_image_generation_dev_lora_controlnet"
    "test_image_generation_dev_multiple_loras"
    "test_image_generation_fibo"
    "test_image_generation_fibo_refined_white_owl"
    "test_image_generation_kontext"
    "test_image_generation_qwen_edit"
    "test_image_generation_qwen_edit_multiple_images"
    "test_image_generation_redux"
    "test_image_generation_schnell"
    "test_image_generation_schnell_controlnet"
    "test_image_generation_with_reference_image"
    "test_image_generation_z_image_turbo"
    "test_image_generation_z_image_turbo_lora"
    "test_image_upscaling"
    "test_in_context_lora_identity"
    "test_metadata_complete"
    "test_pipe_from_echo_command"
    "test_qwen_image_generation_image_to_image"
    "test_qwen_image_generation_lora"
    "test_qwen_image_generation_text_to_image"
    "test_resume_training"
    "test_save_and_load_4bit_model"
    "test_save_and_load_4bit_model_with_lora"
    "test_save_with_lora_has_same_shard_count_as_base"
    "test_seedvr2_upscale"
    "test_stdin_prompt_multiline_with_actual_generation"
    "test_stdin_prompt_with_actual_generation"
    "test_train_and_load_weights"
    "test_vlm_generate_json"
    "test_vlm_inspire_json_from_image"
    "test_vlm_inspire_json_from_image_with_prompt"
    "test_vlm_refine_json_text_only"

    # Hangs indefinitely
    "test_real_vae_tiling_compatibility"
  ]
  ++ lib.optionals stdenv.hostPlatform.isDarwin [
    # Hangs indefinitely
    "test_depth_pro_generation"
  ];

  meta = {
    description = "MLX native implementations of state-of-the-art generative image models";
    homepage = "https://github.com/filipstrand/mflux";
    changelog = "https://github.com/filipstrand/mflux/blob/${finalAttrs.src.tag}/CHANGELOG.md";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ GaetanLepage ];
  };
})
+2 −0
Original line number Diff line number Diff line
@@ -9614,6 +9614,8 @@ self: super: with self; {
  mficlient = callPackage ../development/python-modules/mficlient { };
  mflux = callPackage ../development/python-modules/mflux { };
  mfusepy = callPackage ../development/python-modules/mfusepy { };
  mhcflurry = callPackage ../development/python-modules/mhcflurry { };