diff --git a/Makefile b/Makefile index 2a8b36f9..a7e88a4c 100644 --- a/Makefile +++ b/Makefile @@ -47,7 +47,7 @@ docker: .PHONY: docs docs: mkdocs build --clean - mkdocs serve --dev-addr=0.0.0.0:8000 + mkdocs serve deploy-docs: mkdocs gh-deploy diff --git a/docs/img/invokeai_metadata.png b/docs/img/invokeai_metadata.png new file mode 100644 index 00000000..bf15971e Binary files /dev/null and b/docs/img/invokeai_metadata.png differ diff --git a/docs/img/invokeai_metadata_full.png b/docs/img/invokeai_metadata_full.png new file mode 100644 index 00000000..2747fd84 Binary files /dev/null and b/docs/img/invokeai_metadata_full.png differ diff --git a/docs/img/invokeai_photomap_settings.png b/docs/img/invokeai_photomap_settings.png new file mode 100644 index 00000000..745f6a29 Binary files /dev/null and b/docs/img/invokeai_photomap_settings.png differ diff --git a/docs/img/photomap_invokeai_overview.png b/docs/img/photomap_invokeai_overview.png new file mode 100644 index 00000000..2d981ea2 Binary files /dev/null and b/docs/img/photomap_invokeai_overview.png differ diff --git a/docs/img/photomap_invokeai_use_ref_only.png b/docs/img/photomap_invokeai_use_ref_only.png new file mode 100644 index 00000000..61bb23f0 Binary files /dev/null and b/docs/img/photomap_invokeai_use_ref_only.png differ diff --git a/docs/index.md b/docs/index.md index 95fbd873..e1eecac8 100644 --- a/docs/index.md +++ b/docs/index.md @@ -2,7 +2,15 @@ Rediscover your photo collection! -PhotoMapAI is a fast, modern image browser and search tool for large photo collections. It uses the CLIP computer vision model to enable text and image-based search, image clustering, and interactive slideshows with a responsive web interface. Its unique feature is a "semantic map" that clusters and visualizes your images by their content. Browse the semantic map to find and explore thematically-related groups of photos, or use text and/or image similarity search to find specific people, places, events, styles and themes. +PhotoMapAI is a fast, modern image browser and search tool for large +photo collections. It uses the CLIP computer vision model to enable +text and image-based search, image clustering, and interactive +slideshows with a responsive web interface. Its unique feature is a +"semantic map" that clusters and visualizes your images by their +content. Browse the semantic map to find and explore +thematically-related groups of photos, or use text and/or image +similarity search to find specific people, places, events, styles and +themes.
+
+## Creating an InvokeAI Album
+
+You can point PhotoMapAI directly at InvokeAI's internal image storage
+to create a comprehensive album of the contents of all InvokeAI's
+image boards, or you can selectively download images from InvokeAI and
+store them in an external directory for a curated experience.
+
+### Creating a Comprehensive Album
+
+InvokeAI stores every finished image under its **InvokeAI root**, in a
+folder named `outputs/images/`. The location of the root depends on
+how you installed InvokeAI:
+
+- **Launcher / community edition (default)** — the launcher prompts
+ you for the root directory the first time it runs and remembers your
+ choice. On Windows it is typically `C:\Users\
+
+
+---
+
+## Enabling Remix and Reference Images
+
+For fuller integration, you may configure PhotoMapAI so that it can
+send images and generation parameters to a running InvokeAI backend.
+This allows you to regenerate and remix previously-generated images,
+as well as to send completely new images to InvokeAI for editing.
+
+The configuration is as follows:
+
+1. Make sure InvokeAI is running and note the URL it reports on startup (by default `http://localhost:9090`).
+2. In PhotoMapAI, open **Settings** and scroll to the **InvokeAI Backend URL** field.
+3. Enter the full URL — including the `http://` or `https://` prefix and the port.
+
+PhotoMapAI saves the value as you type and immediately probes the
+backend. If the URL is reachable and looks like InvokeAI, the
+**InvokeAI Username**, **InvokeAI Password**, and **Upload to Image
+Board** rows appear underneath. If the field underneath the URL turns
+red with a warning icon, see [Troubleshooting](#troubleshooting) for
+what each message means.
+
+If your InvokeAI server is running in **multi-user mode**, fill in the
+**InvokeAI Username** and **InvokeAI Password** fields with the
+credentials you use to log in to InvokeAI itself. The password is
+stored in PhotoMapAI's user-config directory and is never echoed back
+to the browser. For single-user installs (the default) leave both
+fields blank.
+
+Once a valid InvokeAI URL is entered, the **Upload to Image Board**
+dropdown menu will appear. This lists the InvokeAI boards you have
+access to. Choose the board you wish to upload new image assets into.
+
+
+
+---
+
+## Recall, Remix and Reference Image
+
+Three actions appear in the metadata drawer when an InvokeAI backend
+is configure. Which ones are available depends on the image that is
+currently selected.
+
+### Use as Ref Image
+
+Any image — generated by InvokeAI or not — can be sent to InvokeAI as
+a **reference image**. PhotoMapAI uploads the image bytes to your
+InvokeAI gallery (in the board you selected above) so you can
+immediately drop it into a Reference Image / IP-Adapter / ControlNet
+layer. This is the only button that appears for non-InvokeAI images,
+since there is no generation metadata to recall.
+
+
+
+
+### Remix
+
+For images that contain InvokeAI generation metadata, **Remix** sends
+every parameter — the prompt, model, LoRAs, scheduler, dimensions,
+reference layers, and so on — back to InvokeAI, but **omits the
+seed**. Pressing *Invoke* in InvokeAI then produces a new image that
+is stylistically similar to the original but unique. Use this when you
+want a variation rather than a re-creation.
+
+### Recall
+
+**Recall** is identical to Remix except that the **seed is
+preserved**. With the same model, LoRAs, prompts, and seed, InvokeAI
+will reproduce the original image bit-for-bit (assuming the underlying
+model files have not changed). This is useful when you want to start
+from a known image and edit one parameter at a time.
+
+See [Viewing InvokeAI Metadata](#viewing-invokeai-metadata) for screenshots.
+
+## Troubleshooting
+
+If something goes wrong while saving the InvokeAI URL or probing the backend, the hint underneath the URL field turns red and shows one of the following messages:
+
+- **InvokeAI URL must use http:// or https://** — the URL you typed uses an unsupported scheme. PhotoMapAI rejects anything other than `http` and `https` (for example, `file://` is not allowed).
+- **InvokeAI URL must include a host** — the URL is syntactically valid but has no host portion. Add a host name or IP address (for example `http://localhost:9090`).
+- **Could not reach backend** — the URL is well-formed but PhotoMapAI could not connect to the server. Check that InvokeAI is running, that the port matches, and (for remote servers) that no firewall is blocking the connection.
+- **Server is reachable but doesn't appear to be an InvokeAI backend** — PhotoMapAI got an HTTP response but it was not what InvokeAI's `/api/v1/app/version` endpoint returns. Double-check the URL and port; you may have pointed PhotoMapAI at a different service running on the same machine.
+
+A few situations are not surfaced inline and are worth knowing about:
+
+- **Boards dropdown is empty or stuck on *Uncategorized*** — usually means authentication failed silently. If your InvokeAI is in multi-user mode, fill in the username and password and re-enter the URL to retrigger the probe.
+- **Recall / Remix succeeds but no image queues in InvokeAI** — switch to InvokeAI's browser tab. The recalled parameters land in the canvas/generation panel; you still have to press *Invoke* to start the queue.
+- **Buttons stay greyed out for an InvokeAI-generated image** — the image was probably produced by an InvokeAI version PhotoMapAI does not yet recognise. Check the *Show full metadata* link at the bottom of the drawer to confirm the metadata is present, and please [open an issue](https://github.com/lstein/PhotoMapAI/issues) so we can add support for the new schema.
+
+### PhotoMapAI and InvokeAI on different machines
+
+The integration is designed for a single workstation but works across machines too. The important thing to remember is that **only the PhotoMapAI *server* talks to InvokeAI** — your browser does not need to be able to reach the InvokeAI port. Concretely:
+
+1. Start InvokeAI with a non-loopback bind address (for example `--host 0.0.0.0`) so the PhotoMapAI machine can reach it.
+2. In PhotoMapAI's **InvokeAI Backend URL** field, use the LAN address or hostname of the InvokeAI machine, not `localhost` (for example `http://10.0.0.42:9090`).
+3. The album path you configured in *Creating an InvokeAI Album* must be readable by the PhotoMapAI server. If InvokeAI's `outputs/images/` lives on the InvokeAI machine, mount it on the PhotoMapAI machine over SMB / NFS / SSHFS and point the album at the mount point.
+
+The **Use as Ref Image** action uploads the image bytes over the wire and works regardless of where the file lives. **Recall** and **Remix** only send metadata, so they also work cross-machine — but the receiving InvokeAI server must have the same models, LoRAs, and embeddings installed for the recalled parameters to produce the expected result.
diff --git a/mkdocs.yml b/mkdocs.yml
index ce2fdf32..2b4ac3b3 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -15,6 +15,7 @@ nav:
- Configuration: user-guide/configuration.md
- Semantic Map: user-guide/semantic-map.md
- Image Dataset Curation: user-guide/curator-mode.md
+ - InvokeAI Integration: user-guide/invokeai-integration.md
- Updating PhotoMapAI: user-guide/upgrading.md
- Keyboard Shortcuts: user-guide/keyboard-shortcuts.md
- Running from Docker: docker.md
@@ -31,6 +32,11 @@ theme:
features:
-content.code.copy
+markdown_extensions:
+ - admonition
+ - pymdownx.details # Optional: allows for collapsible note boxes
+ - pymdownx.superfences # Recommended: allows nesting and complex content
+
extra_css:
- stylesheets/extra.css
diff --git a/pyproject.toml b/pyproject.toml
index 517d07ed..c3e42499 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -63,9 +63,10 @@ testing = [
]
development = [
"build",
+ "mkdocs<1.6",
"mkdocs-material",
- "twine",
"pymdown-extensions",
+ "twine",
"pyinstaller",
"ruff",
]