Downloads · 30 days
1
1% of all-time downloads
CHAITron/KranokThaiV1
KranokThaiV1 is a text-to-image model from CHAITron. Use it when you need an image from a text prompt. It is set up for diffusers. The card lists the license as creativeml-openrail-m.
This is the fine-tuned Stable Diffusion model trained on the concept of Kranok Thai arts. Use the tokens \<knt-style style in your prompts for the effect.
Downloads · 30 days
1
1% of all-time downloads
All-time downloads
157
Public
Parameters
866M
2.6 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors2.6 GB · 100%
From the Hugging Face model README
This is the fine-tuned Stable Diffusion model trained on the concept of Kranok Thai arts. Use the tokens <knt-style> style in your prompts for the effect.
Prompt used: "a colourful masterpiece thai cat in <knt-style> style, high-quality, professional art, realistic, thai style"
Prompt used: "a colourful masterpiece thai dog in <knt-style> style, high-quality, professional art, realistic, thai style"
This model can be used just like any other Stable Diffusion model. For more information, please have a look at the Stable Diffusion.
You can also export the model to ONNX, MPS and/or FLAX/JAX.
pip install torch diffusers accelerate pillow
from diffusers import StableDiffusionPipeline
import torch
from PIL import Image
def image_grid(imgs, rows, cols):
assert len(imgs) == rows*cols
w, h = imgs[0].size
grid = Image.new('RGB', size=(cols*w, rows*h))
grid_w, grid_h = grid.size
for i, img in enumerate(imgs):
grid.paste(img, box=(i%cols*w, i//cols*h))
return grid
model_id = "CHAITron/KranokThaiV1"
pipe = StableDiffusionPipeline.from_pretrained(model_id, torch_dtype=torch.float16)
pipe = pipe.to("cuda")
prompt = "a colourful masterpiece thai dog in <knt-style> style, high-quality, professional art, realistic, thai style"
num_samples = 4
num_rows = 1
all_images = []
for _ in range(num_rows):
images = pipe(prompt, num_images_per_prompt=num_samples, num_inference_steps=25, guidance_scale=9).images
all_images.extend(images)
grid = image_grid(all_images, num_rows, num_samples)
grid
This model is open access and available to all, with a CreativeML OpenRAIL-M license further specifying rights and usage. The CreativeML OpenRAIL License specifies: