Spaces:
Running on Zero
Running on Zero
docs: clarify general no-LoRA runtime
Browse files- MODEL_BOM.md +2 -2
- README.md +1 -1
- app.py +2 -2
- tests/test_space_static.py +1 -1
MODEL_BOM.md
CHANGED
|
@@ -22,7 +22,7 @@ NSFW classifier, safety checker, or semantic blocklist is added in H2.
|
|
| 22 |
|
| 23 |
The source Space exposed all 19 candidates below, and H2 pinned their revisions
|
| 24 |
for provenance. The current public runtime enables none of them: requests run
|
| 25 |
-
the pinned replacement transformer directly in
|
| 26 |
selecting, or applying a LoRA adapter.
|
| 27 |
|
| 28 |
| API ID | Repository | Revision | Recorded status |
|
|
@@ -59,4 +59,4 @@ selecting, or applying a LoRA adapter.
|
|
| 59 |
- Produce an exact Linux transitive dependency lock after a controlled build.
|
| 60 |
- A previous `Anime-V2` smoke does not validate the new no-LoRA general edit path.
|
| 61 |
Run a separate, explicitly authorized synthetic-image smoke before describing
|
| 62 |
-
|
|
|
|
| 22 |
|
| 23 |
The source Space exposed all 19 candidates below, and H2 pinned their revisions
|
| 24 |
for provenance. The current public runtime enables none of them: requests run
|
| 25 |
+
the pinned replacement transformer directly in general edit mode without loading,
|
| 26 |
selecting, or applying a LoRA adapter.
|
| 27 |
|
| 28 |
| API ID | Repository | Revision | Recorded status |
|
|
|
|
| 59 |
- Produce an exact Linux transitive dependency lock after a controlled build.
|
| 60 |
- A previous `Anime-V2` smoke does not validate the new no-LoRA general edit path.
|
| 61 |
Run a separate, explicitly authorized synthetic-image smoke before describing
|
| 62 |
+
general no-LoRA image generation as end-to-end verified.
|
README.md
CHANGED
|
@@ -28,7 +28,7 @@ compatibility and accepts only the reserved internal value `__base__`.
|
|
| 28 |
- Input shape: the upstream seven fields
|
| 29 |
- Output shape: `{ "image": "data:image/png;base64,...", "seed": number }`
|
| 30 |
- Technical validation: one PNG/JPEG/WebP data URL, at most 10 MiB and 16 MP,
|
| 31 |
-
Prompt length, numeric ranges, the reserved
|
| 32 |
concurrent pipeline operation
|
| 33 |
- Error output: stable low-cardinality codes; raw provider exceptions and user
|
| 34 |
content are not returned or logged
|
|
|
|
| 28 |
- Input shape: the upstream seven fields
|
| 29 |
- Output shape: `{ "image": "data:image/png;base64,...", "seed": number }`
|
| 30 |
- Technical validation: one PNG/JPEG/WebP data URL, at most 10 MiB and 16 MP,
|
| 31 |
+
Prompt length, numeric ranges, the reserved general edit mode, and one
|
| 32 |
concurrent pipeline operation
|
| 33 |
- Error output: stable low-cardinality codes; raw provider exceptions and user
|
| 34 |
content are not returned or logged
|
app.py
CHANGED
|
@@ -125,7 +125,7 @@ def _clear_cuda_cache() -> None:
|
|
| 125 |
|
| 126 |
@spaces.GPU(size="xlarge")
|
| 127 |
def _run_gpu_edit(request: ValidatedEditRequest) -> tuple[bytes, int]:
|
| 128 |
-
"""Run one
|
| 129 |
|
| 130 |
_clear_cuda_cache()
|
| 131 |
try:
|
|
@@ -177,7 +177,7 @@ def edit_image(
|
|
| 177 |
"""Validate on CPU, then call the internal ZeroGPU edit function.
|
| 178 |
|
| 179 |
The public seven-field contract is retained for compatibility. The legacy
|
| 180 |
-
lora_adapter field must contain the reserved
|
| 181 |
loaded. Validation is technical only, with no semantic content moderation.
|
| 182 |
"""
|
| 183 |
|
|
|
|
| 125 |
|
| 126 |
@spaces.GPU(size="xlarge")
|
| 127 |
def _run_gpu_edit(request: ValidatedEditRequest) -> tuple[bytes, int]:
|
| 128 |
+
"""Run one general edit with the pinned replacement transformer and no LoRA."""
|
| 129 |
|
| 130 |
_clear_cuda_cache()
|
| 131 |
try:
|
|
|
|
| 177 |
"""Validate on CPU, then call the internal ZeroGPU edit function.
|
| 178 |
|
| 179 |
The public seven-field contract is retained for compatibility. The legacy
|
| 180 |
+
lora_adapter field must contain the reserved general-mode value; no LoRA is
|
| 181 |
loaded. Validation is technical only, with no semantic content moderation.
|
| 182 |
"""
|
| 183 |
|
tests/test_space_static.py
CHANGED
|
@@ -78,7 +78,7 @@ class SpaceStaticTests(unittest.TestCase):
|
|
| 78 |
self.assertNotIn("set_adapters", source)
|
| 79 |
self.assertNotIn("unload_lora_weights", source)
|
| 80 |
|
| 81 |
-
def
|
| 82 |
source = (ROOT / "app.py").read_text(encoding="utf-8")
|
| 83 |
self.assertIn('"edit_mode": "general"', source)
|
| 84 |
self.assertIn('"uses_lora": False', source)
|
|
|
|
| 78 |
self.assertNotIn("set_adapters", source)
|
| 79 |
self.assertNotIn("unload_lora_weights", source)
|
| 80 |
|
| 81 |
+
def test_public_runtime_is_explicitly_general_no_lora_mode(self):
|
| 82 |
source = (ROOT / "app.py").read_text(encoding="utf-8")
|
| 83 |
self.assertIn('"edit_mode": "general"', source)
|
| 84 |
self.assertIn('"uses_lora": False', source)
|