Instructions to use ostris/Flex.2-preview with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ostris/Flex.2-preview with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("ostris/Flex.2-preview", 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
- Draw Things
- DiffusionBee
Download link not working?
I'm trying to curl the file directly into the unet directory and whatever is downloading is only a 1.2kb file and not the full model. As I'm typing I'm wondering if it's compressed....
That link links to the download page on huggingface. You have to curl this https://huggingface.co/ostris/Flex.2-preview/resolve/main/Flex.2-preview.safetensors
Yes I'm aware. I right clicked the download button next to the file and selected copy link, when I curl it it downloads a 1.2k file in less than a seconds, and I was expecting to be downloading a 16gb file. when I send "ls -lh" in the unet directory this is the info for the file I get:
-rw-rw-r-- 1 myusername myusername 1.2K May 3 17:38 Flex.2-preview.safetensors
oh wait, just read the link all the way and noticed it's different, thanks,
Hey, actually, I just tried that link and the same thing happened. Download lasted less than a second and the file is only 1.2k. I'm going to try and install huggingface cli.
huggingface-cli was the solution.