Run this model with HF Jobs
Run superdiff/superdiff-sd-v1-4 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/superdiff/superdiff-sd-v1-4. 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/superdiff/superdiff-sd-v1-4 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 superdiff/superdiff-sd-v1-4 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use superdiff/superdiff-sd-v1-4 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("superdiff/superdiff-sd-v1-4", 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
Update pipeline.py
Browse files9 unmodified lines1011121314151616 unmodified lines333435363738394 unmodified lines444546474849502 unmodified lines535455565758599 unmodified linesclass SuperDiffPipeline(DiffusionPipeline, ConfigMixin):"""SuperDiffPipeline."""def __init__(self, unet: Callable, vae: Callable, text_encoder: Callable, scheduler: Callable, tokenizer: Callable, **kwargs) -> None:"""__init__.Parameters16 unmodified linesNone"""print("hello this is a test", flush=True)super().__init__()# Register additional parameters for flexibility# Explicitly assign required components4 unmodified lines#self.scheduler = schedulerdevice = "cuda" if torch.cuda.is_available() else "cpu"print("hello this is a test", flush=True)vae.to(device)unet.to(device)text_encoder.to(device)2 unmodified linesvae=vae,text_encoder=text_encoder,tokenizer=tokenizer,**kwargs)#self.register_to_config(9 unmodified lines1011121314151616 unmodified lines3334353637384 unmodified lines4344454647482 unmodified lines5152535455569 unmodified linesclass SuperDiffPipeline(DiffusionPipeline, ConfigMixin):"""SuperDiffPipeline."""def __init__(self, unet: Callable, vae: Callable, text_encoder: Callable, scheduler: Callable, tokenizer: Callable) -> None:"""__init__.Parameters16 unmodified linesNone"""super().__init__()# Register additional parameters for flexibility# Explicitly assign required components4 unmodified lines#self.scheduler = schedulerdevice = "cuda" if torch.cuda.is_available() else "cpu"vae.to(device)unet.to(device)text_encoder.to(device)2 unmodified linesvae=vae,text_encoder=text_encoder,tokenizer=tokenizer,)#self.register_to_config(
pipeline.py+1-4