Skip to content

arthureberledev/lora-photo-generator

 
 

Repository files navigation

Ultimate LoRA Photo Generator

Create a high-consistency character dataset from a single reference image. This tool helps you generate a set of studio-style images across many angles/poses (portrait, upper body, full body) to support workflows like LoRA training, digital influencer packs, or character consistency studies.


What this tool does

  • Analyzes a reference image (optional) to produce a structured identity description (hair / face / body).
  • Generates a batch of pose/angle variations while attempting to preserve identity and facial structure.
  • Lets you lock hair and/or body to reduce drift across generations.
  • Allows controlled adjustments (eye color and body proportions) when body lock is off.
  • Collects results into a Production Bin and exports them as a ZIP of PNG files.

Requirements

  • Node.js installed on your computer
  • A Google Gemini API key (you will paste it into the app at runtime)

Setup & run

  1. Install dependencies
npm install
  1. Start the app
npm run dev
  1. Open the local URL shown in your terminal (typically http://localhost:3000).

How to use (end-to-end)

1) Enter your Gemini API key

On launch, you’ll see an authorization screen. Paste your Gemini API key and initialize the system.

2) Choose your profile mode

You can drive identity consistency in two ways:

  • Auto‑Analyze (recommended)
    • Upload a reference image and the tool will generate an identity profile describing hair / face / body.
  • Manual Profile
    • Write your own identity description (useful when auto analysis is inconsistent or you need very specific traits).

3) Upload a reference image

Drag and drop an image (or click to upload). For best results:

  • Use a clear, well-lit image
  • Ensure the face is visible
  • Prefer images that represent the baseline body shape you want to preserve

4) Configure identity locks and fine-tuning

  • Hair Lock: keeps hair style/length consistent across generations.
  • Body Lock: keeps body build/proportions consistent across generations.
    • When Body Lock is OFF, you can set:
      • Eye color
      • Body build
      • Chest size
      • Hip size

5) Select the dataset frames you want

Pick which frames to generate from grouped pose sets:

  • Portrait: face/angle coverage
  • Upper Body: mid shots with varied orientation
  • Full Body: full-body poses

You can select individual frames, select all, or clear your selection.

6) Generate a batch

Click Generate Batch to produce images one-by-one for your selected frames.

  • A progress panel shows how many frames have completed.
  • You can Stop a batch at any time.
  • If some frames fail, they’re recorded in a Failed Assets list while the batch continues.

7) Review and manage your Production Bin

Generated images are stored in the Production Bin:

  • Click an image to inspect it and view its generation prompt
  • Remove individual frames
  • Clear the entire bin (with confirmation)

8) Export as a ZIP

Use Export Bin to download a ZIP containing all generated PNG files.


Notes for LoRA training workflows

  • This tool exports PNG images only.
  • It does not export per-image .txt caption files alongside the images.

Privacy & data handling (important)

  • When you use Auto‑Analyze or generate images, your reference image and prompt text are sent to Google Gemini to produce results.
  • Your API key is provided by you at runtime and used only to authenticate requests to Gemini.

If you have strict data handling requirements, use non-sensitive reference images and review your organization’s policies for third‑party AI services.


Troubleshooting

API key issues / unauthorized / expired

If generation or analysis suddenly fails and you’re returned to the key screen:

  • Re-enter a valid Gemini API key
  • Confirm billing/access is enabled for your key

Output doesn’t match the intended angle (front-facing when it shouldn’t)

Try:

  • Enabling Hair Lock and/or Body Lock
  • Regenerating a smaller subset of frames first
  • Using a clearer, more front-facing reference photo (for identity) and letting poses control orientation

Disclaimer

This project uses third‑party AI services. Outputs may vary and can be affected by model updates, safety filters, and prompt interpretation. Always review generated content before using it in training or publishing workflows.

About

leverage nano banana pro to create a complete dataset of your character to which you can train a lora on

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 98.0%
  • HTML 2.0%