Prepare Comfy registry publishing and tighten config validation
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
name: Publish to Comfy registry
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
paths:
|
||||
- "pyproject.toml"
|
||||
|
||||
permissions:
|
||||
issues: write
|
||||
|
||||
jobs:
|
||||
publish-node:
|
||||
name: Publish Custom Node to registry
|
||||
runs-on: ubuntu-latest
|
||||
if: ${{ github.repository_owner == 'xmarre' }}
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: true
|
||||
|
||||
- name: Publish Custom Node
|
||||
uses: Comfy-Org/publish-node-action@v1
|
||||
with:
|
||||
personal_access_token: ${{ secrets.REGISTRY_ACCESS_TOKEN }}
|
||||
@@ -34,8 +34,11 @@ class SpectrumConfig:
|
||||
raise ValueError("warmup_steps must be >= 0.")
|
||||
if int(self.tail_actual_steps) < 0:
|
||||
raise ValueError("tail_actual_steps must be >= 0.")
|
||||
if int(self.max_history) < max(8, int(self.degree) + 1):
|
||||
raise ValueError("max_history must be at least max(8, degree + 1).")
|
||||
min_history = max(8, int(self.degree) + 1)
|
||||
if int(self.max_history) < min_history:
|
||||
raise ValueError(
|
||||
f"max_history ({int(self.max_history)}) must be at least max(8, degree + 1) = {min_history}."
|
||||
)
|
||||
return self
|
||||
|
||||
def to_dict(self) -> dict:
|
||||
|
||||
@@ -17,7 +17,7 @@ class SpectrumApplyZImage:
|
||||
"flex_window": ("FLOAT", {"default": 0.75, "min": 0.0, "max": 8.0, "step": 0.05}),
|
||||
"warmup_steps": ("INT", {"default": 5, "min": 0, "max": 32, "step": 1}),
|
||||
"tail_actual_steps": ("INT", {"default": 3, "min": 0, "max": 32, "step": 1}),
|
||||
"max_history": ("INT", {"default": 128, "min": 8, "max": 512, "step": 1}),
|
||||
"max_history": ("INT", {"default": 128, "min": 17, "max": 512, "step": 1}),
|
||||
"debug": ("BOOLEAN", {"default": False}),
|
||||
}
|
||||
}
|
||||
|
||||
+10
-1
@@ -1,3 +1,7 @@
|
||||
[build-system]
|
||||
requires = ["setuptools>=61.0"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
|
||||
[project]
|
||||
name = "comfyui-spectrum-zimage-proper"
|
||||
description = "Faithful Z-Image-focused ComfyUI port of Spectrum spectral feature forecasting."
|
||||
@@ -13,8 +17,13 @@ classifiers = [
|
||||
"License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
|
||||
]
|
||||
|
||||
[project.urls]
|
||||
Repository = "https://github.com/xmarre/ComfyUI-Spectrum-ZImage-Proper"
|
||||
Documentation = "https://github.com/xmarre/ComfyUI-Spectrum-ZImage-Proper/wiki"
|
||||
"Bug Tracker" = "https://github.com/xmarre/ComfyUI-Spectrum-ZImage-Proper/issues"
|
||||
|
||||
[tool.comfy]
|
||||
PublisherId = "local"
|
||||
PublisherId = "xmarre"
|
||||
DisplayName = "ComfyUI-Spectrum-ZImage-Proper"
|
||||
Icon = ""
|
||||
includes = []
|
||||
|
||||
@@ -111,10 +111,11 @@ def test_forecast_fallback_reconciles_bookkeeping() -> None:
|
||||
runtime.observe_actual_feature(run_id, 5, torch.randn(1, 8, 4))
|
||||
runtime.finalize_solver_step(run_id, 5, used_forecast=False)
|
||||
|
||||
assert runtime.stats.forecast_disabled is True
|
||||
assert runtime.stats.disable_reason == "predicted feature shape did not match the current solver-step input"
|
||||
assert runtime.stats.forecasted_count == 0
|
||||
assert runtime.stats.actual_forward_count == 6
|
||||
assert runtime.num_consecutive_cached_steps == 0
|
||||
assert decision["actual_forward"] is True
|
||||
assert runtime.curr_ws == before_window
|
||||
runtime.end_run(run_id)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user