Stable Diffusion fine tuned on Romance of the Three Kingdoms XI: Officer Portraits.
Put in a text prompt and generate your own Officier in Three Kingdoms.
trained using this script with this dataset.
try in colab.
Usage
!pip install diffusers==0.19.3
!pip install transformers scipy ftfy
import torch
from diffusers import StableDiffusionPipeline
from torch import autocast
pipe = StableDiffusionPipeline.from_pretrained("wx44wx/sd-three-kingdoms-diffusers", torch_dtype=torch.float16)
pipe = pipe.to("cuda")
prompt = "a man in armor"
scale = 3
n_samples = 4
# Sometimes the nsfw checker is confused by the Pokémon images, you can disable
# it at your own risk here
disable_safety = False
if disable_safety:
def null_safety(images, **kwargs):
return images, False
pipe.safety_checker = null_safety
with autocast("cuda"):
images = pipe(n_samples*[prompt], guidance_scale=scale).images
for idx, im in enumerate(images):
im.save(f"{idx:06}.png")
Model description
Trained on BLIP captioned Three Kingdoms Officers images using 1xA6000 GPUs for around 16,000 steps.
Links
- Lambda Diffusers
- Captioned Three Kingdoms dataset
- Model weights in Diffusers format
- Original model weights
- Training code
Trained by Xin Wang. Thanks kongming.net for their archived images and justinpinkney for the code.
- Downloads last month
- 0
This model does not have enough activity to be deployed to Inference API (serverless) yet. Increase its social
visibility and check back later, or deploy to Inference Endpoints (dedicated)
instead.