@umituz/react-native-ai-generation-content 1.17.172 → 1.17.174

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@umituz/react-native-ai-generation-content",
3
- "version": "1.17.172",
3
+ "version": "1.17.174",
4
4
  "description": "Provider-agnostic AI generation orchestration for React Native",
5
5
  "main": "src/index.ts",
6
6
  "types": "src/index.ts",
@@ -4,15 +4,27 @@
4
4
 
5
5
  export const IDENTITY_SEGMENTS = {
6
6
  samePerson: "same person",
7
- preserveGender: "preserve original gender",
7
+ preserveIdentity: "preserve identity",
8
+ preserveGender: "STRICTLY preserve original gender",
9
+ keepGender: "keep exact same gender as input",
10
+ maintainGender: "maintain original sex",
8
11
  sameFeatures: "same facial features",
12
+ preserveFace: "preserve original face structure",
13
+ sameHairColor: "same hair color as original",
14
+ sameEyeColor: "same eye color as original",
9
15
  } as const;
10
16
 
11
17
  export const IDENTITY_NEGATIVE_SEGMENTS = {
12
18
  genderSwap: "gender swap",
19
+ genderChange: "gender change",
20
+ sexChange: "sex change",
21
+ maleToFemale: "male to female",
22
+ femaleToMale: "female to male",
13
23
  differentPerson: "different person",
14
24
  wrongGender: "wrong gender",
15
25
  changedIdentity: "changed identity",
26
+ differentFace: "different face",
27
+ changedGender: "changed gender",
16
28
  } as const;
17
29
 
18
30
  export const ANIME_STYLE_SEGMENTS = {
@@ -17,10 +17,9 @@ export interface ImagePromptResult {
17
17
  negativePrompt: string;
18
18
  }
19
19
 
20
- export interface AnimeSelfiePromptResult extends ImagePromptResult {
21
- strength: number;
20
+ export interface AnimeSelfiePromptResult {
21
+ prompt: string;
22
22
  guidance_scale: number;
23
- num_inference_steps: number;
24
23
  }
25
24
 
26
25
  export interface ImagePromptBuilderOptions {
@@ -166,27 +165,24 @@ export class ImagePromptBuilder {
166
165
  }
167
166
 
168
167
  /**
169
- * Create anime selfie prompt with recommended parameters
170
- * IMPORTANT: Anime style FIRST (highest priority), identity preservation secondary
168
+ * Create anime selfie prompt for Kontext model
169
+ * Kontext uses instruction-based editing that preserves character identity automatically
171
170
  */
172
171
  export function createAnimeSelfiePrompt(customStyle?: string): AnimeSelfiePromptResult {
173
- const builder = ImagePromptBuilder.create()
174
- .withAnimeStyle() // Anime style FIRST - highest priority
175
- .withIdentityPreservation() // Identity preservation secondary
176
- .withAnatomySafety();
177
-
178
- if (customStyle) {
179
- builder.prependSegments([`${customStyle} style`]);
180
- }
172
+ const stylePrefix = customStyle ? `${customStyle} anime style` : "anime style";
181
173
 
182
- const { prompt, negativePrompt } = builder.build();
174
+ const prompt = [
175
+ `Transform this person into a ${stylePrefix} illustration.`,
176
+ "IMPORTANT: Preserve the exact same gender - if male keep male, if female keep female.",
177
+ "Keep the same face structure, hair color, eye color, skin tone, and facial expression.",
178
+ "Make it look like a high-quality Japanese anime character portrait.",
179
+ "Use vibrant anime colors, clean lineart, and cel-shaded rendering.",
180
+ "Large expressive anime eyes with detailed iris, smooth anime skin with subtle blush.",
181
+ ].join(" ");
183
182
 
184
183
  return {
185
184
  prompt,
186
- negativePrompt,
187
- strength: 0.92, // High strength for style transformation
188
- guidance_scale: 8.5, // Strong guidance for anime style
189
- num_inference_steps: 50, // More steps for quality
185
+ guidance_scale: 4.0,
190
186
  };
191
187
  }
192
188
 
@@ -93,10 +93,7 @@ export function useAnimeSelfieFeature(
93
93
  imageBase64,
94
94
  prompt: promptConfig.prompt,
95
95
  options: {
96
- negativePrompt: promptConfig.negativePrompt,
97
- strength: promptConfig.strength,
98
96
  guidance_scale: promptConfig.guidance_scale,
99
- num_inference_steps: promptConfig.num_inference_steps,
100
97
  },
101
98
  },
102
99
  { extractResult: config.extractResult, onProgress: handleProgress },