Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/api/lemonade.md
Original file line number Diff line number Diff line change
Expand Up @@ -772,6 +772,7 @@ This endpoint is not part of the OpenAI API, so it is a Lemonade-specific extens
| `image` | Yes | Base64-encoded input image (optionally a `data:` URL). |
| `resolution` | No | Cascade resolution: `512`, `1024`, or `1536`. Default: `512`. |
| `bg_removal` | No | Background removal mode: `threshold` or `birefnet`. Use `birefnet` for photos with real backgrounds. |
| `uv` | No | UV atlas method: `xatlas` (default) or `box`. `xatlas` runs a full UV unwrap giving every face unique atlas space — best quality, but chart computation is superlinear in face count. `box` is a faster 6-plane projection with occlusion-aware bucket assignment and depth-tested rasterization; small texture artifacts remain possible in concave regions. |
| `seed` | No | Random seed for reproducibility. |
| `response_format` | No | Output encoding. Only formats the backend natively produces are accepted (currently `glb`); other values are rejected with `400 Bad Request`. Default: `glb`. |

Expand Down
6 changes: 3 additions & 3 deletions src/cpp/resources/backend_versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@
"cuda": "v0.1.1"
},
"trellis": {
"vulkan": "v0.1.5",
"rocm-stable": "v0.1.5",
"cuda": "v0.1.5"
"vulkan": "v0.1.6",
"rocm-stable": "v0.1.6",
"cuda": "v0.1.6"
},
"openmoss": {
"vulkan": "v0.1.2",
Expand Down
3 changes: 3 additions & 0 deletions src/cpp/server/backends/trellis/trellis_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,9 @@ void TrellisServer::model_3d_generations(const json& request, httplib::DataSink&
if (request.contains("bg_removal") && request["bg_removal"].is_string()) {
fields.push_back({"bg_removal", request["bg_removal"].get<std::string>(), "", ""});
}
if (request.contains("uv") && request["uv"].is_string()) {
fields.push_back({"uv", request["uv"].get<std::string>(), "", ""});
}

auto fail = [&sink](const std::string& message) {
const std::string payload =
Expand Down
6 changes: 6 additions & 0 deletions src/cpp/server/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3502,6 +3502,12 @@ void Server::handle_3d_generations(const httplib::Request& req, httplib::Respons
if (request_json.contains("seed") && !request_json["seed"].is_number_integer()) {
return reject("'seed' must be an integer");
}
if (request_json.contains("uv")) {
const auto& u = request_json["uv"];
if (!u.is_string() || (u != "box" && u != "xatlas")) {
return reject("'uv' must be 'box' or 'xatlas'");
}
}

std::string requested_model = request_json["model"];
try {
Expand Down
Loading