amv-diffusion 2.1.0__tar.gz → 3.0.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- amv_diffusion-3.0.0/MANIFEST.in +2 -0
- {amv_diffusion-2.1.0/amv_diffusion.egg-info → amv_diffusion-3.0.0}/PKG-INFO +13 -13
- {amv_diffusion-2.1.0 → amv_diffusion-3.0.0}/README.md +1 -1
- {amv_diffusion-2.1.0 → amv_diffusion-3.0.0}/README.pypi.md +11 -11
- {amv_diffusion-2.1.0/termux_diffusion → amv_diffusion-3.0.0/amv_diffusion}/__main__.py +1 -1
- {amv_diffusion-2.1.0/termux_diffusion → amv_diffusion-3.0.0/amv_diffusion}/_version.py +1 -1
- {amv_diffusion-2.1.0/termux_diffusion → amv_diffusion-3.0.0/amv_diffusion}/adapter.py +3 -3
- {amv_diffusion-2.1.0/termux_diffusion → amv_diffusion-3.0.0/amv_diffusion}/canvas.py +2 -2
- {amv_diffusion-2.1.0/termux_diffusion → amv_diffusion-3.0.0/amv_diffusion}/cli.py +12 -12
- {amv_diffusion-2.1.0/termux_diffusion → amv_diffusion-3.0.0/amv_diffusion}/cluster.py +2 -2
- {amv_diffusion-2.1.0/termux_diffusion → amv_diffusion-3.0.0/amv_diffusion}/control/__init__.py +1 -1
- {amv_diffusion-2.1.0/termux_diffusion → amv_diffusion-3.0.0/amv_diffusion}/control/component.py +9 -9
- {amv_diffusion-2.1.0/termux_diffusion → amv_diffusion-3.0.0/amv_diffusion}/control/status.py +1 -1
- {amv_diffusion-2.1.0/termux_diffusion → amv_diffusion-3.0.0/amv_diffusion}/core.py +36 -36
- {amv_diffusion-2.1.0/termux_diffusion → amv_diffusion-3.0.0/amv_diffusion}/data/bootstrap-manifest.json +1 -1
- {amv_diffusion-2.1.0/termux_diffusion → amv_diffusion-3.0.0/amv_diffusion}/detailer.py +7 -7
- {amv_diffusion-2.1.0/termux_diffusion → amv_diffusion-3.0.0/amv_diffusion}/doctor.py +6 -6
- {amv_diffusion-2.1.0/termux_diffusion → amv_diffusion-3.0.0/amv_diffusion}/downloader.py +5 -5
- {amv_diffusion-2.1.0/termux_diffusion → amv_diffusion-3.0.0/amv_diffusion}/engine.py +4 -4
- {amv_diffusion-2.1.0/termux_diffusion → amv_diffusion-3.0.0/amv_diffusion}/hardware.py +8 -8
- {amv_diffusion-2.1.0/termux_diffusion → amv_diffusion-3.0.0/amv_diffusion}/hub.py +8 -8
- {amv_diffusion-2.1.0/termux_diffusion → amv_diffusion-3.0.0/amv_diffusion}/installer.py +29 -29
- {amv_diffusion-2.1.0/termux_diffusion → amv_diffusion-3.0.0/amv_diffusion}/locking.py +2 -2
- {amv_diffusion-2.1.0/termux_diffusion → amv_diffusion-3.0.0/amv_diffusion}/manifest.py +1 -1
- {amv_diffusion-2.1.0/termux_diffusion → amv_diffusion-3.0.0/amv_diffusion}/npu.py +2 -2
- {amv_diffusion-2.1.0/termux_diffusion → amv_diffusion-3.0.0/amv_diffusion}/platform.py +2 -2
- {amv_diffusion-2.1.0/termux_diffusion → amv_diffusion-3.0.0/amv_diffusion}/purger.py +1 -1
- {amv_diffusion-2.1.0/termux_diffusion → amv_diffusion-3.0.0/amv_diffusion}/safety.py +1 -1
- {amv_diffusion-2.1.0/termux_diffusion → amv_diffusion-3.0.0/amv_diffusion}/selftest.py +4 -4
- {amv_diffusion-2.1.0/termux_diffusion → amv_diffusion-3.0.0/amv_diffusion}/web.py +2 -2
- {amv_diffusion-2.1.0/termux_diffusion → amv_diffusion-3.0.0/amv_diffusion}/workflow.py +2 -2
- {amv_diffusion-2.1.0 → amv_diffusion-3.0.0/amv_diffusion.egg-info}/PKG-INFO +13 -13
- amv_diffusion-3.0.0/amv_diffusion.egg-info/SOURCES.txt +67 -0
- amv_diffusion-3.0.0/amv_diffusion.egg-info/entry_points.txt +7 -0
- {amv_diffusion-2.1.0 → amv_diffusion-3.0.0}/amv_diffusion.egg-info/top_level.txt +1 -0
- {amv_diffusion-2.1.0 → amv_diffusion-3.0.0}/pyproject.toml +6 -6
- {amv_diffusion-2.1.0 → amv_diffusion-3.0.0}/setup.py +10 -10
- amv_diffusion-3.0.0/termux_diffusion/__init__.py +55 -0
- {amv_diffusion-2.1.0 → amv_diffusion-3.0.0}/tests/test_canvas_studio.py +1 -1
- {amv_diffusion-2.1.0 → amv_diffusion-3.0.0}/tests/test_core.py +72 -72
- {amv_diffusion-2.1.0 → amv_diffusion-3.0.0}/tests/test_detailer.py +12 -12
- {amv_diffusion-2.1.0 → amv_diffusion-3.0.0}/tests/test_doctor.py +2 -2
- {amv_diffusion-2.1.0 → amv_diffusion-3.0.0}/tests/test_engine.py +5 -5
- {amv_diffusion-2.1.0 → amv_diffusion-3.0.0}/tests/test_gpu_runtime_guard.py +5 -5
- {amv_diffusion-2.1.0 → amv_diffusion-3.0.0}/tests/test_hardware.py +13 -13
- {amv_diffusion-2.1.0 → amv_diffusion-3.0.0}/tests/test_hub.py +3 -3
- {amv_diffusion-2.1.0 → amv_diffusion-3.0.0}/tests/test_installer.py +13 -13
- amv_diffusion-3.0.0/tests/test_legacy_import_alias.py +30 -0
- {amv_diffusion-2.1.0 → amv_diffusion-3.0.0}/tests/test_npu.py +11 -11
- {amv_diffusion-2.1.0 → amv_diffusion-3.0.0}/tests/test_platform.py +1 -1
- {amv_diffusion-2.1.0 → amv_diffusion-3.0.0}/tests/test_presets.py +6 -6
- {amv_diffusion-2.1.0 → amv_diffusion-3.0.0}/tests/test_progress.py +11 -11
- {amv_diffusion-2.1.0 → amv_diffusion-3.0.0}/tests/test_prompt_cache.py +12 -12
- {amv_diffusion-2.1.0 → amv_diffusion-3.0.0}/tests/test_rpc.py +28 -28
- {amv_diffusion-2.1.0 → amv_diffusion-3.0.0}/tests/test_safe_mode.py +9 -9
- {amv_diffusion-2.1.0 → amv_diffusion-3.0.0}/tests/test_safety_and_purger.py +2 -2
- {amv_diffusion-2.1.0 → amv_diffusion-3.0.0}/tests/test_vram_policy.py +8 -8
- {amv_diffusion-2.1.0 → amv_diffusion-3.0.0}/tests/test_web.py +7 -7
- {amv_diffusion-2.1.0 → amv_diffusion-3.0.0}/tests/test_workflow.py +10 -10
- amv_diffusion-2.1.0/MANIFEST.in +0 -2
- amv_diffusion-2.1.0/amv_diffusion.egg-info/SOURCES.txt +0 -65
- amv_diffusion-2.1.0/amv_diffusion.egg-info/entry_points.txt +0 -7
- {amv_diffusion-2.1.0 → amv_diffusion-3.0.0}/LICENSE +0 -0
- {amv_diffusion-2.1.0/termux_diffusion → amv_diffusion-3.0.0/amv_diffusion}/__init__.py +0 -0
- {amv_diffusion-2.1.0/termux_diffusion → amv_diffusion-3.0.0/amv_diffusion}/data/prompt_cache/108a7149c4e70550.json +0 -0
- {amv_diffusion-2.1.0/termux_diffusion → amv_diffusion-3.0.0/amv_diffusion}/data/release-public-keys.json +0 -0
- {amv_diffusion-2.1.0/termux_diffusion → amv_diffusion-3.0.0/amv_diffusion}/data/validated-vulkan-profiles.json +0 -0
- {amv_diffusion-2.1.0/termux_diffusion → amv_diffusion-3.0.0/amv_diffusion}/exceptions.py +0 -0
- {amv_diffusion-2.1.0/termux_diffusion → amv_diffusion-3.0.0/amv_diffusion}/py.typed +0 -0
- {amv_diffusion-2.1.0 → amv_diffusion-3.0.0}/amv_diffusion.egg-info/dependency_links.txt +0 -0
- {amv_diffusion-2.1.0 → amv_diffusion-3.0.0}/amv_diffusion.egg-info/requires.txt +0 -0
- {amv_diffusion-2.1.0 → amv_diffusion-3.0.0}/setup.cfg +0 -0
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: amv-diffusion
|
|
3
|
-
Version:
|
|
3
|
+
Version: 3.0.0
|
|
4
4
|
Summary: AmfyUI (ComfyUI Mobile DAG Studio) & Z-Image Turbo (6.0B DiT) On-Device Diffusion Runtime for Android Termux
|
|
5
|
-
Home-page: https://github.com/uno-km/
|
|
5
|
+
Home-page: https://github.com/uno-km/amv-diffusion
|
|
6
6
|
Author: uno-km (AMEVA Foundation)
|
|
7
7
|
Author-email: "uno-km (AMEVA Foundation)" <zhfldk014745@naver.com>
|
|
8
8
|
License: Apache-2.0
|
|
@@ -39,11 +39,11 @@ Dynamic: home-page
|
|
|
39
39
|
Dynamic: license-file
|
|
40
40
|
Dynamic: requires-python
|
|
41
41
|
|
|
42
|
-
#
|
|
42
|
+
# AMV-Diffusion (Python)
|
|
43
43
|
|
|
44
|
-
[](https://github.com/uno-km/
|
|
44
|
+
[](https://pypi.org/project/amv-diffusion/)
|
|
45
|
+
[](https://pypi.org/project/amv-diffusion/)
|
|
46
|
+
[](https://github.com/uno-km/amv-diffusion)
|
|
47
47
|
|
|
48
48
|
> **Official Z-Image Turbo (6.0B DiT) & Pure Native On-Device Diffusion Acceleration for Android Termux & Samsung Galaxy.**
|
|
49
49
|
> *Zero PRoot. Zero Virtualization. 100% Native ARM64 Bionic libc, Khronos Vulkan 1.1+ GPU Shaders & NEON SIMD Vector Engine.*
|
|
@@ -61,7 +61,7 @@ Dynamic: requires-python
|
|
|
61
61
|
|
|
62
62
|
## 🚀 Major Breakthrough: 6.0B DiT (Z-Image Turbo) Sovereign Mobile Execution
|
|
63
63
|
|
|
64
|
-
`
|
|
64
|
+
`amv-diffusion v1.8.0` introduces official production support for **Z-Image Turbo**, empowering mobile devices to execute modern **6.0 Billion Parameter Diffusion Transformers (DiT)** natively on-device.
|
|
65
65
|
|
|
66
66
|
### 🌟 Tri-Engine Asymmetric Architecture
|
|
67
67
|
* **Text Encoder (CPU 4-Core)**: 4.0B LLM (`Qwen3-4B-Instruct-2507-Q2_K.gguf`) performs dense context embedding on CPU Big/Prime cores (`clip_on_cpu=True`).
|
|
@@ -73,7 +73,7 @@ Dynamic: requires-python
|
|
|
73
73
|
|
|
74
74
|
## 📸 Sovereign Physical Verification: Galaxy S21 DiT 8-Step Output
|
|
75
75
|
|
|
76
|
-
* **Verification Image**: [Galaxy S21 Z-Image Turbo 8-Step PNG Artifact](https://raw.githubusercontent.com/uno-km/
|
|
76
|
+
* **Verification Image**: [Galaxy S21 Z-Image Turbo 8-Step PNG Artifact](https://raw.githubusercontent.com/uno-km/amv-diffusion/main/docs/research/s21_z_image_turbo_8step.png)
|
|
77
77
|
* **Verification Prompt (Ground Truth)**:
|
|
78
78
|
```text
|
|
79
79
|
"A cinematic photo of a neon cybernetic tiger walking in Seoul street at night"
|
|
@@ -93,7 +93,7 @@ Dynamic: requires-python
|
|
|
93
93
|
* **Runtime Stability**: 100% completion achieved with zero Out-of-Memory (LMK) aborts and zero thermal throttling termination.
|
|
94
94
|
|
|
95
95
|
### 🔬 Academic Research & Lab Report Reference
|
|
96
|
-
* **Full Technical Research Report**: [Galaxy S21 Z-Image Turbo Vulkan Research Report](https://github.com/uno-km/
|
|
96
|
+
* **Full Technical Research Report**: [Galaxy S21 Z-Image Turbo Vulkan Research Report](https://github.com/uno-km/amv-diffusion/blob/main/docs/research/s21_z_image_turbo_vulkan_research_report.md)
|
|
97
97
|
* **Academic Research Paper**: [AMEVA Labs | Sovereign On-Device AI Research, Newsletter & Discussion](https://uno-km.vercel.app/labs/index.html?menu=research-papers&post=33)
|
|
98
98
|
|
|
99
99
|
---
|
|
@@ -103,14 +103,14 @@ Dynamic: requires-python
|
|
|
103
103
|
### 1. Installation & Provisioning
|
|
104
104
|
```bash
|
|
105
105
|
pkg update && pkg install -y python clang termux-api
|
|
106
|
-
pip install
|
|
107
|
-
|
|
106
|
+
pip install amv-diffusion
|
|
107
|
+
amv-diffusion install
|
|
108
108
|
```
|
|
109
109
|
|
|
110
110
|
### 2. Python API Practical Code Example
|
|
111
111
|
|
|
112
112
|
```python
|
|
113
|
-
import
|
|
113
|
+
import amv_diffusion as td
|
|
114
114
|
|
|
115
115
|
# 1. Official Z-Image Turbo 6.0B DiT Synthesis via Python API
|
|
116
116
|
image_path = td.generate(
|
|
@@ -171,7 +171,7 @@ print(f"Generated via DreamShaper 8 LCM: {lcm_path}")
|
|
|
171
171
|
## 🌐 Official Documentation & Ecosystem Links
|
|
172
172
|
- [Official Architecture & API Reference](https://uno-km.vercel.app/lib/diffusion/)
|
|
173
173
|
- [Advanced Parameters Handbook](https://uno-km.vercel.app/lib/diffusion/advanced-parameters.html)
|
|
174
|
-
- [GitHub Repository](https://github.com/uno-km/
|
|
174
|
+
- [GitHub Repository](https://github.com/uno-km/amv-diffusion)
|
|
175
175
|
- [AMEVA Open-Source Foundation Portal](https://uno-km.vercel.app/foundation/index.html)
|
|
176
176
|
|
|
177
177
|
---
|
|
@@ -153,7 +153,7 @@ sd-cli-vulkan \
|
|
|
153
153
|
### 3. Python SDK Manual (pip install amv-diffusion)
|
|
154
154
|
|
|
155
155
|
```python
|
|
156
|
-
import
|
|
156
|
+
import amv_diffusion as td
|
|
157
157
|
|
|
158
158
|
# Official Z-Image Turbo 6.0B DiT Synthesis via Python API
|
|
159
159
|
image_path = td.generate(
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# AMV-Diffusion (Python)
|
|
2
2
|
|
|
3
|
-
[](https://github.com/uno-km/
|
|
3
|
+
[](https://pypi.org/project/amv-diffusion/)
|
|
4
|
+
[](https://pypi.org/project/amv-diffusion/)
|
|
5
|
+
[](https://github.com/uno-km/amv-diffusion)
|
|
6
6
|
|
|
7
7
|
> **Official Z-Image Turbo (6.0B DiT) & Pure Native On-Device Diffusion Acceleration for Android Termux & Samsung Galaxy.**
|
|
8
8
|
> *Zero PRoot. Zero Virtualization. 100% Native ARM64 Bionic libc, Khronos Vulkan 1.1+ GPU Shaders & NEON SIMD Vector Engine.*
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
## 🚀 Major Breakthrough: 6.0B DiT (Z-Image Turbo) Sovereign Mobile Execution
|
|
22
22
|
|
|
23
|
-
`
|
|
23
|
+
`amv-diffusion v1.8.0` introduces official production support for **Z-Image Turbo**, empowering mobile devices to execute modern **6.0 Billion Parameter Diffusion Transformers (DiT)** natively on-device.
|
|
24
24
|
|
|
25
25
|
### 🌟 Tri-Engine Asymmetric Architecture
|
|
26
26
|
* **Text Encoder (CPU 4-Core)**: 4.0B LLM (`Qwen3-4B-Instruct-2507-Q2_K.gguf`) performs dense context embedding on CPU Big/Prime cores (`clip_on_cpu=True`).
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
|
|
33
33
|
## 📸 Sovereign Physical Verification: Galaxy S21 DiT 8-Step Output
|
|
34
34
|
|
|
35
|
-
* **Verification Image**: [Galaxy S21 Z-Image Turbo 8-Step PNG Artifact](https://raw.githubusercontent.com/uno-km/
|
|
35
|
+
* **Verification Image**: [Galaxy S21 Z-Image Turbo 8-Step PNG Artifact](https://raw.githubusercontent.com/uno-km/amv-diffusion/main/docs/research/s21_z_image_turbo_8step.png)
|
|
36
36
|
* **Verification Prompt (Ground Truth)**:
|
|
37
37
|
```text
|
|
38
38
|
"A cinematic photo of a neon cybernetic tiger walking in Seoul street at night"
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
* **Runtime Stability**: 100% completion achieved with zero Out-of-Memory (LMK) aborts and zero thermal throttling termination.
|
|
53
53
|
|
|
54
54
|
### 🔬 Academic Research & Lab Report Reference
|
|
55
|
-
* **Full Technical Research Report**: [Galaxy S21 Z-Image Turbo Vulkan Research Report](https://github.com/uno-km/
|
|
55
|
+
* **Full Technical Research Report**: [Galaxy S21 Z-Image Turbo Vulkan Research Report](https://github.com/uno-km/amv-diffusion/blob/main/docs/research/s21_z_image_turbo_vulkan_research_report.md)
|
|
56
56
|
* **Academic Research Paper**: [AMEVA Labs | Sovereign On-Device AI Research, Newsletter & Discussion](https://uno-km.vercel.app/labs/index.html?menu=research-papers&post=33)
|
|
57
57
|
|
|
58
58
|
---
|
|
@@ -62,14 +62,14 @@
|
|
|
62
62
|
### 1. Installation & Provisioning
|
|
63
63
|
```bash
|
|
64
64
|
pkg update && pkg install -y python clang termux-api
|
|
65
|
-
pip install
|
|
66
|
-
|
|
65
|
+
pip install amv-diffusion
|
|
66
|
+
amv-diffusion install
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
### 2. Python API Practical Code Example
|
|
70
70
|
|
|
71
71
|
```python
|
|
72
|
-
import
|
|
72
|
+
import amv_diffusion as td
|
|
73
73
|
|
|
74
74
|
# 1. Official Z-Image Turbo 6.0B DiT Synthesis via Python API
|
|
75
75
|
image_path = td.generate(
|
|
@@ -130,7 +130,7 @@ print(f"Generated via DreamShaper 8 LCM: {lcm_path}")
|
|
|
130
130
|
## 🌐 Official Documentation & Ecosystem Links
|
|
131
131
|
- [Official Architecture & API Reference](https://uno-km.vercel.app/lib/diffusion/)
|
|
132
132
|
- [Advanced Parameters Handbook](https://uno-km.vercel.app/lib/diffusion/advanced-parameters.html)
|
|
133
|
-
- [GitHub Repository](https://github.com/uno-km/
|
|
133
|
+
- [GitHub Repository](https://github.com/uno-km/amv-diffusion)
|
|
134
134
|
- [AMEVA Open-Source Foundation Portal](https://uno-km.vercel.app/foundation/index.html)
|
|
135
135
|
|
|
136
136
|
---
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Copyright (c) 2026 Uno Kim / AMEVA Foundation. All rights reserved.
|
|
2
2
|
# SPDX-License-Identifier: Apache-2.0 OR Commercial-License
|
|
3
3
|
import sys
|
|
4
|
-
from
|
|
4
|
+
from amv_diffusion.cli import main
|
|
5
5
|
|
|
6
6
|
if __name__ == "__main__":
|
|
7
7
|
sys.exit(main())
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Copyright (c) 2026 Uno Kim / AMEVA Foundation. All rights reserved.
|
|
2
2
|
# SPDX-License-Identifier: Apache-2.0 OR Commercial-License
|
|
3
3
|
"""
|
|
4
|
-
|
|
4
|
+
amv_diffusion.adapter
|
|
5
5
|
=========================
|
|
6
6
|
AMEVA Component Protocol v1 — Orchestrator Adapter (v0.8.1 호환)
|
|
7
7
|
"""
|
|
@@ -11,7 +11,7 @@ from typing import Any, AsyncIterator
|
|
|
11
11
|
|
|
12
12
|
from ameva_component.adapter_base import BaseOrchestratorAdapter
|
|
13
13
|
from ameva_component.exceptions import OperationNotSupported
|
|
14
|
-
from
|
|
14
|
+
from amv_diffusion.control.component import DiffusionControl
|
|
15
15
|
|
|
16
16
|
|
|
17
17
|
class DiffusionOrchestratorAdapter(BaseOrchestratorAdapter):
|
|
@@ -21,7 +21,7 @@ class DiffusionOrchestratorAdapter(BaseOrchestratorAdapter):
|
|
|
21
21
|
infer()는 OPERATION_NOT_SUPPORTED — generate() REST endpoint를 사용하십시오.
|
|
22
22
|
"""
|
|
23
23
|
|
|
24
|
-
COMPONENT_ID = "
|
|
24
|
+
COMPONENT_ID = "amv-diffusion"
|
|
25
25
|
|
|
26
26
|
def __init__(self, control: DiffusionControl | None = None) -> None:
|
|
27
27
|
self._control = control or DiffusionControl()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Copyright (c) 2026 Uno Kim / AMEVA Foundation. All rights reserved.
|
|
2
2
|
# SPDX-License-Identifier: Apache-2.0 OR Commercial-License
|
|
3
|
-
"""Mobile Canva Studio Engine for
|
|
3
|
+
"""Mobile Canva Studio Engine for AMV-Diffusion.
|
|
4
4
|
|
|
5
5
|
Provides production-grade on-device graphics AI tools without cloud dependencies:
|
|
6
6
|
1. Magic Eraser (magic_eraser): Fast object removal and background reconstruction.
|
|
@@ -21,7 +21,7 @@ from typing import Any, Dict, List, Optional, Tuple, Union
|
|
|
21
21
|
import numpy as np
|
|
22
22
|
from PIL import Image, ImageDraw, ImageFilter, ImageOps
|
|
23
23
|
|
|
24
|
-
logger = logging.getLogger("
|
|
24
|
+
logger = logging.getLogger("amv_diffusion.canvas")
|
|
25
25
|
|
|
26
26
|
|
|
27
27
|
@dataclass
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Copyright (c) 2026 Uno Kim / AMEVA Foundation. All rights reserved.
|
|
2
2
|
# SPDX-License-Identifier: Apache-2.0 OR Commercial-License
|
|
3
|
-
"""Command-line interface entry points for
|
|
3
|
+
"""Command-line interface entry points for amv-diffusion."""
|
|
4
4
|
|
|
5
5
|
import argparse
|
|
6
6
|
import sys
|
|
@@ -28,7 +28,7 @@ from .installer import provision_engine
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
def main(argv: Optional[List[str]] = None) -> int:
|
|
31
|
-
"""Main CLI router for
|
|
31
|
+
"""Main CLI router for amv-diffusion.
|
|
32
32
|
|
|
33
33
|
A GPU request without a usable ameva-runtime ends here with the shared explanation on
|
|
34
34
|
stderr and exit status 69, whichever sub-command raised it.
|
|
@@ -42,12 +42,12 @@ def main(argv: Optional[List[str]] = None) -> int:
|
|
|
42
42
|
|
|
43
43
|
|
|
44
44
|
def _main_impl(argv: Optional[List[str]] = None) -> int:
|
|
45
|
-
"""Main CLI router for
|
|
45
|
+
"""Main CLI router for amv-diffusion."""
|
|
46
46
|
if argv is None:
|
|
47
47
|
argv = sys.argv[1:]
|
|
48
48
|
|
|
49
49
|
parser = argparse.ArgumentParser(
|
|
50
|
-
prog="
|
|
50
|
+
prog="amv-diffusion",
|
|
51
51
|
description="Production On-Device AI Image Generation for Android Termux & Samsung Galaxy."
|
|
52
52
|
)
|
|
53
53
|
subparsers = parser.add_subparsers(dest="command", help="Available subcommands")
|
|
@@ -169,7 +169,7 @@ def _main_impl(argv: Optional[List[str]] = None) -> int:
|
|
|
169
169
|
build_protocol_subcommands(subparsers)
|
|
170
170
|
except ImportError as _proto_err:
|
|
171
171
|
import logging
|
|
172
|
-
logging.getLogger("
|
|
172
|
+
logging.getLogger("amv_diffusion.cli").debug(
|
|
173
173
|
"Optional AMEVA component CLI protocol subcommands omitted: %s", _proto_err
|
|
174
174
|
)
|
|
175
175
|
# ────────────────────────────────────────────────────────────────────────
|
|
@@ -342,7 +342,7 @@ def _main_impl(argv: Optional[List[str]] = None) -> int:
|
|
|
342
342
|
print("\n--- [Models] Locally Cached Models ---")
|
|
343
343
|
cached = list_cached_models()
|
|
344
344
|
if not cached:
|
|
345
|
-
print(" (No models cached yet. Run '
|
|
345
|
+
print(" (No models cached yet. Run 'amv-diffusion download <model>' or generate)")
|
|
346
346
|
for m in cached:
|
|
347
347
|
print(f" - {m['name']:25} [{m['size_mb']} MB] -> {m['path']}")
|
|
348
348
|
print()
|
|
@@ -415,7 +415,7 @@ def _main_impl(argv: Optional[List[str]] = None) -> int:
|
|
|
415
415
|
elif args.command in ("component", "model", "instance"):
|
|
416
416
|
try:
|
|
417
417
|
from ameva_component.cli_support import dispatch_protocol
|
|
418
|
-
from
|
|
418
|
+
from amv_diffusion.control import DiffusionControl
|
|
419
419
|
dispatch_protocol(args, DiffusionControl())
|
|
420
420
|
except ImportError:
|
|
421
421
|
print("[ERROR] ameva-component-sdk not installed.", file=sys.stderr)
|
|
@@ -427,12 +427,12 @@ def _main_impl(argv: Optional[List[str]] = None) -> int:
|
|
|
427
427
|
|
|
428
428
|
|
|
429
429
|
def run_install_cli(argv: Optional[List[str]] = None):
|
|
430
|
-
"""Entry point for
|
|
430
|
+
"""Entry point for amv-diffusion-install with CLI mutex validation and mode control."""
|
|
431
431
|
if argv is None:
|
|
432
432
|
argv = sys.argv[1:]
|
|
433
433
|
|
|
434
434
|
parser = argparse.ArgumentParser(
|
|
435
|
-
prog="
|
|
435
|
+
prog="amv-diffusion-install",
|
|
436
436
|
description="Provision native ARM64 engine binaries with Prebuilt-First pipeline, self-test, and fallback."
|
|
437
437
|
)
|
|
438
438
|
parser.add_argument("--prebuilt", action="store_true", help="Install pre-compiled binary (prebuilt-only mode)")
|
|
@@ -458,10 +458,10 @@ def run_install_cli(argv: Optional[List[str]] = None):
|
|
|
458
458
|
else:
|
|
459
459
|
install_mode = "prebuilt-first"
|
|
460
460
|
|
|
461
|
-
print(f"[
|
|
461
|
+
print(f"[amv-diffusion] Selected Install Mode: {install_mode}")
|
|
462
462
|
|
|
463
463
|
if getattr(args, "print_diagnostics", False) or getattr(args, "diagnostics_only", False):
|
|
464
|
-
print("\n=== [
|
|
464
|
+
print("\n=== [amv-diffusion] System Diagnostics ===")
|
|
465
465
|
from .hardware import detect_hardware_profile, format_hardware_report
|
|
466
466
|
hw = detect_hardware_profile()
|
|
467
467
|
print(format_hardware_report(hw))
|
|
@@ -484,7 +484,7 @@ def run_install_cli(argv: Optional[List[str]] = None):
|
|
|
484
484
|
|
|
485
485
|
|
|
486
486
|
def run_doctor_cli():
|
|
487
|
-
"""Entry point for
|
|
487
|
+
"""Entry point for amv-diffusion-doctor."""
|
|
488
488
|
run_doctor()
|
|
489
489
|
|
|
490
490
|
|
|
@@ -11,7 +11,7 @@ import logging
|
|
|
11
11
|
import time
|
|
12
12
|
from typing import List, Optional, Union, Dict, Any, Callable, Set, Tuple
|
|
13
13
|
|
|
14
|
-
from
|
|
14
|
+
from amv_diffusion.exceptions import (
|
|
15
15
|
ClusterConnectionError,
|
|
16
16
|
ClusterConfigurationError,
|
|
17
17
|
ClusterLicenseRequiredError,
|
|
@@ -164,7 +164,7 @@ def resolve_auto_tensor_split(
|
|
|
164
164
|
|
|
165
165
|
if tensor_split and str(tensor_split).strip().lower() == "auto":
|
|
166
166
|
try:
|
|
167
|
-
from
|
|
167
|
+
from amv_ai_orchestrator.auto_split import resolve_auto_tensor_split as orch_resolve
|
|
168
168
|
return orch_resolve(servers, min_guardband_mb=min_guardband_mb)
|
|
169
169
|
except Exception as exc:
|
|
170
170
|
logger.warning("[AMEVA-CLUSTER] Auto-TS fallback to equal distribution: %s", exc)
|
{amv_diffusion-2.1.0/termux_diffusion → amv_diffusion-3.0.0/amv_diffusion}/control/__init__.py
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# Copyright (c) 2026 Uno Kim / AMEVA Foundation. All rights reserved.
|
|
2
2
|
# SPDX-License-Identifier: Apache-2.0 OR Commercial-License
|
|
3
|
-
"""
|
|
3
|
+
"""amv_diffusion.control — AMEVA Component Protocol v1."""
|
|
4
4
|
from .component import DiffusionControl
|
|
5
5
|
__all__ = ["DiffusionControl"]
|
{amv_diffusion-2.1.0/termux_diffusion → amv_diffusion-3.0.0/amv_diffusion}/control/component.py
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Copyright (c) 2026 Uno Kim / AMEVA Foundation. All rights reserved.
|
|
2
2
|
# SPDX-License-Identifier: Apache-2.0 OR Commercial-License
|
|
3
3
|
"""
|
|
4
|
-
|
|
4
|
+
amv_diffusion.control.component
|
|
5
5
|
AMEVA Component Protocol v1 — DiffusionControl
|
|
6
6
|
|
|
7
7
|
model_id는 파일명이 아닌 Pipeline Manifest를 가리킵니다.
|
|
@@ -25,13 +25,13 @@ from ameva_component.control import ComponentControl
|
|
|
25
25
|
|
|
26
26
|
class DiffusionControl(ComponentControl):
|
|
27
27
|
"""
|
|
28
|
-
|
|
28
|
+
amv-diffusion ComponentControl.
|
|
29
29
|
|
|
30
30
|
model_id = Pipeline Manifest ID (단일 파일명 아님).
|
|
31
31
|
기존 installer.run_doctor(), hub.DEFAULT_PRESETS를 Adapter로 연결.
|
|
32
32
|
"""
|
|
33
33
|
|
|
34
|
-
COMPONENT_ID = "
|
|
34
|
+
COMPONENT_ID = "amv-diffusion"
|
|
35
35
|
COMPONENT_TYPE = "diffusion"
|
|
36
36
|
CAPABILITIES = ("image.generate",)
|
|
37
37
|
|
|
@@ -44,12 +44,12 @@ class DiffusionControl(ComponentControl):
|
|
|
44
44
|
self._inst_reg = InstanceRegistry(self.COMPONENT_ID)
|
|
45
45
|
self._act_lock = ActivationLock()
|
|
46
46
|
# Phase 4: Heartbeat Writer
|
|
47
|
-
from
|
|
47
|
+
from amv_diffusion.control.status import DiffusionStatusWriter
|
|
48
48
|
self._heartbeat = DiffusionStatusWriter(self)
|
|
49
49
|
|
|
50
50
|
def _get_version(self) -> str:
|
|
51
51
|
try:
|
|
52
|
-
from
|
|
52
|
+
from amv_diffusion import __version__; return __version__
|
|
53
53
|
except Exception: return "1.3.2"
|
|
54
54
|
|
|
55
55
|
def component_info(self) -> dict:
|
|
@@ -108,7 +108,7 @@ class DiffusionControl(ComponentControl):
|
|
|
108
108
|
}
|
|
109
109
|
|
|
110
110
|
# DEFAULT_PID_FILE: COMPONENT_ID 기반 표준 경로
|
|
111
|
-
DEFAULT_PID_FILE: Path = Path.home() / ".local" / "run" / "
|
|
111
|
+
DEFAULT_PID_FILE: Path = Path.home() / ".local" / "run" / "amv-diffusion.pid"
|
|
112
112
|
|
|
113
113
|
def _check_pid(self) -> dict[str, Any]:
|
|
114
114
|
"""BLOCKER 1: PID 파일에서 sd-cli 프로세스 생존 여부 확인.
|
|
@@ -176,7 +176,7 @@ class DiffusionControl(ComponentControl):
|
|
|
176
176
|
def _check_engine_binary(self) -> bool:
|
|
177
177
|
"""엔진 바이너리 존재 여부만 확인 — 실행 금지."""
|
|
178
178
|
try:
|
|
179
|
-
from
|
|
179
|
+
from amv_diffusion.installer import provision_engine
|
|
180
180
|
return True # 모듈 import 성공 = 설치 가능 상태
|
|
181
181
|
except ImportError:
|
|
182
182
|
return False # Allowed: engine not installed -> binary check fails-closed.
|
|
@@ -185,7 +185,7 @@ class DiffusionControl(ComponentControl):
|
|
|
185
185
|
"""기존 installer.run_doctor() 전체 실행."""
|
|
186
186
|
lite = self.doctor_lite()
|
|
187
187
|
try:
|
|
188
|
-
from
|
|
188
|
+
from amv_diffusion.installer import run_doctor
|
|
189
189
|
result = run_doctor()
|
|
190
190
|
lite["full_doctor"] = result if isinstance(result, dict) else {"output": str(result)}
|
|
191
191
|
except Exception as e:
|
|
@@ -197,7 +197,7 @@ class DiffusionControl(ComponentControl):
|
|
|
197
197
|
"""Pipeline Manifest 기반 모델 목록 + hub.DEFAULT_PRESETS."""
|
|
198
198
|
reg_map = {m["model_id"]: m for m in self._model_reg.list_all()}
|
|
199
199
|
try:
|
|
200
|
-
from
|
|
200
|
+
from amv_diffusion.hub import DEFAULT_PRESETS, list_presets
|
|
201
201
|
for preset_id, preset_info in DEFAULT_PRESETS.items():
|
|
202
202
|
if preset_id not in reg_map:
|
|
203
203
|
reg_map[preset_id] = {
|
{amv_diffusion-2.1.0/termux_diffusion → amv_diffusion-3.0.0/amv_diffusion}/control/status.py
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Copyright (c) 2026 Uno Kim / AMEVA Foundation. All rights reserved.
|
|
2
2
|
# SPDX-License-Identifier: Apache-2.0 OR Commercial-License
|
|
3
3
|
"""
|
|
4
|
-
|
|
4
|
+
amv_diffusion.control.status — Diffusion 상태 파일 Writer + Heartbeat
|
|
5
5
|
"""
|
|
6
6
|
from __future__ import annotations
|
|
7
7
|
from typing import Any
|