Run this model with HF Jobs
Run lambda/sd-naruto-diffusers 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:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/lambda/sd-naruto-diffusers. 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.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/lambda/sd-naruto-diffusers 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.
Instructions to use lambda/sd-naruto-diffusers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use lambda/sd-naruto-diffusers with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("lambda/sd-naruto-diffusers", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Create README.md
Browse files123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869---language: - enthumbnail: "https://staticassetbucket.s3.us-west-1.amazonaws.com/outputv2_grid.png"tags:- stable-diffusion- stable-diffusion-diffusers- text-to-imagedatasets:- lambdalabs/naruto-blip-captions---
__Stable Diffusion fine tuned on Naruto by [Lambda Labs](https://lambdalabs.com/).__
Put in a text prompt and generate your own Naruto character, no "prompt engineering" required!
If you want to find out how to train your own Stable Diffusion variants, see this [example](https://github.com/LambdaLabsML/examples/tree/main/stable-diffusion-finetuning) from Lambda Labs.
> "Bill Gates with a hoodie", "John Oliver with Naruto style", "Hello Kitty with Naruto style", "Lebron James with a hat", "Mickael Jackson as a ninja", "Banksy Street art of ninja"
## Usage
```bash!pip install diffusers==0.3.0!pip install transformers scipy ftfy```
```pythonimport torchfrom diffusers import StableDiffusionPipelinefrom torch import autocast
pipe = StableDiffusionPipeline.from_pretrained("lambdalabs/sd-naruto-diffusers", torch_dtype=torch.float16) pipe = pipe.to("cuda")
prompt = "Yoda"scale = 10n_samples = 4
# Sometimes the nsfw checker is confused by the Naruto images, you can disable# it at your own risk heredisable_safety = False
if disable_safety: def null_safety(images, **kwargs): return images, False pipe.safety_checker = null_safety
with autocast("cuda"): images = pipe(n_samples*[prompt], guidance_scale=scale).images
for idx, im in enumerate(images): im.save(f"{idx:06}.png")```
## Model description
Trained on [BLIP captioned Pokémon images](https://huggingface.co/datasets/lambdalabs/naruto-blip-captions) using 2xA6000 GPUs on [Lambda GPU Cloud](https://lambdalabs.com/service/gpu-cloud) for around 30,000 step (about 12 hours, at a cost of about $20).
## Links
- [Lambda Diffusers](https://github.com/LambdaLabsML/lambda-diffusers)- [Captioned Naruto dataset](https://huggingface.co/datasets/lambdalabs/naruto-blip-captions)- [Model weights in Diffusers format](https://huggingface.co/lambdalabs/sd-naruto-diffusers)- [Original model weights](https://huggingface.co/justinpinkney/pokemon-stable-diffusion)- [Training code](https://github.com/justinpinkney/stable-diffusion)
Trained by Eole Cervenka after the work of [Justin Pinkney](justinpinkney.com) ([@Buntworthy](https://twitter.com/Buntworthy)) at [Lambda Labs](https://lambdalabs.com/).README.mdAdded+69