imagegen

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 29, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package imagegen generates an image from a text prompt by shelling out to the repo's render/comfy-generate.mjs (Node), which wraps the proven comfy-render.mjs with the GPU-lock + ComfyUI start/stop lifecycle. The render runs on the LOCAL ComfyUI (SDXL/ RealVisXL) — free, no cloud. It is now a THIN caller of internal/gpugen, which owns the shared exec lifecycle (process-tree-kill on timeout, WaitDelay, defer freeComfyVRAM) so image/video/audio all get the SAME guards. Behavior is preserved byte-for-byte; only the lifecycle was lifted into gpugen.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Generate

func Generate(ctx context.Context, node, script, comfyDir, out, prompt string, params map[string]any, timeout time.Duration) (string, error)

Generate runs `node <script> <out> <prompt> [--negative ..] [--width ..] ...` and returns out on success. node is the node executable ("" => "node"); script is the absolute path to comfy-generate.mjs; comfyDir is exported as COMFY_DIR for the script. params may carry negative (string) and width/height/steps/seed (int-ish). A non-zero exit, a timeout, or a missing/empty output file returns an error (the caller defers).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL