Norod78/lego-blip-captions-512
Viewer • Updated • 2.51k • 36 • 3
Run matthew816/pixart-lora-lego on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Use HF Jobs to fine-tune https://huggingface.co/matthew816/pixart-lora-lego. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Use HF Jobs to run batch inference with https://huggingface.co/matthew816/pixart-lora-lego on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
How to use matthew816/pixart-lora-lego with Diffusers:
pip install -U diffusers transformers accelerate
import torch
from diffusers import DiffusionPipeline
# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("PixArt-alpha/PixArt-Sigma-XL-2-1024-MS", dtype=torch.bfloat16, device_map="cuda")
pipe.load_lora_weights("matthew816/pixart-lora-lego")
prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k"
image = pipe(prompt).images[0]This model is a LoRA fine-tuned version of PixArt-alpha/PixArt-Sigma-XL-2-1024-MS on the Norod78/lego-blip-captions-512 dataset for generating lego style images.
from diffusers import PixArtSigmaPipeline
import torch
# Load pipeline
pipe = PixArtSigmaPipeline.from_pretrained(
"PixArt-alpha/PixArt-Sigma-XL-2-1024-MS",
torch_dtype=torch.float16
).to("cuda")
# Load LoRA weights
pipe.load_lora_weights("matthew816/pixart-lora-lego")
# Generate image from text
prompt = "lego style, a cat sitting on a chair"
image = pipe(
prompt=prompt,
num_inference_steps=20,
guidance_scale=4.5
).images[0]
image.save("generated_lego_image.png")
This model generates images in lego style from text descriptions.
Example prompts:
If you use this model, please cite the original PixArt-Σ model and the dataset.
@article{chen2024pixart,
title={PixArt-Σ: Weak-to-Strong Training of Diffusion Transformer for 4K Text-to-Image Generation},
author={Chen, Junsong and others},
journal={arXiv preprint arXiv:2403.04692},
year={2024}
}
Base model
PixArt-alpha/PixArt-Sigma-XL-2-1024-MS