Downloads · 30 days
26
16% of all-time downloads
KavinduHansaka/Llama-3.2-3B-ImageGen
Llama-3.2-3B-ImageGen is a text generation model from KavinduHansaka. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as mit.
This repository provides a LoRA-finetuned & merged version of meta-llama/Llama-3.2-3B, specialized for image prompt generation. It is designed to create cinematic, detailed, and structured prompts for text-to-image mo…
Downloads · 30 days
26
16% of all-time downloads
All-time downloads
158
Public
Parameters
3.2B
6.4 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors6.4 GB · 100%
From the Hugging Face model README
This repository provides a LoRA-finetuned & merged version of meta-llama/Llama-3.2-3B, specialized for image prompt generation.
It is designed to create cinematic, detailed, and structured prompts for text-to-image models such as Stable Diffusion XL and Flux.
Note: This is a prompt-generation model, not an instruction/chat model. It is trained to produce concise, creative prompts suitable for diffusion-based image synthesis.
config.json, generation_config.jsonmodel.safetensors)tokenizer.json, tokenizer_config.json, special_tokens_map.json)import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
REPO_ID = "KavinduHansaka/Llama-3.2-3B-ImageGen"
tok = AutoTokenizer.from_pretrained(REPO_ID)
model = AutoModelForCausalLM.from_pretrained(
REPO_ID, device_map="auto", torch_dtype=torch.bfloat16
)
prompt = "Create a cinematic noir macro photo with film grain, 1:1 ratio, sharp focus."
inputs = tok(prompt, return_tensors="pt").to(model.device)
out = model.generate(**inputs, max_new_tokens=120, do_sample=True, temperature=0.5, top_p=0.9)
print(tok.decode(out[0], skip_special_tokens=True))
transformers, peft, accelerate, torch, sentencepiece@misc{llama3.2-3B,
title = {LLaMA 3.2 (3B)},
author = {Meta AI},
year = {2024},
url = {https://huggingface.co/meta-llama/Llama-3.2-3B}
}
@misc{llama3.2-3B-ImageGen,
title = {Llama-3.2-3B Image Prompt Generator (LoRA Merged)},
author = {Kavindu Hansaka Jayasinghe},
year = {2025},
url = {https://huggingface.co/KavinduHansaka/Llama-3.2-3B-ImageGen}
}