Files
project_6/upstream_ref/xllm/xllm/proto/image_generation.proto
EX Engine 002f9879b2 ref(upstream): FULL TREE — Deep-Spark xllm (1470) + ds_vllm csrc/models (703)
Replaces cherry-picked upstream_ref with complete source trees.

xllm/ — Iluvatar official C++ inference engine (15MB, 1470 files)
  Complete: kernels → layers → models → runtime → scheduler → api
  Excluded: .git, binary images, third_party submodule checkouts

ds_vllm/ — Iluvatar official vllm fork (8MB, 703 files)
  Included: csrc/ (ALL CUDA kernels), fused_moe/, qwen3_5 model, _custom_ops
  Excluded: tests, benchmarks, docs, examples (not needed for reference)

Critical call chains now fully traceable:
  MoE: moe_topk_softmax_kernels.cuh → ixformer.h → fused_moe.cpp → layer
  GDN: qwen3_gated_delta_net_base.cpp → qwen3_5_gated_delta_net.cpp
  Attention: ixformer.h → xllm_paged_attention → attention.cpp
2026-08-10 02:54:03 +00:00

149 lines
3.8 KiB
Protocol Buffer

syntax = "proto3";
option go_package = "jd.com/jd-infer/xllm;xllm";
package xllm.proto;
import "common.proto";
import "tensor.proto";
// Input parameters container
message Input {
// Primary input text description for image generation
string prompt = 1;
// Secondary prompt for additional details (e.g., color, lighting)
optional string prompt_2 = 2;
// Negative prompt to exclude low-quality features
optional string negative_prompt = 3;
// Secondary negative prompt to exclude additional unwanted features
optional string negative_prompt_2 = 4;
// prompt embedding
optional Tensor prompt_embed = 5;
// pooled prompt embeddings
optional Tensor pooled_prompt_embed = 6;
// negative prompt embedding: [num_prompts][embedding_dim]
optional Tensor negative_prompt_embed = 7;
//pooled negative prompt embedding
optional Tensor negative_pooled_prompt_embed = 8;
// initial latent: [batch_size][channels][height/8][width/8]
optional Tensor latent = 9;
// Input type: "base64"
optional string image = 10;
// Input type: "base64"
optional string mask_image = 11;
// An image batch of mask images generated by the VAE
optional Tensor masked_image_latent = 12;
// Control Image
optional string control_image = 13;
// Condition Image
optional string condition_image = 14;
}
// Generation parameters container
message Parameters {
// Size of the generated image in pixels, default in 1024*1024
optional string size = 1;
// Number of inference steps for image generation
optional int32 num_inference_steps = 2;
// True CFG scale value for balancing generation
optional float true_cfg_scale = 3;
// Guidance scale value for prompt adherence
optional float guidance_scale = 4;
// Number of images to generate per prompt
optional int32 num_images_per_prompt = 5;
// Random seed value for image generation
optional int64 seed = 6;
// Maximum sequence length for prompt processing
optional int32 max_sequence_length = 7;
// The extent to which the reference image is altered, between 0 and 1
optional float strength = 8;
// Array of sigma values for noise scheduling
// repeated float sigmas = 9;
// Enable CFG renormalization for improved stability
optional bool enable_cfg_renorm = 10;
// Minimum value for CFG renorm scale
optional float cfg_renorm_min = 11;
// Output type, either "base64" or "url"
// optional string output_type = 12;
}
// Request structure for image generation tasks using FLUX models
message ImageGenerationRequest {
// ID of the FLUX text-to-image model to use. Currently supported values are "flux-schnell" and "flux-dev".
string model = 1;
Input input = 2;
Parameters parameters = 3;
// Unique identifier representing the end-user
optional string user = 4;
// ID used by server to identify the request for tracking and troubleshooting
optional string request_id = 5;
}
// Individual image generation result data
message ImageGenData {
optional string image = 1;
// Width of the generated image in pixels
int32 width = 3;
// Height of the generated image in pixels
int32 height = 4;
// Seed used for generating this image
int64 seed = 5;
}
// Output container for image generation task results
message ImageGenerationOutput {
// List of generated image data
repeated ImageGenData results = 1;
}
// Response structure for image generation requests
message ImageGenerationResponse {
// The ID of the response.
string id = 1;
// The object type of the image response.
// [default = "list"]
string object = 2;
// The Unix timestamp of when the embedding response was created.
int64 created = 3;
// The model used to generate the embedding response.
string model = 4;
// Contains task details and generation results
ImageGenerationOutput output = 5;
}