Practical overview
When it fits
Use it when developing or studying a subject-specific image-swapping workflow and you can prepare the concept-learning model and checkpoint.
Who it is for
- Researchers exploring personalized subject swapping with diffusion models.
- Image-editing prototypers comparing subject-concept learning methods.
Documented uses
- Learn a subject as a token in a diffusion model.
- Use a trained diffusion-model checkpoint in an attention-based subject-swapping workflow.
- Explore concept-learning approaches such as Text Inversion, DreamBooth and Custom Diffusion.
Requirements & limits
The README directs users to contact the project for Photoswap checkpoints.
- The README recommends more source images for a better learned concept and swap result.
- DreamBooth encoder fine-tuning is described as potentially improving results, especially for human faces, with higher memory requirements.
- The README calls for installing the package requirements and placing the trained checkpoint in the checkpoints folder; the supplied instructions do not show the remaining execution steps.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Set up and run Photoswap subject swapping
Use a trained diffusion-model checkpoint with Photoswap’s attention-swap notebook to swap a subject in images.
Before you start
- A trained diffusion-model checkpoint; the README says to contact jgu110@ucsc.edu for Photoswap checkpoints.
- A single GPU with 16 GB of memory.
- The repository’s
requirements.txt.
Steps
Place the trained diffusion-model checkpoint in the
checkpointsfolder.Install the packages from
requirements.txtwith the command below. The README notes that the concept-learning environment is not suitable for attention swap.pip install -r requirements.txtRun
real-image-swap.ipynbfor subject swapping.Tune the swapping step and text prompt for the concept being used.
Expected outcome
The notebook performs subject swapping using the trained checkpoint; tuning the swap step and prompt can improve performance.
Guide limitations
- Different learned concepts may require different swap steps.
- A concept model with tuned weights may be less capable of general concept generation.
- The README specifies a single GPU with 16 GB of memory.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 18 October 2026
- Original website title
- GitHub - UCSB-AI/photoswap: Official implementation of the NeurIPS 2023 paper "Photoswap: Personalized Subject Swapping in Images" · GitHub · Official homepage title · retained in its source language

