Socrates-Image-1.0

Socrates-Image-1.0 is a self-contained dense text-to-image model with recurrent visual-semantic feedback. A vision-language Transformer observes an estimated image endpoint, refines a continuous semantic workspace, and feeds the resulting state into the image velocity predictor.

The repository includes the model weights, custom model definition, tokenizer and processor, image autoencoder, scheduler, and runnable inference examples. All model components load locally after downloading the snapshot.

Architecture

At each flow step:

  1. A frozen endpoint pilot predicts a velocity from the current image latent, noise level, and text condition.
  2. The model estimates a clean endpoint using x_hat = z - sigma * v_pilot, decodes it, and builds a 224-pixel visual preview.
  3. The semantic Transformer processes the instruction, preview features, a noise-level token, and eight continuous workspace positions.
  4. The same language Transformer updates the workspace twice, with RMS scale control and damped state updates.
  5. Image tokens read the workspace through a dense residual feedback operator at the image input projection. The image Transformer predicts the final velocity, and an Euler update advances the image latent.

The workspace resets at each flow step. The recurrent component is the semantic language Transformer; the image Transformer is not internally unrolled. The continuous workspace does not emit a textual reasoning trace.

Component Role
velocity_transformer/ Image velocity prediction, approximately 7.115B parameters
semantic_transformer/ Visual-semantic processing, approximately 8.145B parameters
semantic_feedback.safetensors Dense workspace-to-image feedback matrices
pilot_transformer/ Frozen endpoint estimation
condition_encoder/ Frozen original text conditioning
image_autoencoder/ Image/latent conversion
processor/ Tokenizer and vision-language processing configuration
scheduler/ Flow matching Euler scheduler configuration
modeling_socrates_image.py Custom SocratesImageModel implementation

Quick start

Use Python 3.12 with a CUDA-compatible PyTorch installation. Download the complete snapshot before installing its pinned runtime dependencies:

python -m pip install huggingface_hub
hf download mingqiancha233/Socrates-Image-1.0-31B --local-dir ./Socrates-Image-1.0
python -m pip install -r ./Socrates-Image-1.0/requirements.txt
python ./Socrates-Image-1.0/examples/inference.py \
  --model-path ./Socrates-Image-1.0 \
  --prompt "A small observatory on a mountain under a starry sky." \
  --resolution 1024 --steps 40 --seed 42 --output ./sample.png

To let the example download the snapshot itself, replace --model-path with --repo-id mingqiancha233/Socrates-Image-1.0-31B-31B. Use --revision <commit-sha> to pin a repository revision.

Python API

Run from the downloaded model directory:

from modeling_socrates_image import SocratesImageModel

model = SocratesImageModel.from_pretrained(".", device="cuda:0")
image = model.generate(
    "A small observatory on a mountain under a starry sky.",
    resolution=1024,
    num_inference_steps=40,
    seed=42,
)
image.save("sample.png")

This is a custom local Python model. It is not registered for AutoModel.from_pretrained or the generic Diffusers pipeline loader. The example explicitly imports the definition from the downloaded snapshot.

Hardware and supported settings

  • Complete system: approximately 31.48B parameters, including the separate frozen pilot and condition encoder; approximately 62.96 GB of weight files.
  • Default precision: BF16. A 96 GB CUDA GPU is recommended for the current implementation.
  • Measured peak allocated GPU memory was approximately 63.45 GB during the 256×256, four-step smoke validation. This is not a measured 1024-pixel memory requirement.
  • Current entry point: square text-to-image generation, per-device batch size 1, CFG=1, dynamic-shift Euler sampling.
  • Resolution must be a positive multiple of 32; at least two inference steps are required.
  • CPU offload, quantized loading, image editing, and native RGBA output are not exposed by the current entry point.
  • The visual preview and repeated semantic processing add computation at every flow step. No throughput claim is made.

Infrastructure example

A single-GPU Docker example is provided in infra/README.md. It mounts an existing snapshot and writes generated images to a mounted output directory. Building the container does not download the weights.

Release validation

Offline component loading, native prompt encoding, and a 256×256 four-step end-to-end generation smoke test passed. See validation.json and MANIFEST_SHA256.json for the recorded numerical check and file hashes. The included smoke_generation.png is a smoke-test output, not a quality benchmark or a representative gallery.

The current release does not establish a generalization benchmark advantage or interpretable multi-step reasoning. Numerical and deployment checks should not be interpreted as generation-quality measurements.

License and attribution

Built with Qwen and based on Qwen-Image-2.1. Use and redistribution are governed by the included Qwen RESEARCH LICENSE AGREEMENT; see NOTICE for attribution. This release does not grant broader commercial rights than that agreement.

Downloads last month
14
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for mingqiancha233/Socrates-Image-1.0-31B

Finetuned
(82)
this model