The process of fine tuning a Stable Diffusion model to generate Minecraft character previews is detailed here: Digging into Stable Diffusion-Generated Minecraft Skins.
This codebase further refines that model, and allows for in-game skins to be generated using only a text prompt. The finetuned model for doing so is available on HuggingFace as monadical-labs/minecraft-skin-generator. The model development process is described here in a subsequant blog post: Even More Skin in the Game: Digging Deeper Into Stable Diffusion-Generated Minecraft Skins.
If you want to finetune this model, check here
Prompt: "A man in a purple suit wearing a tophat"
Output Image Asset Skin:
Skin Imported In Game:
-
Click the Code button and download it as a Zip.
-
Extract the .zip file.
-
Now you gotta Inference:
-
Choose which version:
-
Windows:
-
UI: Open Run_Inference_UI.bat, let it create the venv_ui and install the requirements. After that ctrl+click the local url.
-
NO UI: Open Run_Inference_NO_UI.bat, let it create the venv_no_ui and install the requirements, it will ask you for the parameters to set that are explained below
-
-
Mac & Linux
-
UI: Open Run_Inference_UI.sh, let it create the venv_ui and install the requirements. After that ctrl+click the local url.
-
NO UI: Open Run_Inference_NO_UI.sh, let it create the venv_no_ui and install the requirements, it will ask you for the parameters to set that are explained below
-
A: Enter the prompt, so how the Minecraft Skins should look like.
B: Choose the Stable Diffusion Model, either 2 or xl (xl is better).
C: Enter the integer value for the Inference Steps, which is basically denoising the image so an higher value = better output but longer process, it's suggested to use either 25 or 50.
D: Enter the guidance scale, the float value for how much the output is adherent to the prompt, the 'max' is 10.0.
E: Enter the model precision type,fp16 (which is faster) or fp32 (which is more precise but slower and need more resources).
F: Put the Seed, the starting point to initiate the generation process, either an integer value or 0 for a random one, max is 2147483647.
G: Write the Output Image Skin Asset Name with the .png extension.
H: Choose if to see the output as a 3D model too or not, you need ImageMagick (ONLY IF YOU WANNA SEE THE GENERATED SKIN AS 3D MODEL for it (NO UI: y or n / UI: check the box).
I: Choose if to show a verbose (detailed) output or not, not really needed (NO UI: y or n / UI: check the box).
- About the Outputs, if you are running:
-
UI: Download output skin asset image by the download icon in the ui version in the web ui when its done making the skin, also you can download the 3d model in .glb format of the skin.
-
NO UI: The output skin asset image will be saved into the output_minecraft_skins folder with the output name you gave it before, also you will have a (name-you-gave-the-skin)-converted.png which is the skin converted from 64x32 to 64x64 to make it adherent on the 3d model player which are in the files (this bug happened only to this 3d model, the skin asset will work fine in game, you can delete that file if you want to, it's useless and the 3d model will work without it), and also you will find a (name-you-gave-the-skin)_3d_model.glb
- You can import now the skin into Minecraft, which you can do with a slightly different way based on the Minecraft version you play so just google it lol.
We have released a hosted version of our Minecraft Skin Generator at: https://www.skingenerator.io
While closed source, this version improves on the quality of generated skins from the publicly available model, plus it supports transparency in the helmet/hair section of the skins. Please check it out and let us know what you think!
- Download one of the 2 Kaggle Notebooks Files above
- Go on https://kaggle.com, be sure you make an account and are phone verified.
- Click the '+', then 'Create new notebook'.
- Click 'File' and 'Import Notebook'.
- Import the kaggle notebook file.
Fixed Kaggle & Google Colab Web UI, updated gradio from 4.36.0 to 4.41.0 for fixing localtunnel issues, and update Pillow from 9.0.1 to 10.4.0 to fix incompatibility with python 3.11.
Added a Youtube Tutorial for the (ZeroGPU) HuggingFace Space.
Fix typo on the WEB UI Colab.
Kaggle Notebook Files.
Fixed UI Inference py script, fixed no ui shell script, adjusted the ui parameters.
Added Mac & Linux Local Support.
Added Ipywidgets UI Kaggle Notebook.
Added LocalTunnel Tunnel Option for UI Colab & Kaggle.
Added Cloudfare tunnel to the WEB UI ui colab and merged not-holar pull request to make the image asset display pixelated like minecraft instead of blurry and with a checked background for the web ui
Added Ngrok tunnel to the WEB UI Colab, added kaggle WEB & NO UI notebooks!
Add a way to see the skin in 3d model preview and also download it for all versions thanks to:
- daroche (helping me fix the 3d model texture isue)
- Brottweiler (script to fix the 3d model texture
- meew (Minecraft Player 3d model)
Nick088 improved the local installation
Nick088 made the Hugging Face Space and the Google Colab agradio Ui (based on the hf space)
Nick088 Forked this repository and uploaded an updated version of the 2 py scripts with more features and uploaded the Google Colabs to run this model for free on the CPU (slower) or Free Daily Colab T4 Gpu
We have released a new open sourced Minecraft Skin Generator XL model based on Stable Diffusion XL. It offers many improvements over the original model, including support for the transparency layer. The new model can be downloaded from HuggingFace, or see below for commandline usage via the minecraft-skins-sdxl.py script.
- Author of the AI Model: Cory Spencer [email protected]
- Forked Improved Version: Nick088
- daroche (helping me fix the 3d model texture isue)
- Brottweiler (script to fix the 3d model texture)
- not-holar (made the rendering of the image asset in the web ui look pixelated like minecraft and have a checkered background)
- meew (Minecraft Player 3d model)