mirror of
https://github.com/exo-explore/exo.git
synced 2026-09-08 11:35:40 -04:00
Compare commits
58
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fd17a3bc09 | ||
|
|
7ca9edaf42 | ||
|
|
d1f13f21a1 | ||
|
|
a6cdc93d3c | ||
|
|
a9c7b1c68a | ||
|
|
6355f3d8fb | ||
|
|
8cd6191c70 | ||
|
|
532a8f0b07 | ||
|
|
581a1fcd79 | ||
|
|
ac7194dd90 | ||
|
|
f538b44211 | ||
|
|
a3ce437fd4 | ||
|
|
be731d3a85 | ||
|
|
655185cfe7 | ||
|
|
1dd9c28842 | ||
|
|
cacd26e63c | ||
|
|
6a3eb2f37d | ||
|
|
e1df77bc4c | ||
|
|
e78e53df6e | ||
|
|
c70d9006e8 | ||
|
|
72cd8552ae | ||
|
|
8cd1308336 | ||
|
|
04dcdbd127 | ||
|
|
ec5d62f935 | ||
|
|
e96f084051 | ||
|
|
dc68ddbac0 | ||
|
|
073f8c1690 | ||
|
|
3c29d0dd4c | ||
|
|
594ed99734 | ||
|
|
e9e23e556e | ||
|
|
169ea2a5e8 | ||
|
|
4a7901c548 | ||
|
|
7bb5cb4fc7 | ||
|
|
493e342f83 | ||
|
|
283b1809c9 | ||
|
|
35030119e3 | ||
|
|
585dfe3549 | ||
|
|
5d7a005a13 | ||
|
|
87b7c5ef8b | ||
|
|
957ebbd21f | ||
|
|
4b6dd7588f | ||
|
|
3f4f7c9ba6 | ||
|
|
1331465ba0 | ||
|
|
8f94727f14 | ||
|
|
9ee23ee0d3 | ||
|
|
f75d36cbe0 | ||
|
|
2683ac7b61 | ||
|
|
404b9769ac | ||
|
|
3e097f7243 | ||
|
|
0c8615f25c | ||
|
|
ba35a4ba13 | ||
|
|
9a83fa6cdf | ||
|
|
659c1bc737 | ||
|
|
34df811b92 | ||
|
|
ca5870a2e8 | ||
|
|
6be6ea5fd2 | ||
|
|
5e9d27b753 | ||
|
|
cfc8f09004 |
No files matched your search
@@ -0,0 +1,20 @@
|
||||
from enum import Enum
|
||||
|
||||
class HarmonyEncodingName(Enum):
|
||||
HARMONY_GPT_OSS = ...
|
||||
|
||||
class HarmonyEncoding: ...
|
||||
class HarmonyError(Exception): ...
|
||||
|
||||
class Role(Enum):
|
||||
ASSISTANT = ...
|
||||
|
||||
class StreamableParser:
|
||||
last_content_delta: str
|
||||
current_channel: str | None
|
||||
current_recipient: str | None
|
||||
|
||||
def __init__(self, encoding: HarmonyEncoding, role: Role = ...) -> None: ...
|
||||
def process(self, token_id: int) -> None: ...
|
||||
|
||||
def load_harmony_encoding(name: HarmonyEncodingName) -> HarmonyEncoding: ...
|
||||
@@ -0,0 +1,17 @@
|
||||
class NvmlMemoryInfo:
|
||||
used: int
|
||||
total: int
|
||||
free: int
|
||||
|
||||
class NvmlUtilizationRates:
|
||||
gpu: int
|
||||
memory: int
|
||||
|
||||
def nvmlInit() -> None: ...
|
||||
def nvmlShutdown() -> None: ...
|
||||
def nvmlDeviceGetCount() -> int: ...
|
||||
def nvmlDeviceGetHandleByIndex(index: int) -> object: ...
|
||||
def nvmlDeviceGetUtilizationRates(handle: object) -> NvmlUtilizationRates: ...
|
||||
def nvmlDeviceGetTemperature(handle: object, sensor_type: int) -> int: ...
|
||||
def nvmlDeviceGetPowerUsage(handle: object) -> int: ...
|
||||
def nvmlDeviceGetMemoryInfo(handle: object) -> NvmlMemoryInfo: ...
|
||||
@@ -0,0 +1,61 @@
|
||||
from typing import Any, Sequence
|
||||
|
||||
from torch import backends as backends
|
||||
from torch import cuda as cuda
|
||||
from torch import distributed as distributed
|
||||
|
||||
__version__: str
|
||||
|
||||
class version:
|
||||
cuda: str
|
||||
|
||||
class dtype: ...
|
||||
|
||||
bfloat16: dtype
|
||||
float16: dtype
|
||||
float32: dtype
|
||||
int8: dtype
|
||||
int32: dtype
|
||||
int64: dtype
|
||||
long: dtype
|
||||
float8_e4m3fn: dtype
|
||||
|
||||
class Tensor:
|
||||
shape: Sequence[int]
|
||||
dtype: dtype
|
||||
def __getitem__(self, key: Any) -> Tensor: ...
|
||||
def __setitem__(self, key: Any, value: Any) -> None: ...
|
||||
def to(self, *args: Any, **kwargs: Any) -> Tensor: ...
|
||||
def cpu(self) -> Tensor: ...
|
||||
def detach(self) -> Tensor: ...
|
||||
def clone(self) -> Tensor: ...
|
||||
def flatten(self, start_dim: int = 0, end_dim: int = -1) -> Tensor: ...
|
||||
def view(self, *shape: Any) -> Tensor: ...
|
||||
def squeeze(self, dim: int = ...) -> Tensor: ...
|
||||
def unsqueeze(self, dim: int) -> Tensor: ...
|
||||
def permute(self, *dims: int) -> Tensor: ...
|
||||
def float(self) -> Tensor: ...
|
||||
def numpy(self) -> Any: ...
|
||||
def numel(self) -> int: ...
|
||||
def nelement(self) -> int: ...
|
||||
@property
|
||||
def is_cuda(self) -> bool: ...
|
||||
@property
|
||||
def device(self) -> device: ...
|
||||
def __len__(self) -> int: ...
|
||||
def data_ptr(self) -> int: ...
|
||||
def tolist(self) -> Any: ...
|
||||
def abs(self) -> Tensor: ...
|
||||
def max(self) -> Tensor: ...
|
||||
def mean(self) -> Tensor: ...
|
||||
def sum(self, dim: int = ...) -> Tensor: ...
|
||||
def item(self) -> float: ...
|
||||
|
||||
def tensor(data: Any, dtype: dtype | None = None, device: Any = None) -> Tensor: ...
|
||||
def zeros(*size: Any, dtype: dtype | None = None, device: Any = None) -> Tensor: ...
|
||||
def empty(*size: Any, dtype: dtype | None = None, device: Any = None) -> Tensor: ...
|
||||
def from_numpy(ndarray: Any) -> Tensor: ...
|
||||
def inference_mode() -> Any: ...
|
||||
|
||||
class device:
|
||||
def __init__(self, type: str, index: int = ...) -> None: ...
|
||||
@@ -0,0 +1 @@
|
||||
from torch.backends import cuda as cuda
|
||||
@@ -0,0 +1 @@
|
||||
def is_built() -> bool: ...
|
||||
@@ -0,0 +1,10 @@
|
||||
class _DeviceProperties:
|
||||
total_memory: int
|
||||
|
||||
def is_available() -> bool: ...
|
||||
def get_device_name(device: int) -> str: ...
|
||||
def get_device_properties(device: int) -> _DeviceProperties: ...
|
||||
def empty_cache() -> None: ...
|
||||
def mem_get_info() -> tuple[int, int]: ...
|
||||
def synchronize() -> None: ...
|
||||
def max_memory_allocated() -> int: ...
|
||||
@@ -0,0 +1,2 @@
|
||||
def is_initialized() -> bool: ...
|
||||
def destroy_process_group() -> None: ...
|
||||
@@ -0,0 +1 @@
|
||||
__version__: str
|
||||
@@ -0,0 +1,2 @@
|
||||
class ModelConfig:
|
||||
max_model_len: int
|
||||
File renamed without changes.
@@ -0,0 +1,18 @@
|
||||
from dataclasses import dataclass
|
||||
|
||||
@dataclass
|
||||
class EngineArgs:
|
||||
model: str = ...
|
||||
served_model_name: str | list[str] | None = ...
|
||||
tokenizer: str | None = ...
|
||||
trust_remote_code: bool = ...
|
||||
dtype: str = ...
|
||||
seed: int = ...
|
||||
max_model_len: int | None = ...
|
||||
gpu_memory_utilization: float = ...
|
||||
enforce_eager: bool = ...
|
||||
tensor_parallel_size: int = ...
|
||||
pipeline_parallel_size: int = ...
|
||||
quantization: str | None = ...
|
||||
load_format: str = ...
|
||||
enable_sleep_mode: bool = ...
|
||||
@@ -0,0 +1,17 @@
|
||||
class CompletionOutput:
|
||||
index: int
|
||||
text: str
|
||||
token_ids: list[int]
|
||||
cumulative_logprob: float | None
|
||||
logprobs: object | None
|
||||
finish_reason: str | None
|
||||
stop_reason: int | str | None
|
||||
|
||||
def finished(self) -> bool: ...
|
||||
|
||||
class RequestOutput:
|
||||
request_id: str
|
||||
prompt: str | None
|
||||
prompt_token_ids: list[int] | None
|
||||
outputs: list[CompletionOutput]
|
||||
finished: bool
|
||||
@@ -0,0 +1,11 @@
|
||||
class SamplingParams:
|
||||
n: int
|
||||
temperature: float
|
||||
top_p: float
|
||||
top_k: int
|
||||
min_p: float
|
||||
seed: int | None
|
||||
stop: str | list[str] | None
|
||||
max_tokens: int | None
|
||||
logprobs: int | None
|
||||
repetition_penalty: float
|
||||
@@ -0,0 +1,3 @@
|
||||
from vllm.tokenizers.protocol import TokenizerLike
|
||||
|
||||
__all__ = ["TokenizerLike"]
|
||||
@@ -0,0 +1,15 @@
|
||||
from typing import Protocol
|
||||
|
||||
class TokenizerLike(Protocol):
|
||||
@property
|
||||
def eos_token_id(self) -> int: ...
|
||||
@property
|
||||
def vocab_size(self) -> int: ...
|
||||
def encode(self, text: str, add_special_tokens: bool = ...) -> list[int]: ...
|
||||
def decode(self, ids: list[int] | int, skip_special_tokens: bool = ...) -> str: ...
|
||||
def apply_chat_template(
|
||||
self,
|
||||
messages: list[dict[str, str]],
|
||||
tools: list[dict[str, object]] | None = ...,
|
||||
**kwargs: object,
|
||||
) -> str | list[int]: ...
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
from collections.abc import Sequence
|
||||
|
||||
from vllm.v1.core.kv_cache_utils import BlockPool, KVCacheBlock
|
||||
from vllm.v1.kv_cache_interface import KVCacheConfig
|
||||
|
||||
class KVCacheBlocks:
|
||||
blocks: tuple[Sequence[KVCacheBlock], ...]
|
||||
def __init__(self, blocks: tuple[Sequence[KVCacheBlock], ...]) -> None: ...
|
||||
def get_block_ids(self) -> tuple[list[int], ...]: ...
|
||||
|
||||
class KVCacheManager:
|
||||
block_pool: BlockPool
|
||||
kv_cache_config: KVCacheConfig
|
||||
enable_caching: bool
|
||||
num_kv_cache_groups: int
|
||||
coordinator: object
|
||||
def __init__(self, *args: object, **kwargs: object) -> None: ...
|
||||
def allocate_slots(
|
||||
self, request: object, num_new_tokens: int, *args: object, **kwargs: object
|
||||
) -> KVCacheBlocks | None: ...
|
||||
def get_computed_blocks(self, request: object) -> tuple[KVCacheBlocks, int]: ...
|
||||
def create_kv_cache_blocks(
|
||||
self, blocks: tuple[list[KVCacheBlock], ...]
|
||||
) -> KVCacheBlocks: ...
|
||||
@@ -0,0 +1,16 @@
|
||||
class KVCacheBlock:
|
||||
block_id: int
|
||||
ref_cnt: int
|
||||
def __init__(self, block_id: int) -> None: ...
|
||||
|
||||
class FreeKVCacheBlockQueue:
|
||||
def append_n(self, blocks: list[KVCacheBlock]) -> None: ...
|
||||
def popleft_n(self, n: int) -> list[KVCacheBlock]: ...
|
||||
|
||||
class BlockPool:
|
||||
blocks: list[KVCacheBlock]
|
||||
free_block_queue: FreeKVCacheBlockQueue
|
||||
num_gpu_blocks: int
|
||||
enable_caching: bool
|
||||
def get_num_free_blocks(self) -> int: ...
|
||||
def get_new_blocks(self, num_blocks: int) -> list[KVCacheBlock]: ...
|
||||
File renamed without changes.
@@ -0,0 +1,22 @@
|
||||
from vllm.config import ModelConfig
|
||||
from vllm.engine.arg_utils import EngineArgs
|
||||
from vllm.outputs import RequestOutput
|
||||
from vllm.sampling_params import SamplingParams
|
||||
from vllm.tokenizers import TokenizerLike
|
||||
|
||||
class LLMEngine:
|
||||
tokenizer: TokenizerLike | None
|
||||
model_config: ModelConfig
|
||||
|
||||
@classmethod
|
||||
def from_engine_args(cls, engine_args: EngineArgs) -> LLMEngine: ...
|
||||
def add_request(
|
||||
self,
|
||||
request_id: str,
|
||||
prompt: str,
|
||||
params: SamplingParams,
|
||||
arrival_time: float | None = ...,
|
||||
) -> None: ...
|
||||
def step(self) -> list[RequestOutput]: ...
|
||||
def has_unfinished_requests(self) -> bool: ...
|
||||
def get_tokenizer(self) -> TokenizerLike: ...
|
||||
@@ -0,0 +1,23 @@
|
||||
from dataclasses import dataclass
|
||||
|
||||
@dataclass
|
||||
class KVCacheSpec:
|
||||
block_size: int
|
||||
num_kv_heads: int
|
||||
head_size: int
|
||||
|
||||
@dataclass
|
||||
class KVCacheGroupSpec:
|
||||
layer_names: list[str]
|
||||
kv_cache_spec: KVCacheSpec
|
||||
|
||||
@dataclass
|
||||
class KVCacheTensorSpec:
|
||||
shared_by: list[str]
|
||||
size: int
|
||||
|
||||
@dataclass
|
||||
class KVCacheConfig:
|
||||
num_blocks: int
|
||||
kv_cache_groups: list[KVCacheGroupSpec]
|
||||
kv_cache_tensors: list[KVCacheTensorSpec]
|
||||
@@ -0,0 +1,6 @@
|
||||
class Request:
|
||||
request_id: str
|
||||
prompt_token_ids: list[int] | None
|
||||
num_prompt_tokens: int
|
||||
num_computed_tokens: int
|
||||
num_tokens: int
|
||||
@@ -0,0 +1 @@
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
import torch
|
||||
|
||||
class _CompilationConfig:
|
||||
static_forward_context: dict[str, object]
|
||||
|
||||
class _ModelConfig:
|
||||
hf_config: object
|
||||
|
||||
class GPUModelRunner:
|
||||
kv_caches: list[torch.Tensor]
|
||||
compilation_config: _CompilationConfig
|
||||
model_config: _ModelConfig | None
|
||||
def _allocate_kv_cache_tensors(
|
||||
self, kv_cache_config: object
|
||||
) -> dict[str, torch.Tensor]: ...
|
||||
def initialize_kv_cache_tensors(
|
||||
self, kv_cache_config: object, kernel_block_sizes: list[int]
|
||||
) -> dict[str, torch.Tensor]: ...
|
||||
def _reshape_kv_cache_tensors(
|
||||
self,
|
||||
kv_cache_config: object,
|
||||
raw_tensors: dict[str, torch.Tensor],
|
||||
kernel_block_sizes: list[int],
|
||||
) -> dict[str, torch.Tensor]: ...
|
||||
@@ -0,0 +1,6 @@
|
||||
from vllm.v1.worker.gpu_model_runner import GPUModelRunner
|
||||
|
||||
class Worker:
|
||||
model_runner: GPUModelRunner
|
||||
def determine_available_memory(self) -> int: ...
|
||||
def initialize_from_config(self, kv_cache_config: object) -> None: ...
|
||||
@@ -0,0 +1 @@
|
||||
def extract_layer_index(layer_name: str, num_attn_module: int) -> int: ...
|
||||
@@ -1,8 +1 @@
|
||||
use flake
|
||||
|
||||
# creates .venv if doesn't exist and loads its environment
|
||||
export VIRTUAL_ENV=".venv"
|
||||
if ! [ -d "./$VIRTUAL_ENV" ]; then
|
||||
uv venv
|
||||
fi
|
||||
layout python
|
||||
@@ -32,6 +32,7 @@ jobs:
|
||||
SPARKLE_ED25519_PRIVATE: ${{ secrets.SPARKLE_ED25519_PRIVATE }}
|
||||
SPARKLE_S3_BUCKET: ${{ secrets.SPARKLE_S3_BUCKET }}
|
||||
SPARKLE_S3_PREFIX: ${{ secrets.SPARKLE_S3_PREFIX }}
|
||||
EXO_BUG_REPORT_PRESIGNED_URL_ENDPOINT: ${{ secrets.EXO_BUG_REPORT_PRESIGNED_URL_ENDPOINT }}
|
||||
AWS_REGION: ${{ secrets.AWS_REGION }}
|
||||
EXO_BUILD_NUMBER: ${{ github.run_number }}
|
||||
EXO_LIBP2P_NAMESPACE: ${{ github.ref_name }}
|
||||
@@ -158,7 +159,7 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Install Homebrew packages
|
||||
run: brew install just awscli
|
||||
run: brew install just awscli macmon
|
||||
|
||||
- name: Install UV
|
||||
uses: astral-sh/setup-uv@v6
|
||||
@@ -238,92 +239,10 @@ jobs:
|
||||
# Export keychain path for other steps
|
||||
echo "BUILD_KEYCHAIN_PATH=$KEYCHAIN_PATH" >> $GITHUB_ENV
|
||||
|
||||
# ============================================================
|
||||
# Pre-flight credential / profile validation
|
||||
# Runs BEFORE the ~16 min build so auth/expiry failures surface in <1 min.
|
||||
# ============================================================
|
||||
|
||||
- name: Validate Apple notarization credentials
|
||||
env:
|
||||
APPLE_NOTARIZATION_USERNAME: ${{ secrets.APPLE_NOTARIZATION_USERNAME }}
|
||||
APPLE_NOTARIZATION_PASSWORD: ${{ secrets.APPLE_NOTARIZATION_PASSWORD }}
|
||||
APPLE_NOTARIZATION_TEAM: ${{ secrets.APPLE_NOTARIZATION_TEAM }}
|
||||
run: |
|
||||
# All-or-nothing: either all three creds are set, or none are.
|
||||
CRED_COUNT=0
|
||||
for v in "$APPLE_NOTARIZATION_USERNAME" "$APPLE_NOTARIZATION_PASSWORD" "$APPLE_NOTARIZATION_TEAM"; do
|
||||
[[ -n "$v" ]] && CRED_COUNT=$((CRED_COUNT + 1))
|
||||
done
|
||||
if [[ "$CRED_COUNT" -eq 0 ]]; then
|
||||
echo "No notarization credentials configured — skipping notarization for this build."
|
||||
exit 0
|
||||
fi
|
||||
if [[ "$CRED_COUNT" -ne 3 ]]; then
|
||||
echo "ERROR: partial notarization credentials set ($CRED_COUNT/3). Aborting before build."
|
||||
exit 1
|
||||
fi
|
||||
# Cheap, ~5s, auth-only call. Fails instantly with a clear message if
|
||||
# the app-specific password is stale, wrong team-id, etc.
|
||||
echo "Verifying Apple notarization credentials via notarytool history..."
|
||||
if ! xcrun notarytool history \
|
||||
--apple-id "$APPLE_NOTARIZATION_USERNAME" \
|
||||
--password "$APPLE_NOTARIZATION_PASSWORD" \
|
||||
--team-id "$APPLE_NOTARIZATION_TEAM" >/dev/null; then
|
||||
echo "ERROR: notarytool rejected the provided credentials. Fix before rerunning."
|
||||
echo "Common causes: app-specific password expired/revoked, wrong team-id,"
|
||||
echo "Apple ID not on the team, or 2FA not configured for this Apple ID."
|
||||
exit 1
|
||||
fi
|
||||
echo "Apple notarization credentials OK."
|
||||
|
||||
- name: Validate provisioning profile expiry
|
||||
run: |
|
||||
PROFILE="$HOME/Library/Developer/Xcode/UserData/Provisioning Profiles/EXO.provisionprofile"
|
||||
if [[ ! -f "$PROFILE" ]]; then
|
||||
echo "ERROR: provisioning profile not found at $PROFILE"
|
||||
exit 1
|
||||
fi
|
||||
EXPIRY=$(security cms -D -i "$PROFILE" | plutil -extract ExpirationDate raw -o - - 2>/dev/null || true)
|
||||
if [[ -z "$EXPIRY" ]]; then
|
||||
echo "WARNING: could not read ExpirationDate from provisioning profile; skipping expiry check."
|
||||
exit 0
|
||||
fi
|
||||
# Try a couple of known plutil date formats. If none parse, skip the check rather
|
||||
# than risk a false-positive "expired" block on a format we didn't anticipate.
|
||||
EXPIRY_EPOCH=""
|
||||
for fmt in "%Y-%m-%dT%H:%M:%SZ" "%Y-%m-%d %H:%M:%S %z" "%Y-%m-%d %H:%M:%S +0000"; do
|
||||
if parsed=$(date -j -f "$fmt" "$EXPIRY" +%s 2>/dev/null); then
|
||||
EXPIRY_EPOCH="$parsed"
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [[ -z "$EXPIRY_EPOCH" ]]; then
|
||||
echo "WARNING: could not parse ExpirationDate '$EXPIRY'; skipping expiry check."
|
||||
exit 0
|
||||
fi
|
||||
NOW_EPOCH=$(date +%s)
|
||||
if [[ "$EXPIRY_EPOCH" -le "$NOW_EPOCH" ]]; then
|
||||
echo "ERROR: provisioning profile expired on $EXPIRY. Regenerate it before rerunning."
|
||||
exit 1
|
||||
fi
|
||||
DAYS_LEFT=$(( (EXPIRY_EPOCH - NOW_EPOCH) / 86400 ))
|
||||
echo "Provisioning profile valid until $EXPIRY ($DAYS_LEFT days remaining)."
|
||||
if [[ "$DAYS_LEFT" -lt 14 ]]; then
|
||||
echo "WARNING: profile expires in under 14 days — regenerate soon."
|
||||
fi
|
||||
|
||||
# ============================================================
|
||||
# Build the bundle
|
||||
# ============================================================
|
||||
|
||||
- name: Add pinned macmon to PATH
|
||||
run: |
|
||||
MACMON_DIR=$(nix develop --command sh -c 'dirname $(which macmon)')
|
||||
echo "Using macmon from: $MACMON_DIR"
|
||||
echo "$MACMON_DIR" >> $GITHUB_PATH
|
||||
# Remove any Homebrew macmon so PyInstaller can't accidentally pick it up
|
||||
brew uninstall macmon 2>/dev/null || true
|
||||
|
||||
- name: Build PyInstaller bundle
|
||||
run: uv run pyinstaller packaging/pyinstaller/exo.spec
|
||||
|
||||
@@ -346,6 +265,7 @@ jobs:
|
||||
EXO_BUILD_COMMIT="$GITHUB_SHA" \
|
||||
SPARKLE_FEED_URL="$SPARKLE_FEED_URL" \
|
||||
SPARKLE_ED25519_PUBLIC="$SPARKLE_ED25519_PUBLIC" \
|
||||
EXO_BUG_REPORT_PRESIGNED_URL_ENDPOINT="$EXO_BUG_REPORT_PRESIGNED_URL_ENDPOINT" \
|
||||
CODE_SIGNING_IDENTITY="$SIGNING_IDENTITY" \
|
||||
CODE_SIGN_INJECT_BASE_ENTITLEMENTS=YES
|
||||
mkdir -p ../../output
|
||||
@@ -378,41 +298,11 @@ jobs:
|
||||
APPLE_NOTARIZATION_PASSWORD: ${{ secrets.APPLE_NOTARIZATION_PASSWORD }}
|
||||
APPLE_NOTARIZATION_TEAM: ${{ secrets.APPLE_NOTARIZATION_TEAM }}
|
||||
run: |
|
||||
set -o pipefail
|
||||
cd output
|
||||
security unlock-keychain -p "$MACOS_CERTIFICATE_PASSWORD" "$BUILD_KEYCHAIN_PATH"
|
||||
SIGNING_IDENTITY=$(security find-identity -v -p codesigning "$BUILD_KEYCHAIN_PATH" | awk -F '"' '{print $2}')
|
||||
|
||||
# Fail fast if notarization creds are partial. All-or-nothing.
|
||||
CRED_COUNT=0
|
||||
for v in "$APPLE_NOTARIZATION_USERNAME" "$APPLE_NOTARIZATION_PASSWORD" "$APPLE_NOTARIZATION_TEAM"; do
|
||||
[[ -n "$v" ]] && CRED_COUNT=$((CRED_COUNT + 1))
|
||||
done
|
||||
if [[ "$CRED_COUNT" -ne 0 && "$CRED_COUNT" -ne 3 ]]; then
|
||||
echo "ERROR: partial Apple notarization credentials set ($CRED_COUNT/3). Aborting."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
/usr/bin/codesign --deep --force --timestamp --options runtime \
|
||||
--sign "$SIGNING_IDENTITY" EXO.app
|
||||
|
||||
# Pre-flight: verify the signed app BEFORE building DMG and submitting to Apple.
|
||||
# If this fails, notarization will fail too — cheap way to fail in seconds, not 15 minutes.
|
||||
echo "===== codesign --verify EXO.app ====="
|
||||
if ! /usr/bin/codesign --verify --deep --strict --verbose=2 EXO.app; then
|
||||
echo "ERROR: EXO.app failed codesign verification. Dumping signing status of every executable:"
|
||||
find EXO.app -type f \( -perm -111 -o -name "*.dylib" -o -name "*.so" -o -name "*.framework" \) -print0 |
|
||||
while IFS= read -r -d '' f; do
|
||||
printf -- '--- %s\n' "$f"
|
||||
/usr/bin/codesign -dv --verbose=2 "$f" 2>&1 | sed 's/^/ /' || true
|
||||
done
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Gatekeeper assessment. A failure here strongly predicts notarization rejection.
|
||||
echo "===== spctl assessment (predicts notarization outcome) ====="
|
||||
/usr/bin/spctl -a -vvv -t install EXO.app || echo "WARNING: spctl assessment failed — notarization is likely to fail too."
|
||||
|
||||
mkdir -p dmg-root
|
||||
cp -R EXO.app dmg-root/
|
||||
ln -s /Applications dmg-root/Applications
|
||||
@@ -420,22 +310,12 @@ jobs:
|
||||
hdiutil create -volname "EXO" -srcfolder dmg-root -ov -format UDZO "$DMG_NAME"
|
||||
/usr/bin/codesign --force --timestamp --options runtime \
|
||||
--sign "$SIGNING_IDENTITY" "$DMG_NAME"
|
||||
|
||||
echo "===== codesign --verify DMG ====="
|
||||
if ! /usr/bin/codesign --verify --verbose=2 "$DMG_NAME"; then
|
||||
echo "ERROR: DMG failed codesign verification."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -n "$APPLE_NOTARIZATION_USERNAME" ]]; then
|
||||
echo "===== notarytool submit ====="
|
||||
# `|| true` so set -e doesn't abort before we can echo output / fetch the log.
|
||||
# We rely on the parsed STATUS below to decide pass/fail.
|
||||
SUBMISSION_OUTPUT=$(xcrun notarytool submit "$DMG_NAME" \
|
||||
--apple-id "$APPLE_NOTARIZATION_USERNAME" \
|
||||
--password "$APPLE_NOTARIZATION_PASSWORD" \
|
||||
--team-id "$APPLE_NOTARIZATION_TEAM" \
|
||||
--wait --timeout 15m 2>&1) || true
|
||||
--wait --timeout 15m 2>&1)
|
||||
echo "$SUBMISSION_OUTPUT"
|
||||
|
||||
SUBMISSION_ID=$(echo "$SUBMISSION_OUTPUT" | awk 'tolower($1)=="id:" && $2 ~ /^[0-9a-fA-F-]+$/ {print $2; exit}')
|
||||
|
||||
@@ -91,6 +91,9 @@ jobs:
|
||||
nix build .#metal-toolchain
|
||||
fi
|
||||
|
||||
# Build mlx (depends on metal-toolchain)
|
||||
nix build .#mlx
|
||||
|
||||
- name: Build all Nix outputs
|
||||
run: |
|
||||
nix flake show --json | jq -r '
|
||||
|
||||
+1
-4
@@ -18,6 +18,7 @@ digest.txt
|
||||
app/EXO/build/
|
||||
dist/
|
||||
|
||||
|
||||
# rust
|
||||
target/
|
||||
**/*.rs.bk
|
||||
@@ -37,7 +38,3 @@ bench/**/*.json
|
||||
|
||||
# tmp
|
||||
tmp/models
|
||||
/build/exo
|
||||
/.claude/skills
|
||||
/.claude
|
||||
/.codex
|
||||
Generated
+31
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="EMPTY_MODULE" version="4">
|
||||
<component name="FacetManager">
|
||||
<facet type="Python" name="Python facet">
|
||||
<configuration sdkName="Python 3.13 virtualenv at ~/Desktop/exo/.venv" />
|
||||
</facet>
|
||||
</component>
|
||||
<component name="Go" enabled="true" />
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/scripts/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/rust/exo_pyo3_bindings/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/rust/exo_pyo3_bindings/tests" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/rust/util/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/rust/networking/examples" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/rust/networking/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/rust/networking/tests" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/rust/system_custodian/src" isTestSource="false" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/.venv" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/.direnv" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/dist" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/.go_cache" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/rust/target" />
|
||||
</content>
|
||||
<orderEntry type="jdk" jdkName="Python 3.13 (exo)" jdkType="Python SDK" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Python 3.13 virtualenv at ~/Desktop/exo/.venv interpreter library" level="application" />
|
||||
</component>
|
||||
</module>
|
||||
Generated
+1
-1
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ExternalDependencies">
|
||||
<plugin id="al.aoli.intellijdirenv" />
|
||||
<plugin id="systems.fehn.intellijdirenv" />
|
||||
</component>
|
||||
</project>
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<profile version="1.0">
|
||||
<option name="myName" value="Project Default" />
|
||||
<inspection_tool class="PyCompatibilityInspection" enabled="true" level="WARNING" enabled_by_default="true">
|
||||
<option name="ourVersions">
|
||||
<value>
|
||||
<list size="1">
|
||||
<item index="0" class="java.lang.String" itemvalue="3.14" />
|
||||
</list>
|
||||
</value>
|
||||
</option>
|
||||
</inspection_tool>
|
||||
</profile>
|
||||
</component>
|
||||
Generated
+2
-2
@@ -4,7 +4,7 @@
|
||||
<option name="sdkName" value="Python 3.13 (exo)" />
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.13 (exo)" project-jdk-type="Python SDK" />
|
||||
<component name="RuffConfiguration">
|
||||
<option name="enabled" value="true" />
|
||||
<component name="PythonCompatibilityInspectionAdvertiser">
|
||||
<option name="version" value="3" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -2,10 +2,11 @@
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from typing import Protocol
|
||||
|
||||
import mlx.core as mx
|
||||
import PIL.Image
|
||||
import tqdm
|
||||
from typing import Protocol
|
||||
from mflux.models.common.config.config import Config
|
||||
|
||||
class BeforeLoopCallback(Protocol):
|
||||
|
||||
@@ -3,6 +3,7 @@ This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from mflux.callbacks.callback import (
|
||||
AfterLoopCallback,
|
||||
BeforeLoopCallback,
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
import mlx.core as mx
|
||||
import PIL.Image
|
||||
import tqdm
|
||||
from typing import TYPE_CHECKING
|
||||
from mflux.callbacks.callback_registry import CallbackRegistry
|
||||
from mflux.models.common.config.config import Config
|
||||
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import mlx.core as mx
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
from tqdm import tqdm
|
||||
|
||||
import mlx.core as mx
|
||||
from mflux.models.common.config.model_config import ModelConfig
|
||||
from tqdm import tqdm
|
||||
|
||||
logger = ...
|
||||
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import mlx.core as mx
|
||||
from functools import lru_cache
|
||||
from typing import Literal
|
||||
|
||||
import mlx.core as mx
|
||||
|
||||
class ModelConfig:
|
||||
precision: mx.Dtype = ...
|
||||
def __init__(
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import mlx.core as mx
|
||||
from pathlib import Path
|
||||
from typing import TYPE_CHECKING, TypeAlias
|
||||
from mlx import nn
|
||||
|
||||
import mlx.core as mx
|
||||
from mflux.models.common.vae.tiling_config import TilingConfig
|
||||
from mflux.models.fibo.latent_creator.fibo_latent_creator import FiboLatentCreator
|
||||
from mflux.models.flux.latent_creator.flux_latent_creator import FluxLatentCreator
|
||||
@@ -13,6 +13,7 @@ from mflux.models.qwen.latent_creator.qwen_latent_creator import QwenLatentCreat
|
||||
from mflux.models.z_image.latent_creator.z_image_latent_creator import (
|
||||
ZImageLatentCreator,
|
||||
)
|
||||
from mlx import nn
|
||||
|
||||
if TYPE_CHECKING:
|
||||
LatentCreatorType: TypeAlias = type[
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from mlx import nn
|
||||
from mflux.models.common.lora.layer.linear_lora_layer import LoRALinear
|
||||
from mlx import nn
|
||||
|
||||
class FusedLoRALinear(nn.Module):
|
||||
def __init__(
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import mlx.core as mx
|
||||
import mlx.nn as nn
|
||||
from collections.abc import Callable
|
||||
from dataclasses import dataclass
|
||||
|
||||
import mlx.core as mx
|
||||
import mlx.nn as nn
|
||||
from mflux.models.common.lora.mapping.lora_mapping import LoRATarget
|
||||
|
||||
@dataclass
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import mlx.core as mx
|
||||
from collections.abc import Callable
|
||||
from dataclasses import dataclass
|
||||
from typing import List, Protocol
|
||||
|
||||
import mlx.core as mx
|
||||
|
||||
@dataclass
|
||||
class LoRATarget:
|
||||
model_path: str
|
||||
|
||||
@@ -36,4 +36,3 @@ class Rule(NamedTuple):
|
||||
name: str
|
||||
check: str
|
||||
action: QuantizationAction | PathAction | LoraAction | ConfigAction
|
||||
...
|
||||
@@ -3,6 +3,7 @@ This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from mflux.models.common.config.model_config import ModelConfig
|
||||
|
||||
if TYPE_CHECKING: ...
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import mlx.core as mx
|
||||
from abc import ABC, abstractmethod
|
||||
|
||||
import mlx.core as mx
|
||||
|
||||
class BaseScheduler(ABC):
|
||||
@property
|
||||
@abstractmethod
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import mlx.core as mx
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
import mlx.core as mx
|
||||
from mflux.models.common.config.config import Config
|
||||
from mflux.models.common.schedulers.base_scheduler import BaseScheduler
|
||||
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import mlx.core as mx
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
import mlx.core as mx
|
||||
from mflux.models.common.config.config import Config
|
||||
from mflux.models.common.schedulers.base_scheduler import BaseScheduler
|
||||
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import mlx.core as mx
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
import mlx.core as mx
|
||||
from mflux.models.common.config.config import Config
|
||||
from mflux.models.common.schedulers.base_scheduler import BaseScheduler
|
||||
|
||||
|
||||
@@ -4,9 +4,10 @@ This type stub file was generated by pyright.
|
||||
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import Protocol, runtime_checkable
|
||||
|
||||
from mflux.models.common.tokenizer.tokenizer_output import TokenizerOutput
|
||||
from PIL import Image
|
||||
from transformers import PreTrainedTokenizer
|
||||
from mflux.models.common.tokenizer.tokenizer_output import TokenizerOutput
|
||||
|
||||
"""
|
||||
This type stub file was generated by pyright.
|
||||
|
||||
@@ -3,6 +3,7 @@ This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from mflux.models.common.tokenizer.tokenizer import BaseTokenizer
|
||||
from mflux.models.common.weights.loading.weight_definition import TokenizerDefinition
|
||||
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import mlx.core as mx
|
||||
from dataclasses import dataclass
|
||||
|
||||
import mlx.core as mx
|
||||
|
||||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import mlx.core as mx
|
||||
from typing import Callable
|
||||
|
||||
import mlx.core as mx
|
||||
|
||||
class VAETiler:
|
||||
@staticmethod
|
||||
def encode_image_tiled(
|
||||
|
||||
@@ -3,8 +3,8 @@ This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import mlx.core as mx
|
||||
from mlx import nn
|
||||
from mflux.models.common.vae.tiling_config import TilingConfig
|
||||
from mlx import nn
|
||||
|
||||
class VAEUtil:
|
||||
@staticmethod
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import mlx.nn as nn
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
import mlx.nn as nn
|
||||
from mflux.models.common.weights.loading.loaded_weights import LoadedWeights
|
||||
from mflux.models.common.weights.loading.weight_definition import (
|
||||
ComponentDefinition,
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import mlx.core as mx
|
||||
from dataclasses import dataclass
|
||||
from typing import Callable, List, TYPE_CHECKING, TypeAlias
|
||||
from mflux.models.common.weights.mapping.weight_mapping import WeightTarget
|
||||
from typing import TYPE_CHECKING, Callable, List, TypeAlias
|
||||
|
||||
import mlx.core as mx
|
||||
from mflux.models.common.tokenizer.tokenizer import BaseTokenizer
|
||||
from mflux.models.common.weights.mapping.weight_mapping import WeightTarget
|
||||
from mflux.models.depth_pro.weights.depth_pro_weight_definition import (
|
||||
DepthProWeightDefinition,
|
||||
)
|
||||
|
||||
@@ -3,6 +3,7 @@ This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from typing import TYPE_CHECKING
|
||||
|
||||
from mflux.models.common.weights.loading.loaded_weights import LoadedWeights
|
||||
from mflux.models.common.weights.loading.weight_definition import (
|
||||
ComponentDefinition,
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import mlx.core as mx
|
||||
from typing import Dict, List, Optional
|
||||
|
||||
import mlx.core as mx
|
||||
from mflux.models.common.weights.mapping.weight_mapping import WeightTarget
|
||||
|
||||
class WeightMapper:
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import mlx.core as mx
|
||||
from dataclasses import dataclass
|
||||
from typing import Callable, List, Optional, Protocol
|
||||
|
||||
import mlx.core as mx
|
||||
|
||||
"""
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
@@ -2,7 +2,8 @@
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from typing import Any, TYPE_CHECKING
|
||||
from typing import TYPE_CHECKING, Any
|
||||
|
||||
from mflux.models.common.weights.loading.weight_definition import WeightDefinitionType
|
||||
|
||||
if TYPE_CHECKING: ...
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import mlx.core as mx
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
|
||||
import mlx.core as mx
|
||||
from PIL import Image
|
||||
|
||||
@dataclass
|
||||
@@ -13,7 +14,6 @@ class DepthResult:
|
||||
depth_array: mx.array
|
||||
min_depth: float
|
||||
max_depth: float
|
||||
...
|
||||
|
||||
class DepthPro:
|
||||
def __init__(self, quantize: int | None = ...) -> None: ...
|
||||
|
||||
@@ -3,6 +3,7 @@ This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from typing import List
|
||||
|
||||
from mflux.models.common.weights.loading.weight_definition import (
|
||||
ComponentDefinition,
|
||||
TokenizerDefinition,
|
||||
|
||||
@@ -3,6 +3,7 @@ This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from typing import List
|
||||
|
||||
from mflux.models.common.weights.mapping.weight_mapping import (
|
||||
WeightMapping,
|
||||
WeightTarget,
|
||||
|
||||
@@ -3,6 +3,7 @@ This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from typing import List
|
||||
|
||||
from mflux.models.common.weights.loading.weight_definition import (
|
||||
ComponentDefinition,
|
||||
TokenizerDefinition,
|
||||
|
||||
@@ -3,6 +3,7 @@ This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from typing import List
|
||||
|
||||
from mflux.models.common.weights.mapping.weight_mapping import (
|
||||
WeightMapping,
|
||||
WeightTarget,
|
||||
|
||||
@@ -3,6 +3,7 @@ This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from typing import Optional, Union
|
||||
|
||||
from PIL import Image
|
||||
|
||||
class Qwen2VLProcessor:
|
||||
|
||||
@@ -3,6 +3,7 @@ This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from typing import List
|
||||
|
||||
from mflux.models.common.weights.loading.weight_definition import (
|
||||
ComponentDefinition,
|
||||
TokenizerDefinition,
|
||||
|
||||
@@ -3,6 +3,7 @@ This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from typing import List
|
||||
|
||||
from mflux.models.common.weights.mapping.weight_mapping import (
|
||||
WeightMapping,
|
||||
WeightTarget,
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from typing import Any
|
||||
|
||||
import mlx.core as mx
|
||||
from mlx import nn
|
||||
from typing import Any
|
||||
|
||||
class JointAttention(nn.Module):
|
||||
num_heads: int
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import mlx.core as mx
|
||||
from mlx import nn
|
||||
from typing import Any
|
||||
from mflux.models.flux.model.flux_transformer.joint_attention import JointAttention
|
||||
|
||||
import mlx.core as mx
|
||||
from mflux.models.flux.model.flux_transformer.ada_layer_norm_zero import (
|
||||
AdaLayerNormZero,
|
||||
)
|
||||
from mflux.models.flux.model.flux_transformer.joint_attention import JointAttention
|
||||
from mlx import nn
|
||||
|
||||
class JointTransformerBlock(nn.Module):
|
||||
attn: JointAttention
|
||||
|
||||
@@ -2,15 +2,16 @@
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import mlx.core as mx
|
||||
from mlx import nn
|
||||
from typing import Any
|
||||
from mflux.models.flux.model.flux_transformer.single_block_attention import (
|
||||
SingleBlockAttention,
|
||||
)
|
||||
|
||||
import mlx.core as mx
|
||||
from mflux.models.flux.model.flux_transformer.ada_layer_norm_zero_single import (
|
||||
AdaLayerNormZeroSingle,
|
||||
)
|
||||
from mflux.models.flux.model.flux_transformer.single_block_attention import (
|
||||
SingleBlockAttention,
|
||||
)
|
||||
from mlx import nn
|
||||
|
||||
class SingleTransformerBlock(nn.Module):
|
||||
attn: SingleBlockAttention
|
||||
|
||||
@@ -3,8 +3,8 @@ This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import mlx.core as mx
|
||||
from mlx import nn
|
||||
from mflux.models.common.config import ModelConfig
|
||||
from mlx import nn
|
||||
|
||||
class TimeTextEmbed(nn.Module):
|
||||
def __init__(self, model_config: ModelConfig) -> None: ...
|
||||
|
||||
@@ -3,17 +3,17 @@ This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import mlx.core as mx
|
||||
from mlx import nn
|
||||
from mflux.models.common.config.config import Config
|
||||
from mflux.models.common.config.model_config import ModelConfig
|
||||
from mflux.models.flux.model.flux_transformer.embed_nd import EmbedND
|
||||
from mflux.models.flux.model.flux_transformer.time_text_embed import TimeTextEmbed
|
||||
from mflux.models.flux.model.flux_transformer.joint_transformer_block import (
|
||||
JointTransformerBlock,
|
||||
)
|
||||
from mflux.models.flux.model.flux_transformer.single_transformer_block import (
|
||||
SingleTransformerBlock,
|
||||
)
|
||||
from mflux.models.flux.model.flux_transformer.time_text_embed import TimeTextEmbed
|
||||
from mlx import nn
|
||||
|
||||
class Transformer(nn.Module):
|
||||
transformer_blocks: list[JointTransformerBlock]
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import mlx.core as mx
|
||||
import PIL.Image
|
||||
from dataclasses import dataclass
|
||||
from pathlib import Path
|
||||
from typing import List
|
||||
|
||||
import mlx.core as mx
|
||||
import PIL.Image
|
||||
from mflux.models.flux.variants.concept_attention.joint_transformer_block_concept import (
|
||||
LayerAttentionData,
|
||||
)
|
||||
|
||||
+2
-2
@@ -2,8 +2,9 @@
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import mlx.core as mx
|
||||
from dataclasses import dataclass
|
||||
|
||||
import mlx.core as mx
|
||||
from mlx import nn
|
||||
|
||||
@dataclass
|
||||
@@ -11,7 +12,6 @@ class LayerAttentionData:
|
||||
layer: int
|
||||
img_attention: mx.array
|
||||
concept_attention: mx.array
|
||||
...
|
||||
|
||||
class JointTransformerBlockConcept(nn.Module):
|
||||
def __init__(self, layer) -> None: ...
|
||||
|
||||
@@ -3,12 +3,12 @@ This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import mlx.core as mx
|
||||
from mlx import nn
|
||||
from mflux.models.common.config.config import Config
|
||||
from mflux.models.common.config.model_config import ModelConfig
|
||||
from mflux.models.flux.variants.concept_attention.attention_data import (
|
||||
TimestepAttentionData,
|
||||
)
|
||||
from mlx import nn
|
||||
|
||||
class TransformerConcept(nn.Module):
|
||||
def __init__(
|
||||
|
||||
@@ -3,9 +3,9 @@ This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import mlx.core as mx
|
||||
from mlx import nn
|
||||
from mflux.models.common.config.config import Config
|
||||
from mflux.models.common.config.model_config import ModelConfig
|
||||
from mlx import nn
|
||||
|
||||
class TransformerControlnet(nn.Module):
|
||||
def __init__(
|
||||
|
||||
@@ -5,8 +5,6 @@ This type stub file was generated by pyright.
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
from mlx import nn
|
||||
|
||||
from mflux.models.common.config.model_config import ModelConfig
|
||||
from mflux.models.flux.model.flux_text_encoder.clip_encoder.clip_encoder import (
|
||||
CLIPEncoder,
|
||||
@@ -15,6 +13,7 @@ from mflux.models.flux.model.flux_text_encoder.t5_encoder.t5_encoder import T5En
|
||||
from mflux.models.flux.model.flux_transformer.transformer import Transformer
|
||||
from mflux.models.flux.model.flux_vae.vae import VAE
|
||||
from mflux.utils.generated_image import GeneratedImage
|
||||
from mlx import nn
|
||||
|
||||
class Flux1Kontext(nn.Module):
|
||||
vae: VAE
|
||||
|
||||
@@ -3,7 +3,6 @@ This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import mlx.core as mx
|
||||
|
||||
from mflux.models.flux.model.flux_vae.vae import VAE
|
||||
|
||||
class KontextUtil:
|
||||
|
||||
@@ -3,8 +3,8 @@ This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from pathlib import Path
|
||||
from mlx import nn
|
||||
from typing import Any
|
||||
|
||||
from mflux.models.common.config.model_config import ModelConfig
|
||||
from mflux.models.flux.model.flux_text_encoder.clip_encoder.clip_encoder import (
|
||||
CLIPEncoder,
|
||||
@@ -13,6 +13,7 @@ from mflux.models.flux.model.flux_text_encoder.t5_encoder.t5_encoder import T5En
|
||||
from mflux.models.flux.model.flux_transformer.transformer import Transformer
|
||||
from mflux.models.flux.model.flux_vae.vae import VAE
|
||||
from mflux.utils.generated_image import GeneratedImage
|
||||
from mlx import nn
|
||||
|
||||
class Flux1(nn.Module):
|
||||
vae: VAE
|
||||
|
||||
@@ -3,6 +3,7 @@ This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from typing import List
|
||||
|
||||
from mflux.models.common.weights.loading.weight_definition import (
|
||||
ComponentDefinition,
|
||||
TokenizerDefinition,
|
||||
|
||||
@@ -3,6 +3,7 @@ This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from typing import List
|
||||
|
||||
from mflux.models.common.weights.mapping.weight_mapping import (
|
||||
WeightMapping,
|
||||
WeightTarget,
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from typing import Any
|
||||
|
||||
import mlx.core as mx
|
||||
from mlx import nn
|
||||
from typing import Any
|
||||
|
||||
class QwenAttention(nn.Module):
|
||||
_num_heads: int
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import mlx.core as mx
|
||||
from mlx import nn
|
||||
from typing import Any
|
||||
|
||||
import mlx.core as mx
|
||||
from mflux.models.common.config.config import Config
|
||||
from mflux.models.qwen.model.qwen_transformer.qwen_transformer_block import (
|
||||
QwenTransformerBlock,
|
||||
)
|
||||
from mlx import nn
|
||||
|
||||
class QwenTransformer(nn.Module):
|
||||
transformer_blocks: list[QwenTransformerBlock]
|
||||
|
||||
@@ -2,10 +2,11 @@
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import mlx.core as mx
|
||||
from mlx import nn
|
||||
from typing import Any
|
||||
|
||||
import mlx.core as mx
|
||||
from mflux.models.qwen.model.qwen_transformer.qwen_attention import QwenAttention
|
||||
from mlx import nn
|
||||
|
||||
class QwenTransformerBlock(nn.Module):
|
||||
attn: QwenAttention
|
||||
|
||||
@@ -2,8 +2,9 @@
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import numpy as np
|
||||
from typing import Optional, Union
|
||||
|
||||
import numpy as np
|
||||
from PIL import Image
|
||||
|
||||
OPENAI_CLIP_MEAN = ...
|
||||
|
||||
@@ -3,8 +3,9 @@ This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from typing import Optional, Union
|
||||
from PIL import Image
|
||||
|
||||
from mflux.models.qwen.tokenizer.qwen_image_processor import QwenImageProcessor
|
||||
from PIL import Image
|
||||
|
||||
class QwenVisionLanguageProcessor:
|
||||
def __init__(
|
||||
|
||||
@@ -2,13 +2,14 @@
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from typing import Union
|
||||
|
||||
import mlx.core as mx
|
||||
import numpy as np
|
||||
from typing import Union
|
||||
from PIL import Image
|
||||
from mflux.models.qwen.tokenizer.qwen_vision_language_processor import (
|
||||
QwenVisionLanguageProcessor,
|
||||
)
|
||||
from PIL import Image
|
||||
|
||||
class QwenVisionLanguageTokenizer:
|
||||
def __init__(
|
||||
|
||||
@@ -2,16 +2,17 @@
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import mlx.core as mx
|
||||
from pathlib import Path
|
||||
from mlx import nn
|
||||
from typing import Any
|
||||
|
||||
import mlx.core as mx
|
||||
from mflux.models.common.config import Config
|
||||
from mflux.models.common.config.model_config import ModelConfig
|
||||
from mflux.models.qwen.model.qwen_text_encoder.qwen_text_encoder import QwenTextEncoder
|
||||
from mflux.models.qwen.model.qwen_transformer.qwen_transformer import QwenTransformer
|
||||
from mflux.models.qwen.model.qwen_vae.qwen_vae import QwenVAE
|
||||
from mflux.utils.generated_image import GeneratedImage
|
||||
from mlx import nn
|
||||
|
||||
class QwenImageEdit(nn.Module):
|
||||
vae: QwenVAE
|
||||
|
||||
@@ -2,15 +2,16 @@
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import mlx.core as mx
|
||||
from pathlib import Path
|
||||
from mlx import nn
|
||||
from typing import Any
|
||||
|
||||
import mlx.core as mx
|
||||
from mflux.models.common.config import ModelConfig
|
||||
from mflux.models.qwen.model.qwen_text_encoder.qwen_text_encoder import QwenTextEncoder
|
||||
from mflux.models.qwen.model.qwen_transformer.qwen_transformer import QwenTransformer
|
||||
from mflux.models.qwen.model.qwen_vae.qwen_vae import QwenVAE
|
||||
from mflux.utils.generated_image import GeneratedImage
|
||||
from mlx import nn
|
||||
|
||||
class QwenImage(nn.Module):
|
||||
vae: QwenVAE
|
||||
|
||||
@@ -3,6 +3,7 @@ This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from typing import List
|
||||
|
||||
from mflux.models.common.lora.mapping.lora_mapping import LoRAMapping, LoRATarget
|
||||
|
||||
class QwenLoRAMapping(LoRAMapping):
|
||||
|
||||
@@ -3,6 +3,7 @@ This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from typing import List
|
||||
|
||||
from mflux.models.common.weights.loading.weight_definition import (
|
||||
ComponentDefinition,
|
||||
TokenizerDefinition,
|
||||
|
||||
@@ -3,6 +3,7 @@ This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from typing import List
|
||||
|
||||
from mflux.models.common.weights.mapping.weight_mapping import (
|
||||
WeightMapping,
|
||||
WeightTarget,
|
||||
|
||||
@@ -3,6 +3,7 @@ This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from typing import List
|
||||
|
||||
from mflux.models.common.weights.loading.weight_definition import (
|
||||
ComponentDefinition,
|
||||
TokenizerDefinition,
|
||||
|
||||
@@ -3,6 +3,7 @@ This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from typing import List
|
||||
|
||||
from mflux.models.common.weights.mapping.weight_mapping import (
|
||||
WeightMapping,
|
||||
WeightTarget,
|
||||
|
||||
@@ -3,6 +3,7 @@ This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from typing import List
|
||||
|
||||
from mflux.models.common.weights.loading.weight_definition import (
|
||||
ComponentDefinition,
|
||||
TokenizerDefinition,
|
||||
|
||||
@@ -10,7 +10,6 @@ class AbsoluteBoxValues:
|
||||
right: int
|
||||
bottom: int
|
||||
left: int
|
||||
...
|
||||
|
||||
class BoxValueError(ValueError): ...
|
||||
|
||||
|
||||
@@ -2,9 +2,10 @@
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
from pathlib import Path
|
||||
|
||||
import mlx.core as mx
|
||||
import PIL.Image
|
||||
from pathlib import Path
|
||||
from mflux.models.common.config import ModelConfig
|
||||
from mflux.models.flux.variants.concept_attention.attention_data import ConceptHeatmap
|
||||
|
||||
|
||||
@@ -2,15 +2,16 @@
|
||||
This type stub file was generated by pyright.
|
||||
"""
|
||||
|
||||
import mlx.core as mx
|
||||
import PIL.Image
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
from PIL._typing import StrOrBytesPath
|
||||
|
||||
import mlx.core as mx
|
||||
import PIL.Image
|
||||
from mflux.models.common.config.config import Config
|
||||
from mflux.models.flux.variants.concept_attention.attention_data import ConceptHeatmap
|
||||
from mflux.utils.box_values import AbsoluteBoxValues
|
||||
from mflux.utils.generated_image import GeneratedImage
|
||||
from PIL._typing import StrOrBytesPath
|
||||
|
||||
log = ...
|
||||
|
||||
|
||||
Loaded 100 of 615 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user