Spaces:
Running
on
Zero
Running
on
Zero
| export MODEL_DIR="/robby/share/Editing/lzc/FLUX.1-Kontext-dev" # your flux path | |
| export OUTPUT_DIR="/robby/share/Editing/lzc/EasyControl_kontext_edge_test_hed" # your save path | |
| export CONFIG="./default_config.yaml" | |
| export TRAIN_DATA="/robby/share/MM/zkc/data/i2i_csv/pexel_Qwen2_5VL7BInstruct.csv " # your data jsonl file | |
| export LOG_PATH="$OUTPUT_DIR/log" | |
| CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7 accelerate launch --config_file $CONFIG train_kontext_edge.py \ | |
| --pretrained_model_name_or_path $MODEL_DIR \ | |
| --lora_num=1 \ | |
| --cond_size=512 \ | |
| --ranks 128 \ | |
| --network_alphas 128 \ | |
| --output_dir=$OUTPUT_DIR \ | |
| --logging_dir=$LOG_PATH \ | |
| --mixed_precision="bf16" \ | |
| --train_data_dir=$TRAIN_DATA \ | |
| --learning_rate=1e-4 \ | |
| --train_batch_size=1 \ | |
| --num_train_epochs=1 \ | |
| --validation_steps=500 \ | |
| --checkpointing_steps=1000 \ | |
| --validation_images "./kontext_edge_test/img_1.png" "./kontext_edge_test/img_2.png" "" "" "./kontext_edge_test/img_3.png" \ | |
| --spatial_test_images "./kontext_edge_test/edge_1.png" "./kontext_edge_test/edge_2.png" "./kontext_edge_test/edge_1.png" "./kontext_edge_test/edge_2.png" "./kontext_edge_test/edge_3.png" \ | |
| --validation_prompt "The cake was cut off a piece" "Let this black woman wearing a transparent sunglasses" "This image shows a beautifully decorated cake with golden-orange sides and white frosting on top, and a piece of cake is being cut. The cake is displayed on a rustic wooden slice that serves as a cake stand." "This is a striking portrait photograph featuring a person wearing an ornate golden crown and a heart-shape sunglasses. The subject has dramatic golden metallic eyeshadow that extends across their eyelids, complementing the warm tones of the crown." "move the cup to the left" \ | |
| --num_validation_images=1 | |