Instructions to use neuralvfx/LibreFlux-SAM-ControlNet with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use neuralvfx/LibreFlux-SAM-ControlNet with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("neuralvfx/LibreFlux-SAM-ControlNet", 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
Update README.md
Browse files
README.md
CHANGED
|
@@ -85,16 +85,16 @@ import torch
|
|
| 85 |
from diffusers import DiffusionPipeline
|
| 86 |
from optimum.quanto import freeze, quantize, qint8
|
| 87 |
|
| 88 |
-
model_id = "neuralvfx/LibreFlux-ControlNet"
|
| 89 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 90 |
dtype = torch.bfloat16 if device == "cuda" else torch.float32
|
| 91 |
|
| 92 |
pipe = DiffusionPipeline.from_pretrained(
|
| 93 |
model_id,
|
| 94 |
custom_pipeline=model_id,
|
| 95 |
-
trust_remote_code=True,
|
| 96 |
torch_dtype=dtype,
|
| 97 |
-
safety_checker=None
|
| 98 |
)
|
| 99 |
|
| 100 |
quantize(
|
|
|
|
| 85 |
from diffusers import DiffusionPipeline
|
| 86 |
from optimum.quanto import freeze, quantize, qint8
|
| 87 |
|
| 88 |
+
model_id = "neuralvfx/LibreFlux-ControlNet"
|
| 89 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 90 |
dtype = torch.bfloat16 if device == "cuda" else torch.float32
|
| 91 |
|
| 92 |
pipe = DiffusionPipeline.from_pretrained(
|
| 93 |
model_id,
|
| 94 |
custom_pipeline=model_id,
|
| 95 |
+
trust_remote_code=True,
|
| 96 |
torch_dtype=dtype,
|
| 97 |
+
safety_checker=None
|
| 98 |
)
|
| 99 |
|
| 100 |
quantize(
|