Add a first-class office-document capability ALONGSIDE the ComfyUI/GPU creative
pipeline: structured content (typed template fields, filled by a person or the
AI) → a pure-Python renderer → a real .pdf/.docx/.xlsx/.pptx/.md. No graph, no
GPU. Orthogonal subsystem — not bolted onto graphs.
- middleware/doc_render.py: one neutral IR per archetype (doc/sheet/deck) and
exactly one renderer per format (DRY). PDF via WeasyPrint (full-CSS monochrome
print style) with a self-contained pure-Python PDF fallback (valid %PDF, zero
native deps — so CI/model-less pods still render). DOCX/XLSX/PPTX via
python-docx/openpyxl/python-pptx.
- middleware/documents.py: one declarative CATALOG of 22 common templates
(Documents 15, Spreadsheets 4, Presentations 3). Each template's typed fields
drive the form, the AI-fill JSON, and the renderer inputs (one schema). Per-org
store (orgs/<org>/documents, atomic index.json + <id>/doc.json), rendered on
demand. Endpoints (/v1 house style): GET /v1/documents, POST
/v1/documents/generate, GET /v1/documents/library, GET|PATCH|DELETE
/v1/documents/{id}, GET /v1/documents/{id}/download?format=. Registered via the
same injected tenancy resolvers as stacks_store.
- AI-fill is a layered enhancement — the form path renders with NO LLM, so a
broken/unauthorized gateway never blocks creation (422 needFields → prefilled
form). Reuses the shipped Chat's working token: the browser sends window.HZ.pk
(publishable pk- key) as the bearer; the backend forwards it fail-closed —
server key, else a gateway-verifiable pk-/RS-JWT; an HS256 session token or
sk-/hk- secret is NEVER forwarded. Model default enso (window.HZ.model).
- studio_home.html: a "Documents" Home tab (searchable catalog + your documents
with Download PDF/Word/Excel/PowerPoint) + describe/fill dialog; replaced the
dead doc/sheet/paper composer placeholders with one "Office documents" card.
- deps: weasyprint/python-docx/openpyxl/python-pptx (requirements.txt) + pango
native libs (Dockerfile). CI builds the image; not built locally.
- tests-unit/documents_test: catalog invariants, full template×format render
matrix asserted by magic numbers, AI-fill parse + fail-closed bearer allowlist,
and the REST surface incl. per-org isolation (44 tests, green).
- version 0.17.24 → 0.18.0.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
46 lines
903 B
Plaintext
46 lines
903 B
Plaintext
comfyui-frontend-package==1.39.14
|
|
comfyui-workflow-templates==0.8.43
|
|
comfyui-embedded-docs==0.4.1
|
|
torch
|
|
torchsde
|
|
torchvision
|
|
torchaudio
|
|
numpy>=1.25.0
|
|
einops
|
|
transformers>=4.50.3
|
|
tokenizers>=0.13.3
|
|
sentencepiece
|
|
safetensors>=0.4.2
|
|
aiohttp>=3.11.8
|
|
yarl>=1.18.0
|
|
pyyaml
|
|
Pillow
|
|
scipy
|
|
tqdm
|
|
psutil
|
|
alembic
|
|
SQLAlchemy
|
|
av>=14.2.0
|
|
comfy-kitchen>=0.2.7
|
|
comfy-aimdo>=0.2.0
|
|
requests
|
|
PyJWT[crypto]>=2.7.0
|
|
|
|
# Office-document renderers (middleware/doc_render.py) — pure-Python, no GPU. WeasyPrint
|
|
# gives full-CSS PDFs when its native pango/cairo stack is present (see Dockerfile);
|
|
# where it is not (the light CI unit venv), the built-in PDF fallback takes over, so
|
|
# every format renders with just these wheels installed.
|
|
weasyprint>=63
|
|
python-docx>=1.1.0
|
|
openpyxl>=3.1.0
|
|
python-pptx>=1.0.0
|
|
|
|
#non essential dependencies:
|
|
kornia>=0.7.1
|
|
spandrel
|
|
pydantic~=2.0
|
|
pydantic-settings~=2.0
|
|
PyOpenGL
|
|
PyOpenGL-accelerate
|
|
glfw
|