ONNX Model Zoo

Mitchins/t5-base-artgen-multi-instruct-ONNX

By Mitchins · ↓ 1 · ♥ 0 · Updated 2025-09-03

What's in this repo

This page lists the files in Mitchins/t5-base-artgen-multi-instruct-ONNX, including decoder_model.onnx, encoder_model.onnx.

  • 2 ONNX models (.onnx files)
  • 10 files, including 5 .json, 2 .onnx, 1 .md, 1 .model
  • Last updated 2025-09-03

ONNX files

File Size Download
decoder_model.onnx — Download
encoder_model.onnx — Download

How to use

These ONNX files can be loaded with ONNX Runtime. To inspect a model graph, upload the file to the Netron viewer. Download links point to the original files on Hugging Face.

README

T5 Base Art Generation Multi-Instruct ONNX

ONNX version of Mitchins/t5-base-artgen-multi-instruct for optimized CPU inference.

Model Details

  • Base Model: T5-base (Google)
  • Training Samples: 297,282
  • Parameters: 222M
  • Format: ONNX (FP32)
  • Optimization: CPU inference optimized

Quad-Instruction Capabilities

  1. Standard Enhancement: Enhance this prompt: {text}
  2. Clean Enhancement: Enhance this prompt (no lora): {text}
  3. Technical Enhancement: Enhance this prompt (with lora): {text}
  4. Simplification: Simplify this prompt: {text}

Usage

from optimum.onnxruntime import ORTModelForSeq2SeqLM
from transformers import T5Tokenizer

# Load ONNX model
model = ORTModelForSeq2SeqLM.from_pretrained("Mitchins/t5-base-artgen-multi-instruct-ONNX")
tokenizer = T5Tokenizer.from_pretrained("Mitchins/t5-base-artgen-multi-instruct-ONNX")

# Example usage
text = "woman in red dress"
prompt = f"Enhance this prompt (no lora): {text}"

inputs = tokenizer(prompt, return_tensors="pt")
outputs = model.generate(**inputs, max_length=80)
result = tokenizer.decode(outputs[0], skip_special_tokens=True)

Performance

Optimized for CPU inference with significant speedup compared to PyTorch on CPU.

Model info

text-generation optimum
optimum onnx t5 text2text-generation prompt-enhancement ai-art art-generation stable-diffusion text-generation en dataset:art-prompts base_model:Mitchins/t5-base-artgen-multi-instruct
↓ 1 ♥ 0

Created: 2025-09-03

Updated: 2025-09-03

View on Hugging Face

Files (10)

.gitattributes
README.md
added_tokens.json
config.json
decoder_model.onnx ONNX
encoder_model.onnx ONNX
generation_config.json
special_tokens_map.json
spiece.model
tokenizer_config.json

Related models