Instructions to use zweifisch/sdxs-512-0.9-fp16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use zweifisch/sdxs-512-0.9-fp16 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("zweifisch/sdxs-512-0.9-fp16", 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
Download demo.py from zweifisch/sdxs-512-0.9-fp16: direct link, hf CLI and curl.
- Browser
- Download file 720 Bytes
-
https://huggingface.co/zweifisch/sdxs-512-0.9-fp16/resolve/main/demo.py
- Command line
-
hf download hf://zweifisch/sdxs-512-0.9-fp16/demo.py
-
curl -L -o demo.py https://huggingface.co/zweifisch/sdxs-512-0.9-fp16/resolve/main/demo.py
720 Bytes
| import torch | |
| from diffusers import StableDiffusionPipeline, AutoencoderKL | |
| repo = "IDKiro/sdxs-512-0.9" | |
| seed = 42 | |
| weight_type = torch.float32 | |
| # Load model. | |
| pipe = StableDiffusionPipeline.from_pretrained(repo, torch_dtype=weight_type) | |
| # pipe.vae = AutoencoderKL.from_pretrained("IDKiro/sdxs-512-0.9/vae_large") # use original VAE | |
| pipe.to("cuda") | |
| prompt = "portrait photo of a girl, photograph, highly detailed face, depth of field, moody light, golden hour" | |
| # Ensure using the same inference steps as the loaded model and CFG set to 0. | |
| image = pipe( | |
| prompt, | |
| num_inference_steps=1, | |
| guidance_scale=0, | |
| generator=torch.Generator(device="cuda").manual_seed(seed) | |
| ).images[0] | |
| image.save("output.png") | |