Skip to main content

How to use dsh-imagegen

Add AI image generation sidebar to DSH Web GUI, with OpenAI-compatible API proxy, supporting text-to-image, image-to-image, and a history/prompt template library.

This article is auto-derived from indexed fields (wiki / faq / compatibility_json), not freshly AI-generated.

This article is derived from the plugin's already-indexed fields (wiki / faq / compatibility_json / readme), not freshly generated by AI. Source field is noted at the end of each section.

Quick start

dsh-imagegen

— source: plugin_wiki.wiki_content

Install & verify

dsh plugin --profile web add @dickpy/dsh-imagegen

Run the command above in your DSH Web Profile. Then enable the plugin in the plugin list.

— source: plugins.install

Key points

  • 文生图与图生图:输入提示词生成图片,或上传 PNG、JPG、WEBP 参考图进行编辑。
  • 可调生成参数:尺寸、清晰度、生成数量和细节等级均可在界面中选择;未指定的参数保持自动。
  • 结果操作:结果区固定为四分格:单图铺满,双图占上排,三图占三格,四图为 2×2;支持下载、全屏预览、可滚动缩放、前后切换、复制优化提示词,以及一键将当前图片添加到图生图。
  • 持久化历史:保存提示词、参数和图片;支持查看、恢复、单条删除和清空,最多保留 50 条。
  • 跨设备查看:历史保存在 DSH 宿主侧,连接同一 DSH 的浏览器或设备共享同一份记录。

— source: plugin_wiki.readme_en (fallback readme_raw)

FAQ

Where do I access the image generation feature after installation?

After restarting dsh web, an 'AI Image Generation' entry will appear in the sidebar; on first use, you need to fill in the API address and key in 'Settings → Plugins → Configurable'.

Must I use the official OpenAI API?

Not necessarily. The plugin connects to OpenAI-compatible /images/generations and /images/edits endpoints, so theoretically any service providing these two interfaces can be integrated.

Do image generation requests require uploading an image or just text?

Both are supported. Text-to-image only requires a prompt; image-to-image requires uploading a PNG/JPG/WEBP/GIF reference image, with a maximum of 10MB per image.

Where is the history stored?

Images and indexes are stored locally in the ~/.dsh/dsh-imagegen/ directory (images are saved separately, index.json stores metadata), with a maximum of 50 entries retained, and browsers/devices connected to the same DSH instance share them.

Does the prompt template library require internet?

The template example list is bundled with the plugin and ready to use; each example's showcase image is pulled on-demand from vibeui.top and cached locally to ~/.dsh/dsh-imagegen/template-images/, so subsequent views don't require an internet connection.

Will the plugin update automatically?

It will not update automatically. When the workspace starts, it checks GitHub Releases; if a new version is found, an update button will appear at the top of the panel. After clicking, the host will execute the installation, and you need to restart dsh web to load the new version.

Will history and cache be cleared together after uninstallation?

No. After uninstalling the plugin, historical images and template images will remain in the ~/.dsh/dsh-imagegen/ directory and need to be deleted manually.

— source: plugin_wiki.faq_json

Compatibility

  • DSH: 0.1.0-rc.7+
  • Node: >=20

— source: plugin_wiki.compatibility_json

Pitfalls

Review the upstream repo before installing. This guide is auto-derived from indexed fields and may lag the latest release. If anything contradicts the official docs, treat the upstream source as authoritative.

— source: general rule