POST
javascript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 const axios = require('axios'); const fs = require('fs'); const path = require('path'); async function toB64(imgPath) { const data = fs.readFileSync(path.resolve(imgPath)); return Buffer.from(data).toString('base64'); } const api_key = "YOUR API-KEY"; const url = "https://api.segmind.com/v1/qwen-image-edit-plus-group-photo"; const data = { "prompt": "full body portrait of man and woman standing togather", "image_1": "toB64('https://segmind-resources.s3.amazonaws.com/input/3781650d-d860-4be1-977d-a101b7f47bc1-black-man-image.jpeg')", "image_2": "toB64('https://segmind-resources.s3.amazonaws.com/input/af3d50c1-62b0-4cc7-9d2d-f683c58000e9-image_87.png')", "image_3": "toB64('')", "lora": "group_photo", "aspect_ratio": "16:9", "seed": 87568756, "image_format": "webp", "quality": 95, "base64": false }; (async function() { try { const response = await axios.post(url, data, { headers: { 'x-api-key': api_key } }); console.log(response.data); } catch (error) { console.error('Error:', error.response.data); } })();
RESPONSE
image/jpeg
HTTP Response Codes
200 - OKImage Generated
401 - UnauthorizedUser authentication failed
404 - Not FoundThe requested URL does not exist
405 - Method Not AllowedThe requested HTTP method is not allowed
406 - Not AcceptableNot enough credits
500 - Server ErrorServer had some issue with processing

Attributes


promptstr *

Text prompt describing the desired image edit or generation


image_1image ( default: 1 )

Primary input image (URL or base64)


image_2image ( default: 1 )

Secondary input image (URL or base64)


image_3image ( default: 1 )

Tertiary input image (URL or base64)


loraenum:str ( default: group_photo )

Pre-configured LoRA model to apply

Allowed values:


lora_2_urlstr ( default: 1 )

Additional LoRA model URL. Public direct url or huggingface url pointing to the lora file


lora_3_urlstr ( default: 1 )

Additional LoRA model URL. Public direct url or huggingface url pointing to the lora file


aspect_ratioenum:str ( default: 16:9 )

Output image aspect ratio

Allowed values:


seedint ( default: 1 )

Random seed for reproducibility. Use -1 for random

min : -1,

max : 2147483647


image_formatenum:str ( default: webp )

Output image format

Allowed values:


qualityint ( default: 95 )

Output image quality (1-100)

min : 1,

max : 100


base64bool ( default: 1 )

Return image as base64 encoded string

To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.

Qwen-Image-Edit-2509-Photous: Multi-Portrait Group Photo Generator

Edited by Segmind Team on November 27, 2025.


What is Qwen-Image-Edit-2509-Photous?

Qwen-Image-Edit-2509-Photous is an advanced AI model that has been perfected using Qwen/Qwen-Image-Edit-2509. It is a major upgrade in the realm of image-to-image models as it addresses and solves the daunting task of producing cohesive and lifelike group photos from separate individual portraits. This variant ensures stable facial features and seamless scene integration, which was often lacking in the original Qwen model, which would produce visual results with inconsistent characters in multi-image compositions. Qwen-Image-Edit-2509-Photous is developed using diffusers and LoRA adapters, making it useful for creators and developers focused on building photo editing software, social media applications, and AI-driven platforms for visual storytelling. Additionally, it is capable of incorporating a subtle vintage touch through artistic grain and nostalgic tones while maintaining the clarity and structure of the original visuals.

Key Features of Qwen-Image-Edit-2509-Photous

  • Character Consistency: It effectively maintains accurate facial features and identity across multiple input portraits.
  • Multi-Image Compositing: It can effortlessly process up to 3 individual portrait inputs to generate a single cohesive group scene.
  • Vintage Photo Effects: It can automatically apply authentic film grain and nostalgic styling for a vintage touch.
  • LoRA Customization: It comes pre-configured with group_photo LoRA and supports additional custom LoRA URLs.
  • Flexible Aspect Ratios: It also supports 11 ratios including, "16:9 widescreen" and "match_input_image" preservation.
  • Reproducible Outputs: It performs seed-based generation for consistent results across API calls.
  • High-Quality Export: It is equipped with configurable quality (1-100) with JPEG, PNG, and WebP format support.

Best Use Cases

  • Social Media Apps: It is perfect to create AI-generated group photos from remote participants' individual selfies.
  • Photo Editing Platforms: It offers "add friends to your photo" features for content creators.
  • Marketing & Advertising: It can render composite product photos with multiple influencer portraits.
  • Event Documentation: It can generate commemorative group images from distributed photo collections.
  • Dating & Social Discovery: It can be utilized to build realistic group context photos for profile enhancement.
  • Gaming & Avatars: It can design in-game group portraits from character face inputs.

Prompt Tips and Output Quality

Effective Prompt Structure: The model responds best to natural language describing mood, setting, and composition; therefore, using descriptive scene-setting prompts like "Create a group photo with friends smiling under a sunset" renders precise and high-quality results instead of prompts that contain technical instructions.

Image Input Best Practices: The model accepts 1-3 images: use all three inputs for richer group compositions. Also, upload high-resolution, well-lit portraits with clear facial features while ensuring consistent lighting and orientation across input portraits for cohesive results across multiple iterations.

Parameter Optimization:

  • Aspect Ratio: Use match_input_image to preserve original dimensions or select 16:9 for cinematic group shots.
  • Seed Control: Set a specific seed (e.g., 87568756) for reproducible edits during testing; use -1 for creative variation.
  • Quality Settings: Default quality (95) balances file size and detail; maximize to 100 for print-ready outputs.
  • LoRA Layering: Start with the pre-configured group_photo LoRA, then experiment with custom LoRA URLs for style variations.

Camera Angles: Include "Rotate the camera for a dynamic angle" in prompts for portrait-style edits to add depth and professional framing.

FAQs

Is Qwen-Image-Edit-2509-Photous open-source?
The base Qwen/Qwen-Image-Edit-2509 model is open-source, but this fine-tuned variant (valiantcat/Qwen-Image-Edit-2509-photous) is hosted on Segmind's API platform; you can access it via API without local installation.

How does it differ from the original Qwen-Edit-2509?
Qwen-Edit-2509 struggles with character consistency in multi-image composites. On the other hand, Qwen-Image-Edit-2509-Photous is fine-tuned to address that limitation, adding specialized training for facial coherence and vintage photo effects optimized for group scenes.

What parameters should I tweak for the best results?
Focus on three essential parameters:

  • Prompt detail: Describe the mood and setting clearly
  • Seed: Lock it for A/B testing styles
  • Aspect Ratio: Match your platform's display requirements, e.g., 4:5 for Instagram or 16:9 for YouTube thumbnails, etc.

Can I use more than 3 input images?
At present, Qwen-Image-Edit-2509-Photous can only accept 3 simultaneous inputs (image_1, image_2, image_3). For larger groups, you can composite outputs iteratively or use batch processing with strategic input rotation.

What's the difference between JPEG, PNG, and WebP outputs?
JPEG offers the smallest file sizes for photographic content; PNG supports transparency (useful for overlays); WebP provides superior compression with high quality, making it ideal for web applications.

How do custom LoRA URLs work?
After selecting the base group_photo LoRA, add lora_2_url or lora_3_url parameters pointing to Hugging Face LoRA checkpoint URLs. These layers add additional stylistic effects like specific film stocks or artistic filters on top of the group photo optimization.