Text-to-Image
Diffusers
PyTorch
StableDiffusionPipeline
stable-diffusion
diffusion-models-class
dreambooth-hackathon
science
Instructions to use sanderland/science-sobotta-anatomical-drawings with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use sanderland/science-sobotta-anatomical-drawings with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("sanderland/science-sobotta-anatomical-drawings", dtype=torch.bfloat16, device_map="cuda") prompt = "an anatomical drawing of a bicycle in the style of sbtstyle" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
DreamBooth model for for anatomical drawings
This is a Stable Diffusion model fine-tuned on the sbtstyle concept with DreamBooth. It can be used by modifying the instance_prompt: an anatomical drawing in the style of sbtstyle
This model was created as part of the DreamBooth Hackathon ๐ฅ. Visit the organisation page for instructions on how to take part!
Examples and data
| One of the images used to fine-tune on "an anatomical drawing in the style of sbtstyle" |
One of the images generated by the model " an anatomical drawing of a bicycle in the style of sbtstyle" |
One of the images generated by the model " an anatomical drawing of a horse in the style of sbtstyle" |
|
|
|
Some more examples generated by others:
|
|
Dataset
The full dataset used to train on can be found here: Sanderbaduk/sobotta-anatomical-dataset.
These images and others like it can be found on wikimedia commons.
If you use this directly you will get an error as the raw images have different numbers of channels. Include a grayscale step to fix this and ensure that classic feel.
self.transforms = transforms.Compose(
[
transforms.Resize(size),
transforms.Grayscale(num_output_channels=3),
transforms.CenterCrop(size),
transforms.ToTensor(),
transforms.Normalize([0.5], [0.5]),
]
)
Usage
from diffusers import StableDiffusionPipeline
pipeline = StableDiffusionPipeline.from_pretrained('Sanderbaduk/science-sobotta-anatomical-drawings')
image = pipeline().images[0]
image
- Downloads last month
- 3