ComfyUI server + export path
By the end of this module, the Acer should be able to run ComfyUI locally, generate a text-to-image result, and export the latest image to both SVG and HPGL.
This module is a complete command-line runbook. It avoids hidden assumptions, shows what to run, what you should expect before and after each step, and ends with a working local workflow: prompt → image → SVG → HPGL.
By the end of this module, the Acer should be able to run ComfyUI locally, generate a text-to-image result, and export the latest image to both SVG and HPGL.
This is not just a note page. It is meant to be a stable ANNPLOT reference page you can return to later or share as a free course module.
Run the checks first. If these fail, fix them before moving on.
./scripts/00_preflight_checks.sh
nvidia-smi output or learn it is missingUse the fresh install path if ComfyUI is not already installed. Use the update path if it is already there.
./scripts/01_install_base_deps.sh
Before: You may not yet have git, ImageMagick, or potrace.
After: You should have python3, python3-venv, python3-pip, git, imagemagick, and potrace.
./scripts/02_install_comfyui_manual.sh
Before: Either no ComfyUI exists yet, or you want to build a clean venv under ~/ai/ComfyUI/.venv.
After: You should have a ComfyUI repo, a Python venv, PyTorch installed inside that venv, ComfyUI requirements installed, and a torch/CUDA verification printout.
./scripts/03_update_existing_comfyui.sh
Before: ~/ai/ComfyUI and ~/ai/ComfyUI/.venv already exist.
After: Your ComfyUI repo is pulled forward and Python requirements are refreshed in the correct environment.
This module uses SDXL-Turbo as the first model because it is a strong, fast first checkpoint for getting a local text-to-image path working.
./scripts/04_download_sdxl_turbo.sh
Before: ComfyUI must already exist and its venv must already be created.
After: The file sd_xl_turbo_1.0_fp16.safetensors should exist in ~/ai/ComfyUI/models/checkpoints.
If the download fails because of Hugging Face access or license acceptance, do that first and then run the same script again.
This uses the default text-to-image workflow path from ComfyUI, then the generated file is processed outside ComfyUI for SVG/HPGL export.
./scripts/05_run_comfyui.sh
Before: ComfyUI and the model must already be installed.
After: A ComfyUI server should be listening on port 8188.
black and white sacred geometry made of precise ink lines, radial symmetry, clean white background
This is the full post-process path: latest PNG/JPG from ComfyUI → thresholded bitmap → Potrace SVG → vpype HPGL with a custom 7470A-style config.
./scripts/06_install_vector_pipeline.sh
Before: Base Ubuntu packages should already be installed.
After: A separate vpype venv exists and a custom ~/.vpype_7470a.toml config is copied into place.
./scripts/07_export_latest_png_to_svg_hpgl.sh my_first_export
Before: There must already be at least one image in ~/ai/ComfyUI/output.
After: You should get:
~/ai/annplot_exports/my_first_export.svg~/ai/annplot_exports/my_first_export.hpgl00_preflight_checks.sh01_install_base_deps.sh02_install_comfyui_manual.sh03_update_existing_comfyui.sh04_download_sdxl_turbo.sh05_run_comfyui.sh06_install_vector_pipeline.sh07_export_latest_png_to_svg_hpgl.shhp7470a_custom.toml