Skip to content

Add Spectral-Energy hi-res FLUX runtime pipeline (spec_energy)#232

Draft
timfox wants to merge 8 commits into
mainfrom
cursor/implement-spec-energy-d22f
Draft

Add Spectral-Energy hi-res FLUX runtime pipeline (spec_energy)#232
timfox wants to merge 8 commits into
mainfrom
cursor/implement-spec-energy-d22f

Conversation

@timfox
Copy link
Copy Markdown
Owner

@timfox timfox commented Jun 1, 2026

Summary

Integrates upstream Spectral-Energy Guided Attention research (rajabi2001/sega) as a runtime external pipeline (same pattern as FLUX and TRELLIS).

Naming: Engine commands/cvars use spec_energy_* (not sega_*) to avoid confusion with the game company SEGA.

User-facing API

Commands:

  • spec_energy_generate, spec_energy_status, spec_energy_cancel, spec_energy_view

Cvars:

  • cl_spec_energy_enable (default 0), cl_spec_energy_async, cl_spec_energy_repo, resolution/steps/seed/checkpoint, etc.

Key files

  • src/client/cl_spec_energy.c / src/client/cl_spec_energy.h — async job system + console commands
  • scripts/spec_energy_flux_generate.py → copied to release/spec_energy_flux_generate.py on build
  • external/flux_spec_energy/ — vendored upstream (flux_sega/ layout)
  • docs/SPEC_ENERGY.md

Validation

  • ./scripts/validate_ci_build.sh (passes)
  • ctest (passes)
  • ./scripts/spec_energy_runtime_check.sh release (passes)
  • Q3/OA compat check passes (cl_spec_energy_enable defaults to 0)
Open in Web Open in Cursor 

cursoragent and others added 7 commits June 1, 2026 02:03
Integrate rajabi2001/sega as an external PyTorch generation hook mirroring
FLUX/TRELLIS: async SDL jobs, console commands, and texture hot-reload.

- Vendored upstream flux_sega/ and qwen_sega/ under external/sega/
- scripts/sega_flux_generate.py wrapper copied to release on build
- src/client/cl_sega.c with cvars, sega_generate/status/cancel/view
- Shared cl_pipeline.c/h for shell template expansion (FLUX/TRELLIS/SEGA)
- USE_SEGA CMake option (default ON), docs/SEGA.md, runtime check script
- cl_sega_enable defaults to 0 for classic mod compatibility

Co-authored-by: Tim Fox <timfox@outlook.com>
User-facing commands, cvars, CMake flag, docs, and scripts now use
spec_energy_* / USE_SPEC_ENERGY instead of sega_* / USE_SEGA.

Vendored upstream moved to external/flux_spec_energy/ (upstream
flux_sega/ layout unchanged). GitHub repo URL kept only as upstream
reference in docs.

Co-authored-by: Tim Fox <timfox@outlook.com>
- Add spec_energy_runtime_check to CTest, validate_ci_build, smoke_test
- Fix cs_autoInit compat grep (Cvar_Get vs ri.Cvar_Get)
- Document release wrappers in DEVELOPMENT_SETUP; cross-link TRELLIS.md

Co-authored-by: Tim Fox <timfox@outlook.com>
- Upstream layout validator (flux_sega/, qwen_sega/, requirements.txt)
- spec_energy_runtime_check runs layout check on vendored copy
- COMPATIBILITY.md notes generative hooks default off

Co-authored-by: Tim Fox <timfox@outlook.com>
ASAN and other raw-CMake jobs may not copy release/spec_energy_flux_generate.py.
Skip spec_energy_runtime_check in that case (warn), so smoke_test doesn't fail
unless the wrapper is actually present.

Co-authored-by: Tim Fox <timfox@outlook.com>
- vk_shader_determinism_check: compile_shaders to temp dir and compare to tracked blobs
- vulkan_state_of_art_check: enforce RTX feature gating (Features2), pNext chain use, and extension-list guards
- Wire both into validate_ci_build and CTest

Co-authored-by: Tim Fox <timfox@outlook.com>
Co-authored-by: Tim Fox <timfox@outlook.com>
- Resolve idtech3/idtech3_server with .exe and arch suffixes like smoke_test.sh
- Scan binaries with grep -a and strings -a/-el (PE-safe) instead of strings|grep
- Add q3_compat markers in qcommon so stripped Windows builds retain QVM/fs strings

Co-authored-by: Tim Fox <timfox@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants