Instructions to use Shakker-Labs/FLUX.1-Kontext-dev-LoRA-Sketch-Style with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Shakker-Labs/FLUX.1-Kontext-dev-LoRA-Sketch-Style with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.1-Kontext-dev", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("Shakker-Labs/FLUX.1-Kontext-dev-LoRA-Sketch-Style") prompt = "convert this image into sketches" image = pipe(prompt).images[0] - Inference
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
FLUX.1-Kontext-dev-LoRA-Sketch-Style
This is a sketch style LoRA trained on FLUX.1-Kontext-dev by yao.
Showcases

- Prompt
- convert this image into sketches

- Prompt
- convert this image into sketches

- Prompt
- convert this image into sketches
Trigger words
You should use convert real photos into sketches, sketch to trigger the image generation.
Inference
import torch
from diffusers import FluxKontextPipeline
from diffusers.utils import load_image
pipe = FluxKontextPipeline.from_pretrained("black-forest-labs/FLUX.1-Kontext-dev", torch_dtype=torch.bfloat16)
pipe.load_lora_weights("Shakker-Labs/FLUX.1-Kontext-dev-LoRA-Sketch-Style", weight_name="FLUX-kontext-lora-sketch-style.safetensors")
pipe.fuse_lora(lora_scale=1.0)
pipe.to("cuda")
input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png")
prompt = "convert this image into sketches"
image = pipe(
image=input_image,
prompt=prompt,
num_inference_steps=24,
guidance_scale=2.5,
).images[0]
image.save(f"example.png")
Acknowledgements
This model is trained by our copyrighted users yao. We release this model under permissions. The model follows flux-1-dev-non-commercial-license.
- Downloads last month
- 35
Model tree for Shakker-Labs/FLUX.1-Kontext-dev-LoRA-Sketch-Style
Base model
black-forest-labs/FLUX.1-Kontext-dev