openfree commited on
Commit
694e0a8
Β·
verified Β·
1 Parent(s): 5a3d4bf

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +82 -0
README.md CHANGED
@@ -10,4 +10,86 @@ pinned: false
10
  license: mit
11
  short_description: Source-code Include
12
  ---
 
13
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  license: mit
11
  short_description: Source-code Include
12
  ---
13
+ Looking at this code, it's a Gradio-based web application called "MagicFace V3" that uses IP-Adapter technology to transform user faces into various character styles. Here's a detailed explanation:
14
 
15
+ ## English Explanation
16
+
17
+ ### Overview
18
+ MagicFace V3 is an AI-powered face transformation application that uses Stable Diffusion with IP-Adapter FaceID technology. It allows users to upload their photos and transform them into various artistic styles or fictional characters while preserving their facial identity.
19
+
20
+ ### Key Features
21
+ 1. **Face Identity Preservation**: Uses InsightFace for face detection and embedding extraction, ensuring the generated images maintain the user's facial features
22
+ 2. **Multiple Image Support**: Can process multiple photos of the same person to create a better average representation
23
+ 3. **Preset Styles**: Offers 10 pre-configured transformation styles including:
24
+ - Classic art styles (Mona Lisa, Van Gogh)
25
+ - Fictional characters (Iron Hero, Star Wars Jedi, Matrix Hero)
26
+ - Historical figures (Egyptian Pharaoh, Greek God, Medieval Knight)
27
+ - Adventure themes (Pirate Captain, Sherlock Holmes)
28
+ 4. **Custom Prompts**: Users can write their own transformation descriptions
29
+ 5. **Gender Selection**: Optimizes generation based on selected gender
30
+
31
+ ### Technical Components
32
+ - **Base Model**: Realistic_Vision_V4.0_noVAE
33
+ - **IP-Adapter**: FaceID and FaceID Plus models for facial feature preservation
34
+ - **Face Analysis**: Buffalo_l model from InsightFace
35
+ - **Generation Parameters**:
36
+ - 512x768 resolution
37
+ - 100 inference steps
38
+ - Face strength: 2.1
39
+ - Likeness strength: 0.7
40
+
41
+ ### How It Works
42
+ 1. User uploads one or more face photos
43
+ 2. The system extracts facial embeddings using InsightFace
44
+ 3. If multiple photos are provided, it averages the embeddings
45
+ 4. The face is aligned and cropped for better results
46
+ 5. IP-Adapter integrates the facial features into the Stable Diffusion generation process
47
+ 6. The system generates a single portrait with the specified style while maintaining facial identity
48
+
49
+ ### Safety Features
50
+ - Includes negative prompts to prevent multiple people in generated images
51
+ - Ensures single person portraits only
52
+ - GPU acceleration via Spaces for faster processing
53
+
54
+ ---
55
+
56
+ ## ν•œκΈ€ μ„€λͺ…
57
+
58
+ ### κ°œμš”
59
+ MagicFace V3λŠ” IP-Adapter FaceID 기술과 Stable Diffusion을 ν™œμš©ν•œ AI 기반 μ–Όκ΅΄ λ³€ν™˜ μ• ν”Œλ¦¬μΌ€μ΄μ…˜μž…λ‹ˆλ‹€. μ‚¬μš©μžκ°€ μ—…λ‘œλ“œν•œ 사진을 λ‹€μ–‘ν•œ 예술적 μŠ€νƒ€μΌμ΄λ‚˜ κ°€μƒμ˜ μΊλ¦­ν„°λ‘œ λ³€ν™˜ν•˜λ©΄μ„œλ„ μ–Όκ΅΄μ˜ 정체성을 μœ μ§€ν•©λ‹ˆλ‹€.
60
+
61
+ ### μ£Όμš” κΈ°λŠ₯
62
+ 1. **μ–Όκ΅΄ 정체성 보쑴**: InsightFaceλ₯Ό μ‚¬μš©ν•˜μ—¬ 얼꡴을 κ°μ§€ν•˜κ³  μž„λ² λ”©μ„ μΆ”μΆœν•˜μ—¬ μƒμ„±λœ 이미지가 μ‚¬μš©μžμ˜ μ–Όκ΅΄ νŠΉμ§•μ„ μœ μ§€ν•˜λ„λ‘ ν•©λ‹ˆλ‹€
63
+ 2. **닀쀑 이미지 지원**: λ™μΌμΈμ˜ μ—¬λŸ¬ 사진을 μ²˜λ¦¬ν•˜μ—¬ 더 λ‚˜μ€ 평균 ν‘œν˜„μ„ 생성할 수 μžˆμŠ΅λ‹ˆλ‹€
64
+ 3. **사전 μ„€μ • μŠ€νƒ€μΌ**: 10κ°€μ§€ 사전 κ΅¬μ„±λœ λ³€ν™˜ μŠ€νƒ€μΌ 제곡:
65
+ - ν΄λž˜μ‹ μ•„νŠΈ μŠ€νƒ€μΌ (λͺ¨λ‚˜λ¦¬μž, 반 고흐)
66
+ - 가상 캐릭터 (아이언 νžˆμ–΄λ‘œ, μŠ€νƒ€μ›Œμ¦ˆ μ œλ‹€μ΄, 맀트릭슀 νžˆμ–΄λ‘œ)
67
+ - 역사적 인물 (μ΄μ§‘νŠΈ 파라였, 그리슀 μ‹ , 쀑세 기사)
68
+ - λͺ¨ν—˜ ν…Œλ§ˆ (해적 μ„ μž₯, μ…œλ‘ ν™ˆμ¦ˆ)
69
+ 4. **μ‚¬μš©μž μ •μ˜ ν”„λ‘¬ν”„νŠΈ**: μ‚¬μš©μžκ°€ μ›ν•˜λŠ” λ³€ν™˜ μ„€λͺ…을 직접 μž‘μ„± κ°€λŠ₯
70
+ 5. **성별 선택**: μ„ νƒλœ 성별에 따라 생성 μ΅œμ ν™”
71
+
72
+ ### 기술적 κ΅¬μ„±μš”μ†Œ
73
+ - **κΈ°λ³Έ λͺ¨λΈ**: Realistic_Vision_V4.0_noVAE
74
+ - **IP-μ–΄λŒ‘ν„°**: μ–Όκ΅΄ νŠΉμ§• 보쑴을 μœ„ν•œ FaceID 및 FaceID Plus λͺ¨λΈ
75
+ - **μ–Όκ΅΄ 뢄석**: InsightFace의 Buffalo_l λͺ¨λΈ
76
+ - **생성 λ§€κ°œλ³€μˆ˜**:
77
+ - 512x768 해상도
78
+ - 100 μΆ”λ‘  단계
79
+ - μ–Όκ΅΄ 강도: 2.1
80
+ - μœ μ‚¬λ„ 강도: 0.7
81
+
82
+ ### μž‘λ™ 방식
83
+ 1. μ‚¬μš©μžκ°€ ν•œ μž₯ μ΄μƒμ˜ μ–Όκ΅΄ 사진을 μ—…λ‘œλ“œ
84
+ 2. μ‹œμŠ€ν…œμ΄ InsightFaceλ₯Ό μ‚¬μš©ν•˜μ—¬ μ–Όκ΅΄ μž„λ² λ”© μΆ”μΆœ
85
+ 3. μ—¬λŸ¬ 사진이 제곡된 경우 μž„λ² λ”©μ˜ 평균값 계산
86
+ 4. 더 λ‚˜μ€ κ²°κ³Όλ₯Ό μœ„ν•΄ μ–Όκ΅΄ μ •λ ¬ 및 크둭
87
+ 5. IP-Adapterκ°€ μ–Όκ΅΄ νŠΉμ§•μ„ Stable Diffusion 생성 ν”„λ‘œμ„ΈμŠ€μ— 톡합
88
+ 6. μ§€μ •λœ μŠ€νƒ€μΌλ‘œ μ–Όκ΅΄ 정체성을 μœ μ§€ν•˜λ©΄μ„œ 단일 인물 μ΄ˆμƒν™” 생성
89
+
90
+ ### μ•ˆμ „ κΈ°λŠ₯
91
+ - μƒμ„±λœ 이미지에 μ—¬λŸ¬ μ‚¬λžŒμ΄ λ‚˜νƒ€λ‚˜λŠ” 것을 λ°©μ§€ν•˜λŠ” λ„€κ±°ν‹°λΈŒ ν”„λ‘¬ν”„νŠΈ 포함
92
+ - 단일 인물 μ΄ˆμƒν™”λ§Œ μƒμ„±λ˜λ„λ‘ 보μž₯
93
+ - λΉ λ₯Έ 처리λ₯Ό μœ„ν•œ Spaces GPU 가속
94
+
95
+ 이 μ• ν”Œλ¦¬μΌ€μ΄μ…˜μ€ μ‚¬μš©μžμ˜ 얼꡴을 λ‹€μ–‘ν•œ 예술적 μŠ€νƒ€μΌλ‘œ λ³€ν™˜ν•˜λ©΄μ„œλ„ 본인의 μ–Όκ΅΄ νŠΉμ§•μ„ μœ μ§€ν•˜λŠ” ν˜μ‹ μ μΈ AI λ„κ΅¬μž…λ‹ˆλ‹€.