@umituz/react-native-ai-generation-content 1.12.20 → 1.12.21
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
|
@@ -181,6 +181,11 @@ export {
|
|
|
181
181
|
getFutureYear,
|
|
182
182
|
} from './domain/entities/FuturePredictionConfig';
|
|
183
183
|
|
|
184
|
+
export {
|
|
185
|
+
IDENTITY_INSTRUCTION,
|
|
186
|
+
createScenarioPrompt,
|
|
187
|
+
} from './infrastructure/services/FuturePredictionService';
|
|
188
|
+
|
|
184
189
|
// =============================================================================
|
|
185
190
|
// DOMAIN LAYER - Repository Interfaces
|
|
186
191
|
// =============================================================================
|
|
@@ -12,6 +12,54 @@ import {
|
|
|
12
12
|
} from '../../domain/entities/FuturePredictionConfig';
|
|
13
13
|
import { PromptGenerationService } from './PromptGenerationService';
|
|
14
14
|
|
|
15
|
+
/**
|
|
16
|
+
* Core preservation instruction for photorealistic couple/family transformations
|
|
17
|
+
*/
|
|
18
|
+
export const IDENTITY_INSTRUCTION = `CRITICAL PRESERVATION LOCK:
|
|
19
|
+
{
|
|
20
|
+
"policy": "PRESERVE BOTH SUBJECTS' IDENTITIES & ENFORCE STRICT PHOTOREALISM",
|
|
21
|
+
"rule_1": "The output MUST depict the EXACT SAME TWO PEOPLE from the input photos.",
|
|
22
|
+
"rule_2": "STYLE: Always render as a HIGH-END PHOTOREALISTIC photograph. 8k resolution, cinematic lighting, ultra-detailed textures.",
|
|
23
|
+
"rule_3": "STRICTLY PROHIBITED: Anime, cartoons, illustrations, sketches, or 3D character renders. NO non-human stylization.",
|
|
24
|
+
"rule_4": "Preserve both persons' facial layouts, eye colors, skin tones, and unique features while placing them in the new scenario.",
|
|
25
|
+
"rule_5": "Both subjects must appear naturally together in the same frame with realistic proportions."
|
|
26
|
+
}`;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Creates a scenario transformation prompt with structured JSON-like format
|
|
30
|
+
*/
|
|
31
|
+
export const createScenarioPrompt = (
|
|
32
|
+
scenarioName: string,
|
|
33
|
+
subjectA: string,
|
|
34
|
+
subjectB: string,
|
|
35
|
+
costume: string,
|
|
36
|
+
environment: string,
|
|
37
|
+
additionalDetails?: string,
|
|
38
|
+
) => `
|
|
39
|
+
${IDENTITY_INSTRUCTION}
|
|
40
|
+
|
|
41
|
+
TRANSFORMATION_REQUEST:
|
|
42
|
+
{
|
|
43
|
+
"target_scenario": "${scenarioName}",
|
|
44
|
+
"subjects": {
|
|
45
|
+
"person_A": "${subjectA}",
|
|
46
|
+
"person_B": "${subjectB}"
|
|
47
|
+
},
|
|
48
|
+
"modifications": {
|
|
49
|
+
"appearance_update": "${costume.replace(/\n/g, " ").trim()}",
|
|
50
|
+
"environment_update": "${environment.replace(/\n/g, " ").trim()}"
|
|
51
|
+
${additionalDetails ? `,"additional_details": "${additionalDetails.replace(/\n/g, " ").trim()}"` : ""}
|
|
52
|
+
},
|
|
53
|
+
"visual_constraints": {
|
|
54
|
+
"style_matching": "Render as a premium DSLR photograph",
|
|
55
|
+
"face_preservation": "Maintain 100% identity of BOTH persons from input photos",
|
|
56
|
+
"lighting": "Realistic professional studio or outdoor cinematic lighting",
|
|
57
|
+
"composition": "Both subjects prominently visible, natural poses"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
FINAL COMMAND: Create a strictly photorealistic image of these two specific people in a ${scenarioName} scenario. No matter what the input style is, the result MUST be real-life looking people in a premium quality photograph.`;
|
|
62
|
+
|
|
15
63
|
const IMAGE_PROMPT_TEMPLATE = `
|
|
16
64
|
Generate a single high-quality, photorealistic image of {{subjectA}}{{#if subjectB}} and {{subjectB}}{{/if}}.
|
|
17
65
|
Role/Relationship: {{subjectRole}}
|