Archived
LoRA for image and video generators: - civitai and Hugging Face adapter files as published: kohya, ComfyUI and diffusers/PEFT key names; LoRA, LoCon, LoHa, LoKr and full-weight diffs; DoRA, OFT and Tucker are refused by name - stacked per request with a strength each, through the `loras` field or <lora:name:strength> tags in the prompt; --lora-dir serves every file in a directory, GET /v1/loras lists them, and --max-loras / --max-lora-rank size the slots on the card (generators default to rank 64) - Krea 2, Qwen-Image 2.1, FLUX.3 [klein], MiniMax H3, LTX-2.5, Anima and SDXL New models: - Anima (base, aesthetic and turbo): Cosmos-Predict2 DiT with the Qwen3-0.6B text encoder and the Qwen-Image VAE, on one card - Stable Diffusion XL and its single-file finetunes (Illustrious, NoobAI including V-Pred, Pony), read as civitai ships them, with the Euler, Euler a and DPM++ 2M samplers Recipes: - q38-27b-mxfp4-df2: any bf16 Qwen3.8-27B or finetune at MXFP4 with the DFlash2 drafter - Krea 2 finetunes from civitai: scripts/krea2_native.py reads Krea's own key names, and krea-2-fp8-unscaled keeps a plain-fp8 file's codes exactly Changes: --max-num-batched-tokens defaults to 2048 (was 8192). Plugin ABI 25: out-of-tree plugins must be rebuilt.
48 lines
1.9 KiB
C++
48 lines
1.9 KiB
C++
/* pass.h -- what the engine's pass loop needs of a generator's driver.
|
|
*
|
|
* A generator program is driven by passes rather than token steps (abi/rad_builder.h,
|
|
* rad_declare_generator and rad_declare_audio_generator). Each kind has its own driver, which turns
|
|
* its requests into passes (core/gen/driver.h for images, core/gen/audio_driver.h for audio); the
|
|
* loop that runs them on the ranks is one (Engine::gen_loop). The loop asks for the next pass,
|
|
* runs it on every rank, copies back what the driver names and hands the pass back.
|
|
*/
|
|
#pragma once
|
|
#include "rad_core.h"
|
|
|
|
#include <vector>
|
|
|
|
namespace rad {
|
|
namespace gen {
|
|
|
|
struct IPassDriver {
|
|
/* A device buffer the staged pass leaves for the host: `bytes` from the start of `buf` on
|
|
* rank 0, copied to `host` behind the pass. Every rank holds the same values. */
|
|
struct Readback {
|
|
rad_buf buf = RAD_NULL_HANDLE;
|
|
int64_t bytes = 0;
|
|
void* host = nullptr;
|
|
};
|
|
|
|
virtual ~IPassDriver() = default;
|
|
|
|
/* The next pass, staged on every rank's stream, or null when there is nothing to run.
|
|
* `step` is the engine's pass counter, carried into RadBatch::step. */
|
|
virtual const RadBatch* next(int step) = 0;
|
|
virtual const RadBatch* batch_for(int rank) const = 0;
|
|
/* The runtime LoRA slot every row of the staged pass runs with, -1 for none. */
|
|
virtual int32_t lora_slot() const { return -1; }
|
|
/* What the staged pass's results are, valid until done(). */
|
|
virtual const std::vector<Readback>& readbacks() const = 0;
|
|
/* The pass has run on every rank, its streams are drained and the readbacks have landed. */
|
|
virtual int done() = 0;
|
|
/* Fail every request queued or in flight, and refuse new ones. */
|
|
virtual void shutdown(const char* why, int status) = 0;
|
|
|
|
/* For /health, /stats and the dashboard. */
|
|
virtual int64_t queued() const = 0;
|
|
virtual int64_t running() const = 0;
|
|
};
|
|
|
|
} /* namespace gen */
|
|
} /* namespace rad */
|