Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion divisor/mmada/sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,6 @@ def prepare(model, tokenizer, prompt_text):
padding_side="left",
truncation=True,
max_length=model.config.max_position_embeddings if hasattr(model.config, "max_position_embeddings") else 2048,
)["input_ids"].to(device)
)["input_ids"].to(gfx_device)

return input_ids
2 changes: 1 addition & 1 deletion divisor/noise.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def add_gumbel_noise(logits, temperature):
if abs(temperature) < 1e-9: # Effectively zero temperature
return logits

max_device_precision = gfx_dtype(full_precision=True)
max_device_precision = gfx_dtype
logits = logits.to(max_device_precision)
noise = torch.rand_like(logits, dtype=max_device_precision)
# Standard Gumbel noise: -log(-log(U)), U ~ Uniform(0,1) Add small epsilon for numerical stability inside logs
Expand Down
84 changes: 56 additions & 28 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,50 +1,78 @@
# SPDX-License-Identifier: MPL-2.0 AND LicenseRef-Commons-Clause-License-Condition-1.0
# <!-- // /* d a r k s h a p e s */ -->

[build-system]
requires = ["setuptools>=61.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
authors = [{ name = "darkshapes", email = "[email protected]" }]
name = "divisor"
version = "0.1.4"
description = "fragment / denoise / process"
version = "0.1.4"
readme = "README.md"
license = { file = "LICENSE" }
requires-python = ">=3.13"
keywords = ["ML", "AI", "TUI", "no-code", "diffusion", "LLM", "torch"]
classifiers = [
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Intended Audience :: End Users/Desktop",
"Intended Audience :: Other Audience",
"License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)",
"Operating System :: OS Independent",
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Topic :: Scientific/Engineering :: Image Processing",
"Topic :: Multimedia",
"Topic :: Multimedia :: Graphics",
"Topic :: Multimedia :: Graphics :: Editors",
"Topic :: Multimedia :: Graphics :: Graphics Conversion",
"Topic :: Multimedia :: Graphics :: Presentation",
"Topic :: Multimedia :: Graphics :: Viewers",
"Topic :: Multimedia :: Sound/Audio",
"Topic :: Multimedia :: Sound/Audio :: Conversion",
"Topic :: Multimedia :: Sound/Audio :: Editors",
"Topic :: Multimedia :: Sound/Audio :: Mixers",
"Topic :: Multimedia :: Sound/Audio :: Players",
"Topic :: Multimedia :: Video",
"Topic :: Multimedia :: Video :: Capture",
"Topic :: Multimedia :: Video :: Conversion",
"Topic :: Multimedia :: Video :: Display",
"Topic :: Multimedia :: Video :: Non-Linear Editor",

]

dependencies = [
"ffmpeg>=1.4",
"fire>=0.7.1",
"gradio>=5.23.1",
"hangul-romanize>=0.1.0",
"librosa>=0.11.0",
"nnll[full]",
"num2words>=0.5.14",
"py3langid>=0.3.0",
"pypinyin>=0.55.0",
"spacy>=3.8.11",
"torchcodec>=0.9.1",
"transformers",
"pdoc>=16.0.0",
"opencc>=1.1.9",
"ffmpeg>=1.4",
"fire>=0.7.1",
"gradio<6",
"hangul-romanize>=0.1.0",
"librosa>=0.11.0",
"nnll[full]",
"num2words>=0.5.14",
"py3langid>=0.3.0",
"pypinyin>=0.55.0",
"spacy>=3.8.11",
"torchcodec>=0.9.1",
"transformers",
"pdoc>=16.0.0",
"opencc>=1.1.9",
]
[project.scripts]
dvzr = "divisor.app:main"
divisor = "divisor.app:main"

[dependency-groups]
dev = [
"nnll[dev]",
"pyright>=1.1.407",
"pytest>=9.0.2",
"ruff>=0.14.10",
]
dev = ["nnll[dev]", "pyright>=1.1.407", "pytest>=9.0.2", "ruff>=0.14.10"]
[project.optional-dependencies]
cuda = [
"jetengine @ git+https://github.com/Labman42/JetEngine.git ; sys_platform != 'darwin'",
]
cuda = ["jetengine @ git+https://github.com/Labman42/JetEngine.git ; sys_platform != 'darwin'"]
[tool.pyright]
include = ["divisor"]
exclude = [
"**/__pycache__", # cache directories
"./typings", # generated type stubs
]

[tool.setuptools]
packages = ["divisor"]

Expand All @@ -65,14 +93,14 @@ nnll = { git = "https://github.com/darkshapes/nnll" }
jetengine = { git = "https://github.com/Labman42/JetEngine.git" }

[tool.ruff]
line-length = 160
include = ["*.py"]
line-length = 160
include = ["*.py"]
extend-exclude = ["**/__pycache__", "./typings"]

[tool.ruff.lint]
ignore = ["E731"]

[tool.pylint]
max-line-length = 140
ignore-paths = ["^tests/.*$", "test_.*$"]
disable = ["C0415"]
ignore-paths = ["^tests/.*$", "test_.*$"]
disable = ["C0415"]