EntropyDrop commited on
Commit
9a8f265
·
1 Parent(s): eff1ea7
DDJ_real2render/create_template.py CHANGED
@@ -6,7 +6,7 @@ from PIL import Image
6
  import numpy as np
7
 
8
  #VIEW_NAMES = ("front_left", "back_right", "front_left_overlay", "back_right_overlay")
9
- VIEW_NAMES = ("front_left", "back_right")
10
 
11
  def resolve_renderer_path(renderer_path):
12
  if not renderer_path or not os.path.exists(renderer_path):
 
6
  import numpy as np
7
 
8
  #VIEW_NAMES = ("front_left", "back_right", "front_left_overlay", "back_right_overlay")
9
+ VIEW_NAMES = ("front_left", "back_left")
10
 
11
  def resolve_renderer_path(renderer_path):
12
  if not renderer_path or not os.path.exists(renderer_path):
DDJ_real2render/real2render.py CHANGED
@@ -20,45 +20,6 @@ DEFAULT_PROMPT = """生成[图1]中角色的Minecraft形象
20
 
21
  - 在上述约束下,尽可能完美、准确的还原[图1]中的角色,包括外貌特征、全身所有服装、各种饰品等(不包括手持物品和披风)"""
22
 
23
- DEFAULT_PROMPT= """You are a Minecraft skin creator. You receive 3 input images:
24
- INPUTS (3 images): [A] Character reference: same anime character with FRONT + BACK views (side-by-side or top/bottom).
25
- [B] Layout reference: target Minecraft dual-panel framing and camera. [C] Pose-anchor reference: strict limb-position
26
- guide.
27
- OUTPUT: Generate exactly ONE final image only. - Pure white background #FFFFFF. - Two panels only, side-by-side: - Left =
28
- FRONT - Right = BACK - Never swap. - No extra views, no extra images, no text, no watermark, no UI, no props, no scene.
29
- VIEW PARSING (HARD): - If [A] is side-by-side: default left=front, right=back (unless explicit text labels say otherwise).
30
- - If [A] is top/bottom: rearrange to left=front, right=back. - Left panel uses front-view info only. - Right panel uses
31
- back-view info only. - Do not copy front-only details to back or back-only details to front.
32
- CAMERA / ORIENTATION (LOCKED): - Near-orthographic look (very weak perspective). - Front panel: +24° yaw (front-right),
33
- +30° downward tilt. - Back panel: 180°+24° yaw (back-right), same +30° downward tilt. - Front/back orientation
34
- relationship must remain parallel in 3D space. - Match framing style of [B].
35
- POSE LOCK (ULTRA STRICT): - Minecraft default standing pose only. - Head, torso, arms, legs are clean cuboids with
36
- straight vertical sides. - Arms: - Start at shoulder line, hang straight down. - No bend, no forward/back swing, no
37
- outward spread. - Left/right symmetry required. - Legs: - Start at hip line, go straight down. - Parallel, no crossing,
38
- no toe-in/toe-out, no bend. - Feet bottoms must share the same baseline. - Limb-position tolerance: - Vertical drift of
39
- each arm centerline from shoulder to hand <= 1 px. - Vertical drift of each leg centerline from hip to foot <= 1 px. -
40
- Left/right symmetry error <= 2 px. - Foot baseline mismatch <= 1 px. - If any tolerance fails, regenerate.
41
- PROPORTION LOCK (CLASSIC): - Approx height ratio head:torso:legs = 8:12:12. - Arm height about 12, arm width about 4; leg
42
- width about 4 (relative block proportions). - Same scale and body proportions in both panels. - Full body visible (head
43
- to feet), feet aligned, minimal empty margin, no cropping.
44
- PIXEL FORMAT LOCK (VERY HARD): - True pixel art only. No smooth high-precision rendering. - Build on a low-resolution
45
- pixel grid first, then upscale by integer factor using NEAREST only. - No anti-aliasing, no blur, no feathering, no
46
- denoise smoothing. - No sub-pixel edges, no fractional blending, no soft gradients. - Use hard square pixel blocks;
47
- staircase edges are acceptable/preferred. - Palette limit: - Total character palette recommended <= 48 colors (excluding
48
- white background). - Hair palette <= 6 colors. - Shading limit: max 2-3 tones per material. - No isolated 1-pixel noise
49
- clusters.
50
- HAIR PIXELIZATION LOCK (CRITICAL): - Hair must be converted into blocky pixel masses, not smooth strands. - No thin
51
- strand rendering, no wispy/soft edges, no semi-transparent flyaways. - Minimum visible hair feature width: >= 2 px at the
52
- working pixel grid. - Hairline, bangs, side locks, and back hair must be represented as square block clusters. - If hair
53
- appears too smooth or too detailed, re-pixelate and regenerate.
54
- FIDELITY: - Preserve hairstyle structure, outfit structure, color-block layout, patterns, accessories. - Front details
55
- from front reference; back details from back reference. - If back is unclear, do minimal consistent completion only; do
56
- not invent new design elements.
57
- FINAL SELF-CHECK (MUST PASS ALL): 1) Left=FRONT, Right=BACK correct. 2) Arms vertical, symmetric, and anchored correctly.
58
- 3) Legs vertical, parallel, and feet aligned. 4) Same character / same outfit in both panels. 5) Pure white background,
59
- one dual-panel image only. 6) Hair is clearly blocky pixel mass (not smooth high-precision strands). If any check fails,
60
- regenerate before final output."""
61
-
62
  def real2render(
63
  image_path,
64
  template_path=None,
 
20
 
21
  - 在上述约束下,尽可能完美、准确的还原[图1]中的角色,包括外貌特征、全身所有服装、各种饰品等(不包括手持物品和披风)"""
22
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
  def real2render(
24
  image_path,
25
  template_path=None,
DDJ_real2render/template/template34.png ADDED

Git LFS Details

  • SHA256: ddc98af2b5b8fa7e31ba65dd213710133ba010647d91819e3618dbf11b6582b9
  • Pointer size: 130 Bytes
  • Size of remote file: 25.2 kB
DDJ_real2render/template/template35.png ADDED

Git LFS Details

  • SHA256: efa9fcf886328fb0a670f0ab2a597384389ad496f06e37f75ac4b8b227da7e63
  • Pointer size: 130 Bytes
  • Size of remote file: 25.3 kB
DDJ_real2render/template/template36.png ADDED

Git LFS Details

  • SHA256: 1df7e14449e9f5893b49f94fe6611ce33adfb45db64df6a8114bef18054f7968
  • Pointer size: 130 Bytes
  • Size of remote file: 38 kB
DDJ_real2render/template/template37.png ADDED

Git LFS Details

  • SHA256: c0df5c043213f918a9081f23cf66e8a3446f503ae54d7973a36b1fb09801e97c
  • Pointer size: 130 Bytes
  • Size of remote file: 31 kB
DDJ_real2render/template/template38.png ADDED

Git LFS Details

  • SHA256: 0634357219e83a88e27ff262a8126038f1e0218df539bc93f4abe556220df616
  • Pointer size: 130 Bytes
  • Size of remote file: 25.2 kB
DDJ_real2render/test_output/img10_template31_34_33.png ADDED

Git LFS Details

  • SHA256: 1a0162dd13b110b0baf151f61299c14d6b5f07a0c13fe4528f0a783ab6ecc0a6
  • Pointer size: 132 Bytes
  • Size of remote file: 1.27 MB
DDJ_real2render/test_output/img10_template35_36_37.png ADDED

Git LFS Details

  • SHA256: 390b295cf895fba4366d40d04a31d4c45bdd23b36a623ec40f874a019bbd3b3b
  • Pointer size: 132 Bytes
  • Size of remote file: 3.67 MB
DDJ_real2render/test_output/img10_template35_36_37_a.png ADDED

Git LFS Details

  • SHA256: d529ba3b63bac13cac94d0093d0d7d225d0064601c84db93a7da395ce439c5b7
  • Pointer size: 132 Bytes
  • Size of remote file: 3.72 MB
DDJ_real2render/test_output/img11_template35_36_37.png ADDED

Git LFS Details

  • SHA256: de20b757728844611c74455e933499ef5efdb9ebcdf54cebb93aae7e8278746c
  • Pointer size: 132 Bytes
  • Size of remote file: 3.52 MB
DDJ_real2render/test_output/img11_template35_36_37_a.png ADDED

Git LFS Details

  • SHA256: a218aae721d788c1676115f03719f8a3e72d2beb70f4cfc8528b0663e1e19021
  • Pointer size: 132 Bytes
  • Size of remote file: 1.16 MB
DDJ_real2render/test_output/img12_template35_36_37.png ADDED

Git LFS Details

  • SHA256: 99c1ae07a38602266350b4d3da6255f1c612734c72c094440d82168cca27b098
  • Pointer size: 132 Bytes
  • Size of remote file: 1.36 MB
DDJ_real2render/test_output/img13_template35_36_37.png ADDED

Git LFS Details

  • SHA256: 430488a04ec456899f2afe2a85353124a60cfef17b4b4f065b0f20f5557a223a
  • Pointer size: 132 Bytes
  • Size of remote file: 3.62 MB
DDJ_real2render/test_output/img14_template35_36_37.png ADDED

Git LFS Details

  • SHA256: 2bcecad26f1a92e67966bc2b76ba8fd1d94a53c93e499415bebecac48ebd8345
  • Pointer size: 132 Bytes
  • Size of remote file: 1.24 MB
DDJ_real2render/test_output/img15_template35_36_37.png ADDED

Git LFS Details

  • SHA256: f7a677867064c35041aac993cb1e289274dc03382589f34bde0bae436122201b
  • Pointer size: 132 Bytes
  • Size of remote file: 3.44 MB