Instructions to use neuralvfx/LibreFlux-IP-Adapter-SAM-ControlNet with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use neuralvfx/LibreFlux-IP-Adapter-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-IP-Adapter-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 Settings
- Draw Things
- DiffusionBee
Update pipeline.py
Browse filesForcing output size to match control image size
- pipeline.py +5 -0
pipeline.py
CHANGED
|
@@ -894,6 +894,11 @@ class LibreFluxIpAdapterPipeline(DiffusionPipeline, SD3LoraLoaderMixin):
|
|
| 894 |
|
| 895 |
inner_module = self.controlnet
|
| 896 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 897 |
control_image = self.prepare_image(
|
| 898 |
image=control_image,
|
| 899 |
width=width,
|
|
|
|
| 894 |
|
| 895 |
inner_module = self.controlnet
|
| 896 |
|
| 897 |
+
width, height = control_image.size
|
| 898 |
+
height = (height//8)*8
|
| 899 |
+
width = (widt//8)*8
|
| 900 |
+
|
| 901 |
+
|
| 902 |
control_image = self.prepare_image(
|
| 903 |
image=control_image,
|
| 904 |
width=width,
|