Archived
radiance 1.6.0
- Qwen-Image 2.1 and 2.1 Turbo: text to image and image edits over OpenAI's images API, /v1/images/generations and /v1/images/edits. An edit takes up to ten pictures and an optional mask, outside which the picture comes back exactly as it was; `background: transparent`, png, jpeg and webp output, `n` pictures from one prompt, streamed previews (`partial_images`), and vLLM-Omni's seed, negative_prompt with true_cfg_scale, num_inference_steps, width and height. arch/qwenimage21 serves the diffusers pipeline directory, converted with data/recipes/qwen-image-2.1-fp8.recipe (block fp8) or qwen-image-2.1-bf16.recipe. deploy/compose/qwen-image-2.1.yaml and qwen-image-2.1-turbo.yaml serve the fp8 containers on two cards. Two R9700s make a 2048x2048 picture in 61 s at the base model's 40 steps and in 13 s with Turbo (56 and 12 s with --tp-wire wht6), a 1024x1024 one in 6.0 and 2.6 s. The models are under Qwen's research license, which is non-commercial - an image generator is a program kind of its own (core/gen): an architecture declares its conditioning, denoising and decoding passes, and the driver runs the schedule, the pictures of a batch and the conditioning cache. An image model's /v1/models entry is its generator's name (qwen-image-2.1, qwen-image-2.1-turbo), and its capabilities and startup banner list only the images endpoints - the tiled prefill GEMMs run their tiles in groups of activation bands, 16 for fp8 and 8 for bf16, so an operand larger than the 64 MB cache is read once a group instead of once a band. A bf16 GEMM with more than 64 MB of weight runs up to twice as fast - fixed: a second lane opened in the middle of a step started beside work lane 0 had not finished. Gemma 4 26B-A4B opens its lane that way, so its first step after startup could read rows not yet written - startup no longer warns about --checkpoint-slots when it was not passed, nor about an expert floor on a model with no experts - the image's FFmpeg writes png, jpeg and webp (libwebp) - for out-of-tree plugins: RAD_ABI_VERSION is 16. The op vocabulary gains the image generator's ops (conv2d_nhwc, ln_mod, ln_mod_quant_fp8, flow_euler, attn_prefix_self and others; docs/OPS.md, "Image generation"), and all_reduce takes an optional `overlap`. Plugins built against 1.5.0 must be rebuilt
This commit is contained in:
1 parent
b93b531f63
commit
b068190326
66 files changed
+9035
-87
No files matched your search
+13
-2
@@ -994,6 +994,14 @@ int Ctx::lane_init() {
|
||||
/* Local: a lane join orders one card's two queues and nothing else reads through it. */
|
||||
for (int i = 0; i < 2; ++i)
|
||||
if (!lane_ev_[i]) RAD_TRY(rad_event_create_local(&lane_ev_[i]));
|
||||
/* A NEW LANE STARTS BEHIND EVERYTHING LANE 0 HAS ISSUED. Its first use is mid-step, and the
|
||||
* join an architecture puts in front of it -- rad_lane_join(0, 1), then rad_lane(1) -- found no
|
||||
* lane 1 to order and returned without doing anything. Unordered, the first op on the new
|
||||
* stream reads lane 0's output before lane 0 has written it: on Qwen-Image's two-rank pass
|
||||
* the first picture after startup took its first all-reduce of stale rows and came out a
|
||||
* different picture, every later one the right one. */
|
||||
RAD_TRY(rad_event_record(lane_ev_[0], stream_));
|
||||
RAD_TRY(rad_event_wait(lane1_, lane_ev_[0]));
|
||||
return RAD_OK;
|
||||
}
|
||||
|
||||
@@ -1008,8 +1016,9 @@ int Ctx::set_lane(int lane) {
|
||||
int Ctx::lane_join(int from, int to) {
|
||||
if (from == to) return RAD_OK;
|
||||
if (from < 0 || from > 1 || to < 0 || to > 1) return RAD_E_INVAL;
|
||||
/* Nothing was ever issued on lane 1, so there is nothing to order against. This is the arm
|
||||
* every unpipelined step takes at the end of run_step, and it must not build a stream. */
|
||||
/* Nothing was ever issued on lane 1, so there is nothing to order against -- and a lane 1
|
||||
* built later starts behind lane 0 (lane_init). This is the arm every unpipelined step takes
|
||||
* at the end of run_step, and it must not build a stream. */
|
||||
if (!lane1_) return RAD_OK;
|
||||
RadStream fs = from ? lane1_ : stream_, ts = to ? lane1_ : stream_;
|
||||
RAD_TRY(rad_event_record(lane_ev_[from], fs));
|
||||
@@ -1025,6 +1034,8 @@ uint64_t Ctx::pass_key(const RadBatch* b) const {
|
||||
/* An encoder pass is shaped by its media, and a pass that carries encoder rows issues the
|
||||
* scatter that puts them in place only when it has some: neither repeats as a tape would. */
|
||||
if (b->enc || b->n_mm_rows > 0) return 0;
|
||||
/* A generator pass is shaped by what RadBatch::gen_b carries, which no key below reads. */
|
||||
if (b->gen) return 0;
|
||||
uint64_t h = 0x9e3779b97f4a7c15ull;
|
||||
auto mix = [&](uint64_t v) {
|
||||
h ^= v + 0x9e3779b97f4a7c15ull + (h << 6) + (h >> 2);
|
||||
|
||||
Reference in new issue
Block a user