svntax-dev's picture
initial commit
4d2f977 verified
|
Raw
History Blame Contribute Delete
7.13 kB
---
tags:
- text-to-image
- lora
- diffusers
- template:diffusion-lora
widget:
- output:
url: images/knight.png
text: >-
A pixel art sprite of a medieval knight wearing metal armor and a helmet
with a red plume, a sword in one hand and a shield in the other hand. The
background is white.
- output:
url: images/witch.png
text: >-
A pixel art image of a witch with long red hair and blue eyes, wearing a
purple hat and robes trimmed with white and light purple colors. White
background
- output:
url: images/butler.png
text: >-
A pixel art image of a man with light brown hair in a long ponytail. He is
wearing a butler outfit and leaning forward towards the viewer holding a
bowl of soup. The background is a fancy restaurant with dining tables in the
back, a chandelier, and a painting of a noblewoman on the left walls.
- output:
url: images/island_base.png
text: >-
A pixel art aerial shot of an island in the middle of the ocean. On the
right side of the island is a giant metal orb building with a satellite on
top of it.
- output:
url: images/sand_dunes_tower.png
text: >-
A pixel art scene of wide, vast sand dunes with a tall cylindrical tower in
the far background surrounded by a sandstorm. In the foreground is a
medieval carriage being pulled by a triceratops moving towards the tower.
- output:
url: images/stairs_darkness_eyes.png
text: >-
A pixel art image of a top-down view of stairs leading down into darkness.
In the background the darkness has several faint red eyes.
- output:
url: images/ddagger_grid.png
text: >-
A pixel art sprite of a short red dagger with a green poisoned tip on the
top right and a gray and brown hilt. There are 16 copies of the sprite in a
4 by 4 grid. The background is white.
- output:
url: images/dshield.png
text: >-
A pixel art sprite of a rectangular orange shield with the head of a gray
dragon with its mouth open facing straight. The background is white.
- output:
url: images/skeleton_sprite.png
text: >-
A pixel art sprite of a skeleton warrior wearing a helmet with two horns,
holding an axe with both hands raised, facing right, white background
base_model: baidu/ERNIE-Image
instance_prompt: null
license: apache-2.0
---
# pixel_assets_general_ernie_v1
<Gallery />
## Model description
A pixel art LoRA for general-purpose game assets such as character sprites, creatures, items&#x2F;equipment, backgrounds, scenery, and icons.
## How to use
You can use the default ERNIE-Image-Turbo workflow from ComfyUI, and no prompt enhancer needed. The sample images also have workflows.
## How to get pixel-perfect images
Downscale by a factor of 4. So 512x512 images should downscale to 128x128, 1024x1024 to 256x256, and so on. Using k-centroid with something like [PixelOE](https:&#x2F;&#x2F;github.com&#x2F;KohakuBlueleaf&#x2F;PixelOE) works well.
See examples below:
| Raw output | K-centroid downscaled, then upscaled back 4x|
| ------------- | ------------- |
| ![knight](https:&#x2F;&#x2F;cdn-uploads.huggingface.co&#x2F;production&#x2F;uploads&#x2F;68dcbc0eb3e9381d15e2cbbc&#x2F;YzaDV03t2nse5CW_1zjmh.png) | ![knight_kcentroid](https:&#x2F;&#x2F;cdn-uploads.huggingface.co&#x2F;production&#x2F;uploads&#x2F;68dcbc0eb3e9381d15e2cbbc&#x2F;3Jz0HXEky8f0-qbPWOSaX.png) |
| ![witch](https:&#x2F;&#x2F;cdn-uploads.huggingface.co&#x2F;production&#x2F;uploads&#x2F;68dcbc0eb3e9381d15e2cbbc&#x2F;aVTiekoH43PH8ea-GBcuQ.png) | ![witch_kcentroid](https:&#x2F;&#x2F;cdn-uploads.huggingface.co&#x2F;production&#x2F;uploads&#x2F;68dcbc0eb3e9381d15e2cbbc&#x2F;lS8ult9Wy48BmKO0UmVFB.png) |
| ![butler](https:&#x2F;&#x2F;cdn-uploads.huggingface.co&#x2F;production&#x2F;uploads&#x2F;68dcbc0eb3e9381d15e2cbbc&#x2F;lH4MZ7Ej3idWetAqKpCJ7.png) | ![butler_kcentroid](https:&#x2F;&#x2F;cdn-uploads.huggingface.co&#x2F;production&#x2F;uploads&#x2F;68dcbc0eb3e9381d15e2cbbc&#x2F;F7vttfNn992sgTENoRCow.png) |
| ![island_base](https:&#x2F;&#x2F;cdn-uploads.huggingface.co&#x2F;production&#x2F;uploads&#x2F;68dcbc0eb3e9381d15e2cbbc&#x2F;pXhyysqvG6eLLNM5BGVSg.png) | ![island_base_kcentroid](https:&#x2F;&#x2F;cdn-uploads.huggingface.co&#x2F;production&#x2F;uploads&#x2F;68dcbc0eb3e9381d15e2cbbc&#x2F;lN2e8MkFf64Xv7cChLSp3.png) |
| ![sand_dunes_tower](https:&#x2F;&#x2F;cdn-uploads.huggingface.co&#x2F;production&#x2F;uploads&#x2F;68dcbc0eb3e9381d15e2cbbc&#x2F;y52scgX3_d9dVmcRTFCOr.png) | ![sand_dunes_tower_kcentroid](https:&#x2F;&#x2F;cdn-uploads.huggingface.co&#x2F;production&#x2F;uploads&#x2F;68dcbc0eb3e9381d15e2cbbc&#x2F;Box0VumA-MySo_GgI2rnM.png) |
| ![stairs_darkness_eyes](https:&#x2F;&#x2F;cdn-uploads.huggingface.co&#x2F;production&#x2F;uploads&#x2F;68dcbc0eb3e9381d15e2cbbc&#x2F;ISeSI_bUcjP76iF0uELRj.png) | ![stairs_darkness_eyes_kcentroid](https:&#x2F;&#x2F;cdn-uploads.huggingface.co&#x2F;production&#x2F;uploads&#x2F;68dcbc0eb3e9381d15e2cbbc&#x2F;B0XEbbezIYWZRh9m-rDCH.png)
| ![ddagger_grid](https:&#x2F;&#x2F;cdn-uploads.huggingface.co&#x2F;production&#x2F;uploads&#x2F;68dcbc0eb3e9381d15e2cbbc&#x2F;U4_aHp1fj2w3QsdgGXdaH.png) | ![ddagger_grid_kcentroid](https:&#x2F;&#x2F;cdn-uploads.huggingface.co&#x2F;production&#x2F;uploads&#x2F;68dcbc0eb3e9381d15e2cbbc&#x2F;JGpWpER4tSkzhfnR2XkON.png) |
| ![dshield](https:&#x2F;&#x2F;cdn-uploads.huggingface.co&#x2F;production&#x2F;uploads&#x2F;68dcbc0eb3e9381d15e2cbbc&#x2F;h77Zm-gbhfEwwrd3Nj7J7.png) | ![dshield_kcentroid](https:&#x2F;&#x2F;cdn-uploads.huggingface.co&#x2F;production&#x2F;uploads&#x2F;68dcbc0eb3e9381d15e2cbbc&#x2F;wRWXTBX1jvpX2eR52o1c-.png) |
| ![skeleton_sprite](https:&#x2F;&#x2F;cdn-uploads.huggingface.co&#x2F;production&#x2F;uploads&#x2F;68dcbc0eb3e9381d15e2cbbc&#x2F;zeyVs6sByyMdYJMedVWtq.png) | ![skeleton_sprite_kcentroid](https:&#x2F;&#x2F;cdn-uploads.huggingface.co&#x2F;production&#x2F;uploads&#x2F;68dcbc0eb3e9381d15e2cbbc&#x2F;h-MaleeTuU0klLP95Wo2j.png) |
## Does this LoRA work with ERNIE-Image base?
Yes, but I don&#39;t recommend it. **The LoRA is meant to be used with the turbo model.** For some reason, outputs with the base model are very bad. The colors are way too bright or saturated, and there are more issues with anatomy. Maybe there&#39;s a problem with my settings.
## Notes &amp; Issues
There are still some issues with certain prompts with the ERNIE turbo model.
- The model tends to make characters face forward or in a 3&#x2F;4 angle even if your prompt has a different view. This might just be a limit of the turbo model, though.
- If prompting for sprites, make sure to include &quot;white background&quot; somewhere, otherwise you&#39;ll sometimes get a detailed background.
- Since I trained this on a 4x upscaled pixel art dataset, if you want smaller sprites, just prompt for copies of a sprite in a 2x2 or 4x4 grid (see the sample images).
- The dataset this LoRA was trained on contains 512x512, 768x768, and 1024x1024 images, but you can change the resolution and still get decent images.
## Download model
[Download](/svntax-dev/pixel_assets_general_ernie_v1/tree/main) them in the Files & versions tab.