mirror of
https://github.com/leejet/stable-diffusion.cpp.git
synced 2026-11-11 11:26:34 +00:00
feat(server): add recipe constraints and update generation workspace (#2217)
This commit is contained in:
1 parent
012c7f8866
commit
e41fbcf455
88 files changed
+339
-24
No files matched your search
@@ -379,8 +379,13 @@ namespace sd {
|
||||
if (target == ImageTarget::Mask && has_init_transform_) {
|
||||
auto options = resolve_options(target, index);
|
||||
if (image.width != init_transform_.source_width || image.height != init_transform_.source_height) {
|
||||
fail("mask and init source dimensions must match");
|
||||
return {};
|
||||
ImagePreprocessor alignment;
|
||||
tensor = alignment.apply_geometry(tensor, target, index, init_transform_.source_width, init_transform_.source_height,
|
||||
ImageResizeMode::CropResize, ops::InterpolateMode::NearestExact);
|
||||
if (tensor.empty()) {
|
||||
fail("could not align mask to init source dimensions");
|
||||
return {};
|
||||
}
|
||||
}
|
||||
bool geometry_override = options.count("width") || options.count("anchor") ||
|
||||
(options.count("mode") && options.at("mode") != "auto");
|
||||
|
||||
Reference in new issue
Block a user