Instructions to use nova233/flux-lora-spritesheet with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use nova233/flux-lora-spritesheet with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.2-klein-base-9B", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("nova233/flux-lora-spritesheet") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
| license: other | |
| license_name: flux-1-dev-non-commercial-license | |
| license_link: https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md | |
| base_model: black-forest-labs/FLUX.2-klein-base-9B | |
| tags: | |
| - lora | |
| - flux | |
| - flux-lora | |
| - sprite-sheet | |
| - pixel-art | |
| - game-dev | |
| - animation | |
| library_name: diffusers | |
| # FLUX.2-klein Sprite Sheet LoRA | |
| A LoRA trained on FLUX.2-klein-base-9B for generating game sprite sheets in the style of LPC (Liberated Pixel Cup) assets. | |
| ## Model Details | |
| - **Base Model:** [black-forest-labs/FLUX.2-klein-base-9B](https://huggingface.co/black-forest-labs/FLUX.2-klein-base-9B) | |
| - **Training Data:** ~18,700 LPC-style sprite sheet images | |
| - **Training Steps:** 3,000 | |
| - **LoRA Rank:** 32 | |
| - **LoRA Alpha:** 32 | |
| - **Trigger Word:** `gmsspritesheet` | |
| ## Available Checkpoints | |
| This repository contains multiple checkpoints from different training stages: | |
| - `gmsspritesheet1.safetensors` - Final model (step 3000) ⭐ **Recommended** | |
| - `gmsspritesheet1_000002750.safetensors` - Step 2750 | |
| - `gmsspritesheet1_000002500.safetensors` - Step 2500 | |
| - `gmsspritesheet1_000002250.safetensors` - Step 2250 | |
| - `gmsspritesheet1_000002000.safetensors` - Step 2000 | |
| ## Usage | |
| ### Using with Diffusers | |
| ```python | |
| import torch | |
| from diffusers import DiffusionPipeline | |
| # Load base model | |
| pipe = DiffusionPipeline.from_pretrained( | |
| "black-forest-labs/FLUX.2-klein-base-9B", | |
| torch_dtype=torch.bfloat16 | |
| ) | |
| pipe.to("cuda") | |
| # Load LoRA | |
| pipe.load_lora_weights("Mystic07/flux-lora-spritesheet", weight_name="gmsspritesheet1.safetensors") | |
| # Generate | |
| prompt = "gmsspritesheet, 4 direction sprite sheet, warrior character, walk cycle animation, pixel art" | |
| image = pipe( | |
| prompt=prompt, | |
| num_inference_steps=30, | |
| guidance_scale=4.0, | |
| width=1024, | |
| height=1024 | |
| ).images[0] | |
| image.save("sprite_sheet.png") | |
| ``` | |
| ### Using with ComfyUI | |
| 1. Download `gmsspritesheet1.safetensors` | |
| 2. Place it in `ComfyUI/models/loras/` | |
| 3. Add a "Load LoRA" node in your workflow | |
| 4. Use trigger word `gmsspritesheet` in your prompt | |
| ## Example Prompts | |
| ``` | |
| gmsspritesheet, 4 direction sprite sheet, warrior character, walk cycle animation, pixel art | |
| gmsspritesheet, sprite sheet, mage character, spell casting animation, top-down view | |
| gmsspritesheet, 4 direction sprite sheet, archer character, shooting bow, pixel art style | |
| gmsspritesheet, character sprite sheet, knight in armor, idle and attack animations | |
| gmsspritesheet, sprite sheet, rogue character, stealth movement, multiple poses | |
| ``` | |
| ## Recommended Settings | |
| - **Steps:** 20-40 (30 recommended) | |
| - **Guidance Scale:** 3.5-5.0 (4.0 recommended) | |
| - **Resolution:** 1024x1024 or 768x768 | |
| - **Sampler:** Any (Euler, DPM++ work well) | |
| ## Training Details | |
| - **Dataset:** 18,706 LPC-style sprite sheet images | |
| - **Learning Rate:** 1e-4 | |
| - **Optimizer:** AdamW | |
| - **Batch Size:** 1 | |
| - **Resolution:** 1024x1024 | |
| - **Training Time:** ~3 hours on A100-40GB | |
| ## Use Cases | |
| - Game development sprite assets | |
| - Character animation references | |
| - Pixel art style generation | |
| - Top-down RPG character sprites | |
| - Walk cycles and action animations | |
| ## Limitations | |
| - Best results with pixel art and sprite sheet styles | |
| - Optimized for character sprites (humanoid forms) | |
| - May struggle with very complex multi-character scenes | |
| - Works best with the trigger word `gmsspritesheet` | |
| ## License | |
| This LoRA inherits the license from FLUX.2-klein-base-9B. Please see the [base model license](https://huggingface.co/black-forest-labs/FLUX.2-klein-base-9B) for usage terms. | |
| ## Citation | |
| If you use this LoRA in your work, please credit: | |
| ``` | |
| Mystic07/flux-lora-spritesheet | |
| Trained on FLUX.2-klein-base-9B by Black Forest Labs | |
| ``` | |
| ## Sample Images | |
| *Coming soon - example generations from the model* | |
| --- | |
| **Created by:** [Mystic07](https://huggingface.co/Mystic07) | |
| **Training Framework:** [ai-toolkit](https://github.com/ostris/ai-toolkit) | |