Repository navigation
PICTURES_HOST
Status: Partial
Last Updated: 2026-11-13
Audience: Developers and coding agents
Last verified: 2026-11-13 against 5f40af2d9 (port, role configuration, and model pins; API behavior, hardware results, and licenses not rechecked)
Code: workers/pictures/martlet_pictures/host.py, workers/pictures/martlet_pictures/pins.py, deploy/host/roles/pictures/role.conf
The pictures host role lets a paired Martlet desktop draw pictures on a Martlet host through the authenticated gateway. It runs ComfyUI in a container, bound only to 127.0.0.1:50086 inside the host/gateway network namespace. The gateway relay is a thin, validated pass-through to ComfyUI's own HTTP API; there is no custom image service.
The user-facing picture feature is described in Picture making.
Install it with the normal host flow:
martlet-host add picturesThe role requires Docker, NVIDIA Container Toolkit and an NVIDIA GPU with at least 8 GB of VRAM. The image is built locally from workers/pictures/host/Dockerfile, using:
- ComfyUI
v0.39.0, commitb0b743566f65daafc423b4fea8a2fbda94b3384a(GPL-3.0). - PyTorch
2.10.0/ torchvision0.25.0/ torchaudio2.10.0from the CUDA 12.8 PyTorch index. - Offline model loading (
HF_HUB_OFFLINE=1,TRANSFORMERS_OFFLINE=1).
martlet-host runs martlet-pictures provision after the container starts. Provisioning downloads model files into the martlet-pictures-models volume, verifies size and SHA-256, and is idempotent.
ComfyUI runs with --lowvram --listen 127.0.0.1 --port 50086 --disable-auto-launch, plus output and temp directories inside Martlet-owned volumes. Models stay loaded between pictures (so the next one doesn't reload 20 GB); a few minutes after the last picture, the desktop calls the relay's free operation so ComfyUI unloads models and frees GPU memory for voice and thinking roles.
Z-Image Turbo files come from https://huggingface.co/Comfy-Org/z_image_turbo, revision 6fc90a3b1b653e935a0d175e260736de25b84df5 (Apache-2.0):
| File | Bytes | SHA-256 |
|---|---|---|
split_files/diffusion_models/z_image_turbo_bf16.safetensors |
12,309,866,400 | 2407613050b809ffdff18a4ac99af83ea6b95443ecebdf80e064a79c825574a6 |
split_files/text_encoders/qwen_3_4b.safetensors |
8,044,982,048 | 6c671498573ac2f7a5501502ccce8d2b08ea6ca2f661c458e708f36b36edfc5a |
split_files/vae/ae.safetensors |
335,304,388 | afc8e28272cd15db3919bacdb6918ce9c1ed22e96cb12c4d5ed0fba823529e38 |
Total download size is 20,690,152,836 bytes (about 19.3 GiB).
- Route ID:
martlet.gateway.picture.v1 - Path:
/martlet/v1/inference/picture - Contract:
martlet.picture-relayversion1.0 - Role:
GatewayRole.Voice - Default model ID:
z-image-turbo
Each request carries exactly one operation and returns JSON text events (one JSON object per event):
-
status: returns readiness, ComfyUI version, provisioned model lists, device VRAM and queue counts:{"state":"ready"|"loading"|"not_provisioned","engine":"comfyui","comfyui_version":"...","models":{"diffusion_models":[...],"checkpoints":[...],"text_encoders":[...],"vae":[...],"loras":[...]},"devices":[{"name":"...","vram_total":...,"vram_free":...}],"queue_running":0,"queue_pending":0}. -
prompt: accepts a bounded ComfyUI API-format workflow JSON object and posts it to/promptwith a Martlet client ID. ComfyUI validation failures are returned as{"error":{"code":"prompt.invalid","summary":"..."},"node_errors":{...}}. -
history: acceptsprompt_idand returnsGET /history/<prompt_id>. -
queue: returnsGET /queue. -
view: acceptsfilename,subfolder,type(outputortemp),offsetandmaximum; it pagesGET /viewas base64 image chunks withmedia_type,total_bytes,offset,bytesanddata_base64. -
cancel: acceptsprompt_id, deletes it from ComfyUI's queue and interrupts the currently running prompt when it matches. -
free: posts{"unload_models":true,"free_memory":true}to ComfyUI/freeand returns{"state":"freed"}.
The relay never accepts paths or URLs from the client. Filenames and subfolders are simple names only: no path separators, .., control characters or leading dots. Images larger than 32 MiB are rejected, and one view page is bounded to 3 MiB before event chunking.
Using the role means accepting ComfyUI's GPL-3.0 license, PyTorch's license, and the Apache-2.0 license for Z-Image Turbo model files. Do not generate illegal or harmful content, do not depict real people without their consent, and disclose AI-generated images.
Martlet: download · repository · changelog · issues
These pages come from docs/wiki in the repository. To suggest a change, open an issue or a pull request there.
- Home
- Accounts and households
- Accounts and Household
- Android phones and tablets: what it takes, and the plan
- Martlet's API for other apps and scripts
- App Guides
- App Settings and Updates
- App guides: game and app knowledge from the web
- Architecture
- Bounded PCM playback
- Audio dependency inventory and notices
- Avatar guide: Live2D, VRM and speech animation
- V01a explicit microphone capture
- Chatterbox voice engines
- Cleaning up disk space
- One Martlet on all your computers
- Companion controls and behavior requirements
- Components, jobs and placement (design)
- Live conversation
- Creations
- Decision map: which file owns each decision
- Deep research: web search and long research jobs
- The desktop app: updates, notification area, exiting and appearance
- Linux and macOS desktop companion: research, decision and plan
- Developer Guide
- Dia voice engine
- Diagnostics
- Discord
- Architecture and provider contracts
- Discord
- Memory (P03a/P03b/P03c)
- Singing
- Desktop troubleshooting and local support
- Recognizing people by voice, and Parakeet
- Echo cancellation
- ElevenLabs voice: your cloned voice with tones
- F5 worker and reference-voice foundation
- FAQ
- First Steps
- Game state plan: implementation history
- Glossary: one name for each concept
- GPT-SoVITS voice
- Hosted Thinking: cloud models when Thinking can't run on this PC
- Installation and support
- Installing Martlet
- iOS and iPadOS: what it takes, and the plan
- Repository instructions for coding agents
- Repository knowledge base
- Knowledge base maintenance
- GitHub Wiki mirror
- Linux and Mac
- Listening and Voice ID
- Local model apps
- Lorebooks
- macOS: what it takes, and the plan
- Martlet MCP Server
- MCP in Martlet
- MCP: The app's window
- MCP: Apps, home and memory
- MCP: Characters
- MCP: Diagnostics and logs
- MCP: Computers, network and accounts
- MCP: Other
- MCP: Tool permissions
- MCP pages
- MCP: Server and protocol internals
- MCP: Settings
- MCP: Start here
- MCP: Thinking and models
- MCP: Voice and listening
- Memory
- Messaging apps
- Model catalog: sources, conflicts and design
- Motion host role
- Multiple Computers
- Your Martlet network
- OCR host role
- Share your language models: the OpenAI-compatible endpoint
- Packaging
- Perception worker contracts
- Personality and Characters
- Picture making
- Pictures and Creations
- Picture making host role
- Platforms: what each device can do
- Prerequisites: what Martlet bundles, installs for you, or needs from you
- Privacy and Safety
- Reading the text on your screen
- Wiki source
- Recommendation design: ask three questions, plan for three situations
- Recommended setups: one machine to unlimited budget
- Releasing
- Repository Layout
- Research and provenance ledger
- Resource footprints
- Roadmap
- Watch my screen: screen-aware commentary
- Search engine
- Image and audio models: who sees, who hears, who answers
- Setting Up a Host
- Setup, Windows credentials and local audio
- Sharing with Friends
- Singing
- Smart Home
- Smart home and cameras
- Source Projects
- Talking to Martlet
- Telegram and WhatsApp
- The Character
- Thinking
- Tools and MCP
- Troubleshooting
- Martlet desktop UI design
- User stories and target flows
- Voice activity detection
- Validating changes
- Validation and Testing
- Vision
- Voice latency: from you stopping talking to Martlet's voice
- Voice recognition host role
- Multi-engine voice setup and comparison
- Voices
- The welcome wizard
- XTTS-v2 voice engine