Archived
radiance 1.8.1
- MiniMax-H3 and FastH3 no longer stop the server on a prompt longer than 16 tokens (FastH3) or 128 tokens (MiniMax-H3) - latent upscaling for the MiniMax-H3 containers: with LBH-123-AI's latent upscaler in the container, `latent_upscale` runs the first steps at a smaller size and refines the latent at the full size; `upscale_refine_steps` sets how many steps refine, and the video object reports both - rad-convert --in-place extends a container whose weights the plugin has regrouped since - plugin ABI 22: out-of-tree plugins must be rebuilt
This commit is contained in:
1 parent
7a7707a955
commit
816e24bd46
43 files changed
+4458
-81
No files matched your search
@@ -59,6 +59,11 @@ struct FakeVideoGen : IVideoGen {
|
||||
t.sample_rate = 32000;
|
||||
t.channels = 2;
|
||||
t.fps = 24.0;
|
||||
if (r->upscale > 1.0) {
|
||||
t.small_width = (int32_t)(r->width / r->upscale) / 32 * 32;
|
||||
t.small_height = (int32_t)(r->height / r->upscale) / 32 * 32;
|
||||
t.refine = r->refine > 0 ? r->refine : (int32_t)inf.upscale_refine;
|
||||
}
|
||||
if (finish_status == RAD_OK) {
|
||||
for (int s = 1; s <= 2; ++s) {
|
||||
gen::VideoEvent e;
|
||||
@@ -204,6 +209,47 @@ TEST(the_generator_gets_the_size_the_chunks_and_the_steps) {
|
||||
v.wait(str_at(json::parse(r.body, nullptr, false), "id"));
|
||||
}
|
||||
|
||||
/* Latent upscaling: refused by a model without an upscaler; with one, the factor and the refine
|
||||
* steps reach the generator, a factor of 1 is none, and the refine steps need a factor. */
|
||||
TEST(latent_upscale_reaches_the_generator_where_the_model_has_an_upscaler) {
|
||||
Videos v;
|
||||
CHECK_EQ(v.refused(Videos::body({ { "latent_upscale", 2 } })), std::string("latent_upscale"));
|
||||
v.gen.inf.upscale_max = 4.0;
|
||||
v.gen.inf.upscale_refine = 3;
|
||||
CHECK_EQ(v.refused(Videos::body({ { "latent_upscale", 4.5 } })), std::string("latent_upscale"));
|
||||
CHECK_EQ(v.refused(Videos::body({ { "latent_upscale", 0.5 } })), std::string("latent_upscale"));
|
||||
CHECK_EQ(v.refused(Videos::body({ { "upscale_refine_steps", 2 } })),
|
||||
std::string("upscale_refine_steps"));
|
||||
CHECK_EQ(v.refused(Videos::body({ { "latent_upscale", 2 }, { "upscale_refine_steps", 1.5 } })),
|
||||
std::string("upscale_refine_steps"));
|
||||
HttpResponse r = v.create(Videos::body({ { "size", "512x512" }, { "latent_upscale", "2" },
|
||||
{ "upscale_refine_steps", 4 } }));
|
||||
REQUIRE_EQ(r.status, 200);
|
||||
CHECK_EQ(v.gen.last().upscale, 2.0);
|
||||
CHECK_EQ(v.gen.last().refine, 4);
|
||||
/* The video object says how it was made, at creation and when it is fetched. */
|
||||
json o = json::parse(r.body, nullptr, false);
|
||||
CHECK_EQ(o["latent_upscale"].get<double>(), 2.0);
|
||||
CHECK_EQ(o["upscale_refine_steps"].get<int>(), 4);
|
||||
CHECK_EQ(str_at(o, "upscale_from"), std::string("256x256"));
|
||||
json done = v.wait(str_at(o, "id"));
|
||||
CHECK_EQ(str_at(done, "upscale_from"), std::string("256x256"));
|
||||
/* Without refine steps named, the generator's default is what the object reports. */
|
||||
r = v.create(Videos::body({ { "size", "512x512" }, { "latent_upscale", 2 } }));
|
||||
REQUIRE_EQ(r.status, 200);
|
||||
o = json::parse(r.body, nullptr, false);
|
||||
CHECK_EQ(o["upscale_refine_steps"].get<int>(), 3);
|
||||
v.wait(str_at(o, "id"));
|
||||
r = v.create(Videos::body({ { "latent_upscale", 1 } }));
|
||||
REQUIRE_EQ(r.status, 200);
|
||||
CHECK_EQ(v.gen.last().upscale, 0.0);
|
||||
CHECK_EQ(v.gen.last().refine, 0);
|
||||
o = json::parse(r.body, nullptr, false);
|
||||
CHECK(!o.contains("latent_upscale") && !o.contains("upscale_refine_steps") &&
|
||||
!o.contains("upscale_from"));
|
||||
v.wait(str_at(o, "id"));
|
||||
}
|
||||
|
||||
/* A form is read as JSON's fields are (OpenAI's clients send the create call as one). */
|
||||
TEST(a_form_creates_a_video_too) {
|
||||
Videos v;
|
||||
|
||||
Reference in new issue
Block a user