Instructions to use tlwu/tiny-random-flux with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use tlwu/tiny-random-flux with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("tlwu/tiny-random-flux", 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
This pipeline is intended for debugging or testing. It is saved from black-forest-labs/FLUX.1-dev with smaller size and randomly initialized parameters.
Example Usage
import torch
from diffusers import FluxPipeline
pipe = FluxPipeline.from_pretrained("tlwu/tiny-random-flux", torch_dtype=torch.bfloat16)
prompt = "a tree with blue leaves"
image = pipe(
prompt,
height=1024,
width=1024,
guidance_scale=3.5,
num_inference_steps=50,
max_sequence_length=512,
generator=torch.Generator("cpu").manual_seed(0)
).images[0]
image.save("test.png")
- Downloads last month
- 40