Foreword¶
DeepSeek Harness (DSH) 0.2 introduces a new bundle patch mechanism. Presets are no longer loaded from directories; they are mounted by plugin declarations. dsh-comfyui-control is a plugin adapted for DSH 0.2. It integrates local ComfyUI into an Agent preset named Drawing Mode. The plugin replicates the capabilities of upstream good-comfyui-mcp, supplements control-plane and reproduction self-check functionality, and provides a total of 19 comfyui_* tools.
Core Features¶
The plugin provides the following 19 tools, covering status checks, model management, image generation, reproduction self-checks, and LoRA search/download.
- Status and Basic Control:
comfyui_status(dependency self-check and check of the 8899 comparison-page service),comfyui_setup_guide(initialization checklist),comfyui_run_workflow(submit any workflow JSON),comfyui_history(query history records),comfyui_queue(view and interrupt queues). - Models and Pipeline:
comfyui_list_models(list model directories),comfyui_get_model_guide(official Anima usage guide),comfyui_generate(generate images with the Anima/Krea2 engine; supports overriding steps/cfg/sampler/size/seed, and reference images automatically generate a comparison page). - Reproduction Self-Check:
comfyui_repro_check(generate images exactly according to upstream sample metadata and create a comparison page for visual judgment). - Image Information Parsing:
comfyui_extract_image_info(parse PNG metadata),comfyui_describe_image(image recognition; disabled by default and requires explicitenable_vision=true),comfyui_deconfuse_image(restore ‘little tomato’ obfuscated images). - Character and LoRA Management:
comfyui_lookup_character_tags(Danbooru character tags),comfyui_lookup_character_appearance(character appearance tag statistics),comfyui_list_cached_characters(cached character list),comfyui_search_lora(exact Civitai search),comfyui_download_lora(download and validate LoRA),comfyui_lookup_lora_hash(reverse-lookup source from file SHA256).
Installation and Activation¶
The plugin is published to npm and must be installed into a specified profile using the dsh plugin add command.
1. Install the Plugin¶
Run the following command to install the plugin into the target profile:
dsh plugin add --profile <你的 profile> dsh-comfyui-control
The installation process automatically handles dependency writes and bundle registration.
2. Select the Preset¶
The plugin is active only in the Drawing Mode preset.
After installation, select Drawing Mode (id drawing) in the Agent preset selector, or verify that preset-drawing is mounted in plugin_manager.
Note: Presets only take effect for new sessions. Already running sessions retain the plugin version from startup.
Environment Dependencies¶
Local ComfyUI and related services must be ready; otherwise, comfyui_status will return missing[].
- ComfyUI: runs by default at
http://127.0.0.1:8188. - Anima Pipeline Models:
anima-base-v1.0.safetensors(diffusion_models)qwen_3_06b_base.safetensors(text_encoders)qwen_image_vae.safetensors(vae)RealESRGAN_x2plus.pth(upscale_models)
- Default 5-Piece LoRA Set: The plugin does not include model files; they must be manually downloaded to
<COMFYUI_ROOT>/models/loras/, and none can be missing:ushikani_kassen_lora-000013.safetensors(0.3)anima-darklight-style-v1-000194.safetensors(0.3)anima-base-1-photo-background-v4.safetensors(0.6)RealSkin SliderV2.safetensors(0.8)surtr945_v1.safetensors(0.8)
- 8899 Comparison-Page Service: The
view_urlreturned by image generation points to this service. It must be started by runningnpm run serve-compare. - Optional Components:
camofox-browser(character tags),CIVITAI_TOKEN(LoRA downloads), vision service (comfyui_describe_imageis disabled by default and requiresenable_vision=true).
Typical Usage¶
1. Check Environment Status¶
For first use or after environment changes, call the status check first:
comfyui_status
It returns a missing[] list, indicating what is missing (such as models, LoRAs, or the 8899 service).
2. Reproduction Self-Check¶
Verify whether the local environment is consistent with the upstream reference:
comfyui_repro_check
comfyui_repro_check(allow_download=true)
comfyui_repro_check(sample='repro_sofa_rose')
3. Generate Images¶
When calling comfyui_generate, you can override default parameters:
comfyui_generate
comfyui_generate(steps=50, cfg=7.0, width=1024, height=1024, seed=12345)
Notes¶
- Runtime Dependencies: The plugin has zero runtime dependencies. It uses only Node built-in modules and global
fetch; pip or a resident Python process is not required. - Vision Service:
comfyui_describe_imageis disabled by default. To use it, explicitly passenable_vision=true. By default, it uses the host vision modeldeepseek-v4.1-flash. - File Ownership: The plugin does not include any model files. All model files must be prepared manually or downloaded through the Agent.
Summary¶
dsh-comfyui-control is a bridge connecting the DSH Agent with local ComfyUI. Through 19 tools, it enables end-to-end automation from environment checks to image generation. It requires a local environment with the complete Anima pipeline models and the 5-piece LoRA set, and the 8899 comparison-page service must be running. After installation, select the Drawing Mode preset to use it.