---
title: refcontrol-flux-kontext-reference-canny-lora
canonical_url: "https://www.modelscope.cn/models/AI-ModelScope/refcontrol-flux-kontext-reference-canny-lora"
md_url: "https://www.modelscope.cn/models/AI-ModelScope/refcontrol-flux-kontext-reference-canny-lora.md"
repository: AI-ModelScope/refcontrol-flux-kontext-reference-canny-lora
last_updated: 2026-06-17
license: apache-2.0
pipeline_tag: image-to-image
tasks:
  - image-to-image
base_model:
  - black-forest-labs/FLUX.1-Kontext-dev
base_model_relation: adapter
parameters: 171.8M
tensor_type:
  - BF16
library_name:
  - lora
  - diffusers
  - safetensors
  - pytorch
frameworks:
  - pytorch
supports_inference: img2img
downloads: 136
stars: 3
tags:
  - text-to-image
  - lora
  - diffusers
  - "template:diffusion-lora"
---

# refcontrol-flux-kontext-reference-canny-lora

> refcontrol-flux-kontext-reference-canny-lora - AI-ModelScope 在 ModelScope 开源的模型。RefControl Flux Kontext – Reference Canny LoRA

AI-ModelScope/refcontrol-flux-kontext-reference-canny-lora 是 ModelScope 魔搭社区上的 171.8M 参数image-to-image模型，采用 apache-2.0 许可，基于 black-forest-labs/FLUX.1-Kontext-dev 构建，并支持在线推理（img2img）。

- **Repository**: AI-ModelScope/refcontrol-flux-kontext-reference-canny-lora
- **License**: apache-2.0
- **Tasks**: image-to-image
- **Parameters**: 171.8M
- **Base model**: black-forest-labs/FLUX.1-Kontext-dev
- **Online inference**: img2img
- **Tags**: text-to-image, lora, diffusers, template:diffusion-lora
- **Downloads**: 136
- **Stars**: 3
- **Last updated**: 2026-06-17

Source: https://www.modelscope.cn/models/AI-ModelScope/refcontrol-flux-kontext-reference-canny-lora

---

# RefControl Flux Kontext – Reference Canny LoRA

## 📝 Short description
A LoRA for **Flux Kontext Dev** that fuses a **reference image** (left) with a **canny edge map** (right).  
It preserves **identity and style** from the reference while following the **edges and outlines** from the control.

**Trigger word:** `refcontrolcanny`


[Demo video](https://youtu.be/T0IH0jT2h8M)

---


## 📊 Examples

| Reference | Result |
|-----------|--------|
| ![ref1](https://huggingface.co/thedeoxen/refcontrol-flux-kontext-reference-canny-lora/resolve/main/examples/1a.png) | ![res1](https://huggingface.co/thedeoxen/refcontrol-flux-kontext-reference-canny-lora/resolve/main/examples/1b.png) |
| ![ref2](https://huggingface.co/thedeoxen/refcontrol-flux-kontext-reference-canny-lora/resolve/main/examples/2a.png) | ![res2](https://huggingface.co/thedeoxen/refcontrol-flux-kontext-reference-canny-lora/resolve/main/examples/2b.png) |
| ![ref3](https://huggingface.co/thedeoxen/refcontrol-flux-kontext-reference-canny-lora/resolve/main/examples/5a.png) | ![res3](https://huggingface.co/thedeoxen/refcontrol-flux-kontext-reference-canny-lora/resolve/main/examples/5b.png) |

---

## 📖 Extended description
This LoRA was primarily trained on **humans and characters**, but it works with objects and scenes as well.  
The main purpose is to **preserve identity** — facial features, clothing, style — from the **reference image**, while using the **canny edge map** to define contours, composition, and layout.

---

## ⚙️ How to use
1. Concatenate two images side by side:  
   - **Left:** reference image (person, character, or object).  
   - **Right:** canny edges (line structure).  
2. Add the trigger word `refcontrolcanny` in your prompt.  
3. Adjust LoRA weight (recommended **0.8–1.0**) depending on how strictly you want to follow edges.  

### ✅ Example prompt
refcontrolcanny, change canny edges to photo with reference from left

---

## 🎯 What it does
- Preserves **style and identity** of the reference.  
- Uses **canny edges** to control structure, outline, and composition.  
- Produces consistent results across different poses and layouts.  

---

## ⚡ Tips
- Works best if the canny map captures **clean edges** with minimal noise.  

---

## 📌 Use cases
- Character consistency in illustrations and comics.  
- Stylized redraws of objects with sharp outlines.  
- Scene composition based on silhouettes.  
- Rapid prototyping of layouts and storyboards.  

---
