Views
No views yet

┌─────────────────────────────────────┐
│ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ │ Green areas
│ ░░░┌───────────────────────┐░░░░░░░ │ get filled
│ ░░░│ │░░░░░░░ │ with matching
│ ░░░│ Original Image │░░░░░░░ │ content
│ ░░░│ │░░░░░░░ │
│ ░░░└───────────────────────┘░░░░░░░ │
│ ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ │
└─────────────────────────────────────┘| Input (with green border) | Output (extended image) |
|---|---|
![]() | ![]() |
![]() | ![]() |
![]() | ![]() |
![]() | ![]() |
Fill the green spaces according to the image1import fal_client
2
3def on_queue_update(update):
4 if isinstance(update, fal_client.InProgress):
5 for log in update.logs:
6 print(log["message"])
7
8result = fal_client.subscribe(
9 "fal-ai/flux-2/klein/4b/base/edit/lora",
10 arguments={
11 "prompt": "Fill the green spaces according to the image",
12 "model_name": None,
13 "loras": [{
14 "path": "https://huggingface.co/fal/flux-2-klein-4B-outpaint-lora/resolve/main/flux-outpaint-lora.safetensors",
15 "scale": 1.1
16 }],
17 "embeddings": [],
18 "image_urls": ["https://your-image-with-green-border.png"]
19 },
20 with_logs=True,
21 on_queue_update=on_queue_update,
22)
23print(result)| File | Use Case |
|---|---|
flux-outpaint-lora.safetensors | fal.ai |
LyNiaZ53Tudg0J6sT8Xbx_pytorch_lora_weights_comfy_converted.safetensors | ComfyUI |