Image-to-Image
Diffusers
Safetensors
image-decomposition
layered-image-editing
diffusion
flux
lora
transparent-rgba
Instructions to use SynLayers/synlayers with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use SynLayers/synlayers with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("fill-in-base-model", dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("SynLayers/synlayers") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
File size: 1,121 Bytes
ae62478 209d166 ae62478 209d166 ae62478 209d166 ae62478 209d166 ae62478 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | # Main real-world inference configuration
seed: 42
max_layer_num: 52
# Size configuration
source_size: 1024
target_size: 1024
# Real-world inference defaults
data_dir: "demo/outputs/real_world_demo"
image_dir: "demo/outputs/real_world_demo/layers_real_test_1024"
test_jsonl: "demo/outputs/real_world_demo/caption_bbox_infer.jsonl"
# Model paths
pretrained_model_name_or_path: "SynLayers_checkpoints/FLUX.1-dev"
pretrained_adapter_path: "SynLayers_checkpoints/FLUX.1-dev-Controlnet-Inpainting-Alpha"
transp_vae_path: "ckpt/trans_vae/0008000.pt"
# Pre-trained LoRA weights
pretrained_lora_dir: "ckpt/pre_trained_LoRA"
artplus_lora_dir: "ckpt/prism_ft_LoRA"
# unified real-world decomposition checkpoint
lora_ckpt: "SynLayers_ckpt/step_120000/transformer"
layer_ckpt: "SynLayers_ckpt/step_120000"
adapter_lora_dir: "SynLayers_ckpt/step_120000/adapter"
# Inference settings
cfg: 4.0
adapter_scale: 0.9
max_sequence_length: 1024
save_dir: "demo/outputs/real_world_demo/results"
#run_name: "step_120000" # optional manual override
# Sample range control (1-based indexing)
start_idx: 1
#end_idx: 147
#max_samples: 147
|