Datasets:
EntropyDrop commited on
Commit ·
ac4ade7
1
Parent(s): 2c3f34a
feat: update skins
Browse files- control_imgs/lowpoly/ac569fdeb36124e8.png +3 -0
- control_imgs/lowpoly/anya-forger.png +3 -0
- control_imgs/lowpoly/cba099198414fdf1.png +3 -0
- control_imgs/lowpoly/rivals.png +3 -0
- control_imgs/lowpoly/santa-claus.png +3 -0
- control_imgs/lowpoly/snow-white.png +3 -0
- control_imgs/lowpoly/snowball-fight.png +3 -0
- control_imgs/lowpoly/snowy-stockings.png +3 -0
- control_imgs/lowpoly/summer2.png +3 -0
- control_imgs/lowpoly/zenitsu-agatsuma.png +3 -0
- gpt_image.py +1 -1
- gpt_skin2real.py +1 -1
- gpt_skin2real_auto.py +16 -7
- skins/.DS_Store +0 -0
- skins/lowpoly/{975b94368d87cede.png → 09e92b94f8035dd6.png} +2 -2
- skins/lowpoly/ac569fdeb36124e8.png +3 -0
- skins/lowpoly/anya-forger.png +3 -0
- skins/lowpoly/cool-summer.png +3 -0
- skins/lowpoly/d2055d41587a47a0.png +3 -0
- skins/lowpoly/e3610b319b59154e.png +3 -0
- skins/lowpoly/late-summer.png +3 -0
- skins/lowpoly/one-day-i-will-stop-falling-in-love-with-you.png +3 -0
- skins/lowpoly/rivals.png +3 -0
- skins/lowpoly/santa-claus.png +3 -0
- skins/lowpoly/snow-white.png +3 -0
- skins/lowpoly/snowball-fight.png +3 -0
- skins/lowpoly/snowy-stockings.png +3 -0
- skins/lowpoly/spring-color.png +3 -0
- skins/lowpoly/summer.png +3 -0
- skins/lowpoly/summer2.png +3 -0
- skins/lowpoly/zenitsu-agatsuma.png +3 -0
control_imgs/lowpoly/ac569fdeb36124e8.png
ADDED
|
Git LFS Details
|
control_imgs/lowpoly/anya-forger.png
ADDED
|
Git LFS Details
|
control_imgs/lowpoly/cba099198414fdf1.png
ADDED
|
Git LFS Details
|
control_imgs/lowpoly/rivals.png
ADDED
|
Git LFS Details
|
control_imgs/lowpoly/santa-claus.png
ADDED
|
Git LFS Details
|
control_imgs/lowpoly/snow-white.png
ADDED
|
Git LFS Details
|
control_imgs/lowpoly/snowball-fight.png
ADDED
|
Git LFS Details
|
control_imgs/lowpoly/snowy-stockings.png
ADDED
|
Git LFS Details
|
control_imgs/lowpoly/summer2.png
ADDED
|
Git LFS Details
|
control_imgs/lowpoly/zenitsu-agatsuma.png
ADDED
|
Git LFS Details
|
gpt_image.py
CHANGED
|
@@ -58,7 +58,7 @@ def generate_image(s3_urls, prompt):
|
|
| 58 |
"aspect_ratio": "1:1",
|
| 59 |
"images": s3_urls,
|
| 60 |
"n": 1,
|
| 61 |
-
"quality": "
|
| 62 |
"resolution": "1K",
|
| 63 |
"response_format": "url",
|
| 64 |
"size": "1024x1024"
|
|
|
|
| 58 |
"aspect_ratio": "1:1",
|
| 59 |
"images": s3_urls,
|
| 60 |
"n": 1,
|
| 61 |
+
"quality": "high",
|
| 62 |
"resolution": "1K",
|
| 63 |
"response_format": "url",
|
| 64 |
"size": "1024x1024"
|
gpt_skin2real.py
CHANGED
|
@@ -16,7 +16,7 @@ def main():
|
|
| 16 |
parser = argparse.ArgumentParser(description="Render Minecraft skin to 3D views, upload to S3, and call img2img model.")
|
| 17 |
parser.add_argument("skin", help="Path to local Minecraft skin image file.")
|
| 18 |
parser.add_argument("-o", "--output", help="Output path for the generated image. Defaults to 'result_<timestamp>.png'.")
|
| 19 |
-
parser.add_argument("-p", "--prompt", default="生成ta的全身真人照片,再生成ta的背面放在图片右边", help="Prompt for the img2img model.")
|
| 20 |
parser.add_argument("-r", "--render-only", action="store_true", help="Only render the 3D front and back views locally, without calling the S3/img2img pipeline.")
|
| 21 |
args = parser.parse_args()
|
| 22 |
|
|
|
|
| 16 |
parser = argparse.ArgumentParser(description="Render Minecraft skin to 3D views, upload to S3, and call img2img model.")
|
| 17 |
parser.add_argument("skin", help="Path to local Minecraft skin image file.")
|
| 18 |
parser.add_argument("-o", "--output", help="Output path for the generated image. Defaults to 'result_<timestamp>.png'.")
|
| 19 |
+
parser.add_argument("-p", "--prompt", default="生成ta的全身真人照片,再生成ta的背面放在图片右边。请准确还原人物的特征细节,注意真人照片里面通常不包含像素风格的装饰。", help="Prompt for the img2img model.")
|
| 20 |
parser.add_argument("-r", "--render-only", action="store_true", help="Only render the 3D front and back views locally, without calling the S3/img2img pipeline.")
|
| 21 |
args = parser.parse_args()
|
| 22 |
|
gpt_skin2real_auto.py
CHANGED
|
@@ -22,6 +22,19 @@ def main():
|
|
| 22 |
|
| 23 |
print(f"[*] Found {len(skin_files)} skin files in {skins_dir}.")
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
skipped = 0
|
| 26 |
processed = 0
|
| 27 |
|
|
@@ -37,18 +50,14 @@ def main():
|
|
| 37 |
print("="*60)
|
| 38 |
print(f"[*] Processing: {skin_file}")
|
| 39 |
|
| 40 |
-
#
|
| 41 |
try:
|
| 42 |
with Image.open(skin_path) as img:
|
| 43 |
-
|
| 44 |
-
if (width, height) == (64, 32):
|
| 45 |
-
print(f"[*] Detected legacy 64x32 skin format for {skin_file}. Auto-converting to 64x64...")
|
| 46 |
-
convert_skin_64x32_to_64x64(skin_path, skin_path)
|
| 47 |
-
elif (width, height) != (64, 64):
|
| 48 |
print(f"[!] Warning: Skin '{skin_file}' has unexpected dimensions {img.size}. Skipping.")
|
| 49 |
continue
|
| 50 |
except Exception as e:
|
| 51 |
-
print(f"[!] Error
|
| 52 |
continue
|
| 53 |
|
| 54 |
# Invoke gpt_skin2real.py using subprocess
|
|
|
|
| 22 |
|
| 23 |
print(f"[*] Found {len(skin_files)} skin files in {skins_dir}.")
|
| 24 |
|
| 25 |
+
# 1. Pre-repair pass: check and convert all legacy 64x32 skins in the candidate directory
|
| 26 |
+
print("[*] Running pre-repair check on all skin files...")
|
| 27 |
+
for skin_file in skin_files:
|
| 28 |
+
skin_path = os.path.join(skins_dir, skin_file)
|
| 29 |
+
try:
|
| 30 |
+
with Image.open(skin_path) as img:
|
| 31 |
+
width, height = img.size
|
| 32 |
+
if (width, height) == (64, 32):
|
| 33 |
+
print(f"[*] Pre-repair: Detected legacy 64x32 skin format for {skin_file}. Auto-converting to 64x64...")
|
| 34 |
+
convert_skin_64x32_to_64x64(skin_path, skin_path)
|
| 35 |
+
except Exception as e:
|
| 36 |
+
print(f"[!] Pre-repair: Error checking skin size for {skin_file}: {e}")
|
| 37 |
+
|
| 38 |
skipped = 0
|
| 39 |
processed = 0
|
| 40 |
|
|
|
|
| 50 |
print("="*60)
|
| 51 |
print(f"[*] Processing: {skin_file}")
|
| 52 |
|
| 53 |
+
# Verify skin size (should be 64x64 after pre-repair)
|
| 54 |
try:
|
| 55 |
with Image.open(skin_path) as img:
|
| 56 |
+
if img.size != (64, 64):
|
|
|
|
|
|
|
|
|
|
|
|
|
| 57 |
print(f"[!] Warning: Skin '{skin_file}' has unexpected dimensions {img.size}. Skipping.")
|
| 58 |
continue
|
| 59 |
except Exception as e:
|
| 60 |
+
print(f"[!] Error verifying skin size: {e}")
|
| 61 |
continue
|
| 62 |
|
| 63 |
# Invoke gpt_skin2real.py using subprocess
|
skins/.DS_Store
CHANGED
|
Binary files a/skins/.DS_Store and b/skins/.DS_Store differ
|
|
|
skins/lowpoly/{975b94368d87cede.png → 09e92b94f8035dd6.png}
RENAMED
|
File without changes
|
skins/lowpoly/ac569fdeb36124e8.png
ADDED
|
Git LFS Details
|
skins/lowpoly/anya-forger.png
ADDED
|
Git LFS Details
|
skins/lowpoly/cool-summer.png
ADDED
|
Git LFS Details
|
skins/lowpoly/d2055d41587a47a0.png
ADDED
|
Git LFS Details
|
skins/lowpoly/e3610b319b59154e.png
ADDED
|
Git LFS Details
|
skins/lowpoly/late-summer.png
ADDED
|
Git LFS Details
|
skins/lowpoly/one-day-i-will-stop-falling-in-love-with-you.png
ADDED
|
Git LFS Details
|
skins/lowpoly/rivals.png
ADDED
|
Git LFS Details
|
skins/lowpoly/santa-claus.png
ADDED
|
Git LFS Details
|
skins/lowpoly/snow-white.png
ADDED
|
Git LFS Details
|
skins/lowpoly/snowball-fight.png
ADDED
|
Git LFS Details
|
skins/lowpoly/snowy-stockings.png
ADDED
|
Git LFS Details
|
skins/lowpoly/spring-color.png
ADDED
|
Git LFS Details
|
skins/lowpoly/summer.png
ADDED
|
Git LFS Details
|
skins/lowpoly/summer2.png
ADDED
|
Git LFS Details
|
skins/lowpoly/zenitsu-agatsuma.png
ADDED
|
Git LFS Details
|