CIG-9B-SFT: image generation via JS code
1 min readupdated
The CIG-9B-SFT model handles text-to-image generation in an unconventional way: it writes a JavaScript program that is then rendered in headless Chrome to produce the final image. Built on Qwen/Qwen3.5-9B (a language model with around 8.95 billion parameters), the project has undergone SFT (supervised fine-tuning). Unlike standard diffusion models, it outputs structured code to draw graphics. This model is ideal for researchers and developers exploring code-based visual content generation.
Key features
- Based on Qwen/Qwen3.5-9B with SFT fine-tuning
- Generates JavaScript code to create images
- Supports the optional `model-mtp.safetensors` file for speculative decoding
- Weights are merged in fp16 format
What you can do
- Generate an image from a text description by running the script
- Use the project repository to set up the environment and headless Chrome
- Compare results with other CIG line versions on the GenEval2 benchmark
Example
python -m grpo.t2i.eval.generate_one --model codeimagegen/CIG-9B-SFT --prompt "a red fox in the snow" --out fox.pngRead more
DetailsBenchmarks: GenEval2 (GM 26.4, AM 57.5)
Precision: fp16, merged weights
Features: includes an optional MTP head for speculative decoding










Comments