From 8082f3ee924c2f026fc87581d80b1c7281b865fe Mon Sep 17 00:00:00 2001 From: exdysa <91800957+exdysa@users.noreply.github.com> Date: Wed, 4 Mar 2026 11:51:45 -0500 Subject: [PATCH 1/3] ~patch gradio --- pyproject.toml | 84 +++++++++++++++++++++++++++++++++----------------- 1 file changed, 56 insertions(+), 28 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 99be669..f7ed5d5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,50 +1,78 @@ +# SPDX-License-Identifier: MPL-2.0 AND LicenseRef-Commons-Clause-License-Condition-1.0 +# + [build-system] requires = ["setuptools>=61.0", "wheel"] build-backend = "setuptools.build_meta" [project] +authors = [{ name = "darkshapes", email = "91800957+exdysa@users.noreply.github.com" }] 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"] @@ -65,8 +93,8 @@ 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] @@ -74,5 +102,5 @@ ignore = ["E731"] [tool.pylint] max-line-length = 140 -ignore-paths = ["^tests/.*$", "test_.*$"] -disable = ["C0415"] +ignore-paths = ["^tests/.*$", "test_.*$"] +disable = ["C0415"] From fefded8495f88bbf963a4386ffa74ca9fdbb2511 Mon Sep 17 00:00:00 2001 From: exdysa <91800957+exdysa@users.noreply.github.com> Date: Wed, 4 Mar 2026 11:58:51 -0500 Subject: [PATCH 2/3] ~patch device --- divisor/mmada/sampling.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/divisor/mmada/sampling.py b/divisor/mmada/sampling.py index 6e1ff95..4409288 100644 --- a/divisor/mmada/sampling.py +++ b/divisor/mmada/sampling.py @@ -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 From 00d6ba1980cbf9d8890e83135a4cc44841a7a3fd Mon Sep 17 00:00:00 2001 From: exdysa <91800957+exdysa@users.noreply.github.com> Date: Wed, 4 Mar 2026 12:00:27 -0500 Subject: [PATCH 3/3] ~dtype error --- divisor/noise.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/divisor/noise.py b/divisor/noise.py index 9a0c417..0694ac0 100644 --- a/divisor/noise.py +++ b/divisor/noise.py @@ -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