API
If you're looking for an API, you can choose from your desired programming language.
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
35
36
37
38
import requests
api_key = "YOUR_API_KEY"
url = "https://api.segmind.com/v1/infinite-you"
# Prepare data and files
data = {}
files = {}
data['seed'] = 6255
data['width'] = 864
data['height'] = 1152
data['prompt'] = "A sophisticated gentleman exuding confidence. He is dressed in a 1990s brown plaid jacket with a high collar, paired with a dark grey turtleneck. His trousers are tailored and charcoal in color, complemented by a sleek leather belt. The background showcases an elegant library with bookshelves, a marble fireplace, and warm lighting, creating a refined and cozy atmosphere. His relaxed posture and casual hand-in-pocket stance add to his composed and stylish demeanor"
# For parameter "id_image", you can send a raw file or a URI:
# files['id_image'] = open('IMAGE_PATH', 'rb') # To send a file
data['id_image'] = 'https://segmind-resources.s3.amazonaws.com/output/e533504e-4e22-4219-88a1-152e002e1a99-man2.png' # To send a URI
data['num_steps'] = 30
# For parameter "control_image", you can send a raw file or a URI:
# files['control_image'] = open('IMAGE_PATH', 'rb') # To send a file
data['control_image'] = 'null' # To send a URI
data['model_version'] = "aes_stage2"
data['output_format'] = "webp"
data['enable_realism'] = True
data['guidance_scale'] = 3.5
data['output_quality'] = 80
data['enable_anti_blur'] = False
data['infusenet_guidance_end'] = 1
data['infusenet_guidance_start'] = 0
data['infusenet_conditioning_scale'] = 1
headers = {'x-api-key': api_key}
# If no files, send as JSON
if files:
response = requests.post(url, data=data, files=files, headers=headers)
else:
response = requests.post(url, json=data, headers=headers)
print(response.content) # The response is the generated image
Attributes
Sets the random seed for reproducibility. Use a specific number for repeatability or null for randomness.
Output image width in pixels. Choose 768 for portrait or 960 for landscape.
min : 256,
max : 1280
Output image height in pixels. Use 960 for standard or 1280 for a more detailed view.
min : 256,
max : 1280
Input your vision for the image. Example: 'Vibrant sunset over mountains, surreal, dream-like'.
Upload a portrait image for processing. Ensure it contains a clear human face.
Controls image refinement steps. Use 30 for good quality, 50 for best details.
min : 1,
max : 100
Optional: Use a secondary image for compositional control. Ideal for consistent layout.
Selects model type. 'aes_stage2' for enhanced aesthetics or 'sim_stage1' for simplicity.
Allowed values:
Choose the image format. 'webp' for compressibility, 'png' for quality.
Allowed values:
Toggle realism enhancement feature. Enable for lifelike representation.
Adjustment on prompt adherence. Set higher for precise, lower for creative outputs.
min : 0,
max : 10
Defines the output quality. 80 for general use, 100 for optimal.
min : 1,
max : 100
Activate to reduce blur. Ideal for sharp, defined structures.
Defines when identity guidance stops. Generally kept at 1.0 for full application.
min : 0,
max : 1
Defines when to apply identity guidance. Typical range is 0.0-0.1.
min : 0,
max : 1
Controls identity influence. Lower for more creative deviation.
min : 0,
max : 1
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.
InfiniteYou â Identity-Preserving Text-to-Image Model
What is InfiniteYou?
InfiniteYou is an advanced generative AI model built on Diffusion Transformers (DiTs), optimized for high-fidelity portrait generation that faithfully preserves a subjectâs identity. By integrating InfuseNetâan identity-conditioning networkâdirectly into the diffusion process, InfiniteYou combines robust face similarity with strong text-to-image alignment. Its multi-stage training pipeline, which leverages both real and synthetic data, addresses common artifacts like face copy-pasting and improves overall image aesthetics. The plug-and-play architecture makes InfiniteYou compatible with popular AI frameworks, enabling seamless integration into existing workflows.
Key Features
⢠Identity Preservation: InfuseNet conditioning ensures the generated image maintains core facial features and unique identity details.
⢠Text-to-Image Alignment: High guidance scale support (0â10) guarantees accurate interpretation of prompts, from âVibrant sunset portraitâ to âCinematic close-up.â
⢠Custom Resolution: Adjustable width (256â1280 px) and height (256â1280 px) let you target 768Ă960 for portraits or 960Ă1280 for detailed landscape compositions.
⢠Multi-Stage Model Versions:
â sim_stage1 for streamlined, fast outputs
â aes_stage2 for enhanced aesthetics and realism
⢠Realism & Sharpness Toggles: Boolean flags enable_realism and enable_anti_blur to control lifelike rendering and reduce blur.
⢠Output Quality Controls: Set output_quality (1â100) and choose output_format (png, jpg, webp) to balance file size and visual fidelity.
⢠Reproducibility: Use the optional seed parameter for deterministic results.
Best Use Cases
⢠Personalized Avatars & Profile Images: Generate consistent, brand-aligned headshots.
⢠Character Design & Concept Art: Preserve identity while exploring stylized or thematic variations.
⢠E-commerce & Marketing Creatives: Create product models with lifelike renders for catalogs or ads.
⢠Entertainment & Social Media Content: Quickly produce shareable portraits without manual retouching.
Prompt Tips and Output Quality
- Craft a clear prompt: e.g., âStudio portrait, soft lighting, warm tone, cinematic mood.â
- Adjust num_steps (30â50) for qualityâmore steps yield finer details.
- Control identity strength via infusenet_conditioning_scale (0.0â1.0): lower for creative freedom, higher for strict likeness.
- Fine-tune guidance_scale (2â6) for prompt adherence vs. artistic variation.
- For sharper edges, enable_anti_blur=true; for richer textures, set enable_realism=true.
- Preview with a control_image URL to maintain consistent framing across batches.
FAQs
Q: How do I ensure the subjectâs identity is preserved?
Use InfuseNet parametersâinfusenet_conditioning_scale close to 1.0 and infusenet_guidance_start/end at 0.0 and 1.0âto maximize identity conditioning throughout diffusion.
Q: What resolution should I choose?
Set width and height between 768Ă960 for portraits or up to 960Ă1280 for higher detail. The model scales smoothly across the 256â1280 px range.
Q: Which model_version is best?
Choose sim_stage1 for quick prototyping. Switch to aes_stage2 for advanced aesthetics and more nuanced lighting.
Q: How can I balance prompt fidelity vs. creativity?
Modify guidance_scale: values above 5.0 favor strict prompt follow-through, whereas lower values introduce interpretive creativity.
Q: Can I reproduce exact results?
Yesâprovide a fixed seed integer. Omitting seed yields random variants.
Other Popular Models
sdxl-img2img
SDXL Img2Img is used for text-guided image-to-image translation. This model uses the weights from Stable Diffusion to generate new images from an input image using StableDiffusionImg2ImgPipeline from diffusers

sdxl-controlnet
SDXL ControlNet gives unprecedented control over text-to-image generation. SDXL ControlNet models Introduces the concept of conditioning inputs, which provide additional information to guide the image generation process

fooocus
Fooocus enables high-quality image generation effortlessly, combining the best of Stable Diffusion and Midjourney.

sdxl1.0-txt2img
The SDXL model is the official upgrade to the v1.5 model. The model is released as open-source software
