Views
No views yet
| Panel | Size | Role | Result |
|---|---|---|---|
| Fragile60 | 60 single words | Validation / model selection | 52 / 60 (single-word gold soup567) |
| Compound Eval28 | 28 images · 168 words | Validation / model selection | 4 errors / 168 → 97.6% |
| Held-out Test28 | 28 images · 168 words | Reported once, after the checkpoint was frozen | 3 errors / 168 → 98.2% |
| Scene / material / slant probe | 28 images · 168 words | Qualitative robustness probe | 10 errors / 168 → 94.0% |
attention.qkvattention.ofeed_forward.w1feed_forward.w2feed_forward.w3adaln_modulationstep-soup.safetensors — the training-format checkpoint, standard LoRA scale alpha/rank
(64/64 = 1.0). Use this for further fine-tuning or checkpoint averaging.step-soup_infer.safetensors — the same adapter converted for an inference wrapper that
applies alpha/sqrt(rank) (= 8.0), with lora_B pre-divided by 8 so the effective delta is
identical. Training used standard LoRA alpha/rank; this is a format conversion, not an
rsLoRA training result.1import torch
2import json
3from diffsynth.core import ModelConfig
4from diffsynth.pipelines.ideogram4 import Ideogram4Pipeline
5
6# 1. Define model directory paths (make sure to download FP8 Ideogram4 components)
7model_dir = "models/ideogram-ai/ideogram-4-fp8"
8lora_ckpt = "step-soup_infer.safetensors" # Downloaded from this repository
9
10# 2. Initialize Pipeline
11pipe = Ideogram4Pipeline.from_pretrained(
12 model_dir,
13 torch_dtype=torch.bfloat16,
14 device="cuda"
15)
16
17# 3. Inject LoRA weights into DiT
18from hybrid_peft_ideogram4 import inject_lora_into_dit, load_lora_checkpoint
19inject_lora_into_dit(
20 pipe.dit,
21 targets=["attention.qkv", "attention.o", "feed_forward.w1", "feed_forward.w2", "feed_forward.w3", "adaln_modulation"],
22 rank=64,
23 alpha=64.0
24)
25load_lora_checkpoint(pipe.dit, lora_ckpt)
26
27# 4. Build prompt utilizing layout-aware no-bbox description
28prompt_json = json.dumps({
29 "high_level_description": 'Vietnamese calligraphy artwork of the phrase "An Khang Thịnh Vượng" in traditional brush style. The text is written in Vietnamese alphabet.',
30 "style_description": {
31 "art_style": "calligraphy",
32 "ink_color": "black",
33 "brush_style": "Traditional Vietnamese brush calligraphy, bold and elegant strokes",
34 "writing_surface": "Plain white rice-paper background, no texture, no border"
35 },
36 "compositional_deconstruction": {
37 "background": "Plain white rice-paper background, no texture, no border.",
38 "elements": [{
39 "type": "text",
40 "text": "An Khang\nThịnh Vượng",
41 "desc": "Traditional Vietnamese calligraphy characters arranged in a tidy grid of several stacked rows, multiple words per row, evenly spaced and centered, written in bold black ink brush strokes. Font: Thanh Cong Unicode.",
42 }],
43 },
44}, ensure_ascii=False)
45
46# 5. Run Generation
47image = pipe(
48 prompt=prompt_json,
49 cfg_scale=7.0,
50 num_inference_steps=48,
51 seed=7000
52)
53image.save("vietnamese_calligraphy_output.png")1@mastersthesis{dopt2026vietnamesecalligraphy,
2 author = {Đỗ Tuấn Phong},
3 title = {Fine-tuning Qwen-Image for Generating Vietnamese Calligraphy Images},
4 school = {FPT University},
5 address = {Hanoi, Vietnam},
6 year = {2026},
7 type = {{M.Sc.}},
8 month = jun,
9 note = {MSE-AI program}
10}