File size: 1,449 Bytes
522bf24
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
41
42
43
44
45
46
47
48
49
#!/bin/bash
set -e

# Download eval datasets if not present
EDIT_DATA="data/omni_edit_dev.parquet"
if [ ! -f "$EDIT_DATA" ]; then
    echo "Downloading edit eval dataset..."
    mkdir -p data
    huggingface-cli download wangfuyun/PrompRL data/omni_edit_dev.parquet \
        --repo-type model --local-dir . --local-dir-use-symlinks False
fi

# # Text-to-Image OCR
python unified_inference.py --mode t2i \
    --model_path wangfuyun/PrompRL/promptrl_ocr \
    --model_type flux \
    --prompt_file prompts/ocr_test.txt \
    --output_dir outputs/ocr \
    --use_cot --cot_template ocr_clarity_v2

# # Text-to-Image PS
python unified_inference.py --mode t2i \
    --model_path wangfuyun/PrompRL/promptrl_ps \
    --model_type flux \
    --prompt_file prompts/draw_test.txt \
    --output_dir outputs/pickscore \
    --use_cot --cot_template quality_purev2

# # GenEval
python unified_inference.py --mode geneval \
    --model_path wangfuyun/PrompRL/promptrl_geneval \
    --model_type flux \
    --metadata_file prompts/evaluation_metadata.jsonl \
    --output_dir outputs/geneval \
    --use_cot --cot_template geneval \
    --n_samples 4

# # Image Editing
python unified_inference.py --mode edit \
    --model_path wangfuyun/PrompRL/promptrl_edit \
    --model_type kontext \
    --data_file "$EDIT_DATA" \
    --output_dir outputs/edit \
    --use_cot --cot_template edit_general \
    --guidance_scale 2.5


# python eval.py prompts/config.yaml