Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

feat: emit Windows image execution marker (#5102)

[._.]/ Adam Eivy1790bba4fb9d
diff --git a/scripts/image_execution_marker.test.js b/scripts/image_execution_marker.test.js
index c637df40e7..ce14fc11dd 100644
--- a/scripts/image_execution_marker.test.js
+++ b/scripts/image_execution_marker.test.js
@@ -6,6 +6,26 @@ import { describe, expect, it } from 'vitest';
const scriptsDir = dirname(fileURLToPath(import.meta.url));
describe('local image execution marker', () => {
+ const buildMarker = (requestedDevice, effectiveDevice, placement) => {
+ const program = [
+ 'import json, sys',
+ `sys.path.insert(0, ${JSON.stringify(scriptsDir)})`,
+ 'from _runner_common import build_image_execution_marker',
+ `print(json.dumps(build_image_execution_marker('diffusers-image', ${JSON.stringify(requestedDevice)}, ${JSON.stringify(effectiveDevice)}, ${JSON.stringify(placement)}, [])))`,
+ ].join('; ');
+ return JSON.parse(execFileSync('python3', ['-c', program], { encoding: 'utf8' }));
+ };
+
+ it('records the Windows split CUDA placement as confirmed', () => {
+ expect(buildMarker('cuda', 'cuda', 'cuda+offload')).toMatchObject({
+ state: 'confirmed',
+ requestedDevice: 'cuda',
+ effectiveDevice: 'cuda',
+ placement: 'cuda+offload',
+ cpuFallback: false,
+ runtime: { runtime: 'diffusers-image', versions: {} },
+ });
+ });
it('records a CPU fallback as degraded without host or prompt data', () => {
const program = [
'import json, sys',
diff --git a/scripts/imagine_win.py b/scripts/imagine_win.py
index b64bce130a..29a1e73d20 100644
--- a/scripts/imagine_win.py
+++ b/scripts/imagine_win.py
@@ -22,6 +22,8 @@ from transformers import (
T5Config, T5EncoderModel, T5TokenizerFast,
)
+from _runner_common import emit_image_execution_marker
+
# ---------------------------------------------------------------------------
# Paths
# ---------------------------------------------------------------------------
@@ -183,6 +185,18 @@ def main():
pipe = build_pipeline(flux_key, hf_cache, dtype)
+ # The transformer and CLIP run on CUDA while T5 is intentionally kept on
+ # CPU to fit the Windows pipeline in available VRAM. Emit this evidence
+ # only after placement is complete so the gallery can distinguish the
+ # split CUDA path from an unmarked legacy runner or a CPU fallback.
+ emit_image_execution_marker(
+ 'diffusers-image',
+ 'cuda',
+ 'cuda',
+ 'cuda+offload',
+ ['torch', 'diffusers', 'transformers', 'accelerate'],
+ )
+
log(f'STATUS:Generating image ({args.width}x{args.height}, {args.steps} steps)...')
result = pipe(