Learned tile-sparse attention (Veda, arXiv 2605.30325): tiles, tile plans, predictor scoring and selection in plain torch (tested on CPU, including a real tiny H3 with a stand-in kernel), an INT8 Triton kernel derived from SageAttention (untested on a GPU), installed through the same override and per-step wrapper as SLA. Runs at the predictor's trained budget; LoRA, MXFP8, Two stages, dense steps and the attention backend compose. Settings > Models offers the official Hugging Face download of the predictor on a click, with its licence beside it; taggers and this share one downloader (core/fetch.py).
40 lines
1.3 KiB
Python
40 lines
1.3 KiB
Python
"""Diffusion model loader. A node-only module."""
|
|
|
|
from .nodes import FunUIDiffusionModelLoader
|
|
|
|
ID = "loader_diffusion_model"
|
|
TITLE = "Diffusion model loader"
|
|
STAGE = "load"
|
|
CATEGORY = "system"
|
|
STATUS = "proven"
|
|
|
|
NODES = [FunUIDiffusionModelLoader]
|
|
|
|
|
|
def routes(table, base, web):
|
|
@table.get(base + "/torch")
|
|
async def _torch(_req):
|
|
"""Why int8 would run slow on this torch build (None when it would not), for the chip beside Generate."""
|
|
from ..common import slow_int8_build
|
|
return web.json_response({"slow_int8": slow_int8_build()})
|
|
|
|
@table.get(base + "/veda")
|
|
async def _veda(_req):
|
|
"""The Veda predictor files that are in models/veda, the two official downloads with their state, and the licence."""
|
|
from .. import veda_download
|
|
return web.json_response(veda_download.listing())
|
|
|
|
@table.post(base + "/veda/download")
|
|
async def _veda_download(req):
|
|
"""Fetch one official predictor straight from Hugging Face: {"id": "t2va" | "r2va"}. Only ever started by a click."""
|
|
from .. import veda_download
|
|
try:
|
|
body = await req.json()
|
|
except ValueError:
|
|
body = None
|
|
started = veda_download.download(str(body.get("id") or "") if isinstance(body, dict) else "")
|
|
return web.json_response({"started": started})
|
|
|
|
|
|
PROVIDES = {"routes": routes}
|