🎨 Monogatari Generation Model
This is a fine-tuned version of mistralai/Mistral-7B-Instruct-v0.2
specialized for generating descriptive, high-quality prompts for manga and anime-style image generation.
The model was fine-tuned on a curated dataset of prompts to learn the structure, keywords, and artistic styles commonly used to create compelling manga art. The name "Monogatari" (物語) is Japanese for "story" or "tale," reflecting the model's purpose in helping users craft visual stories.
This model was trained using 4-bit quantization (QLoRA) with PEFT, making it efficient and accessible.
🚀 Intended Use
The primary use case for this model is to act as a creative assistant for artists, hobbyists, and developers working with text-to-image models (like Stable Diffusion, Midjourney, etc.). It can take a basic idea and expand it into a rich, detailed prompt.
You must format your input using the ### Prompt:
prefix for the model to work as intended.
Example Use Cases:
- Expanding a simple character concept into a full scene description.
- Generating stylistic keywords (e.g., "by Junji Ito," "80s anime style," "ghibli inspired").
- Creating detailed prompts for specific manga panels or character sheets.
⚠️ Limitations and Bias
- Domain-Specific: This model is highly specialized for manga/anime art prompts. It is not a general-purpose chatbot and will perform poorly on other tasks.
- Inherited Bias: The model was trained on the
succinctly/midjourney-prompts
dataset. It will reflect the biases and common tropes present in that data. This may include stylistic preferences, character archetypes, and other patterns from the source prompts. - Not a Perfect Artist: The model generates text prompts, not images. The quality of the final image depends entirely on the text-to-image model you use the prompt with.
💻 How to Use
You can run this model easily using the transformers
library. Make sure to install the necessary dependencies first. The model is loaded in 4-bit to save memory.
# Install required libraries
pip install -q transformers accelerate bitsandbytes torch```
```python
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline
# The Hugging Face Hub model ID
model_id = "louijiec/monogatari-generation-model"
# Load the tokenizer
tokenizer = AutoTokenizer.from_pretrained(model_id)
# Load the model with 4-bit quantization
model = AutoModelForCausalLM.from_pretrained(
model_id,
load_in_4bit=True,
torch_dtype=torch.float16,
device_map="auto"
)
# Create a text generation pipeline
generator = pipeline(
"text-generation",
model=model,
tokenizer=tokenizer
)
# --- Your creative idea goes here! ---
# Remember to use the '### Prompt:' format.
base_prompt = "### Prompt: a close-up portrait of a powerful female samurai with cherry blossoms"
# Generate the detailed prompt
result = generator(
base_prompt,
max_new_tokens=75, # Adjust as needed
num_return_sequences=1,
eos_token_id=tokenizer.eos_token_id,
do_sample=True, # Set to True for more creative, less deterministic outputs
temperature=0.7,
top_p=0.9,
)
print("--- Generated Prompt ---")
print(result['generated_text'])
print("------------------------")
# Example Output:
# --- Generated Prompt ---
# ### Prompt: a close-up portrait of a powerful female samurai with cherry blossoms, intricate armor details, sharp focus, cinematic lighting, dramatic pose, by Kentaro Miura and Makoto Shinkai, detailed face, emotional expression, rule of thirds, 8k, trending on artstation
# ------------------------
- Downloads last month
- 7
Model tree for louijiec/monogatari-generation-model
Base model
mistralai/Mistral-7B-Instruct-v0.2