Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitae1d5dc

Browse files
ursgder-ursleejet
authored
feat: allow LoRAs with negative multiplier (leejet#83)
* Allow Loras with negative weight, too.There are a couple of loras, which serve to adjust certain concepts inboth positive and negative directions (like exposure, detail level etc).The current code rejects them if loaded with a negative weight, but Isuggest that this check can simply be dropped.* ignore lora in the case of multiplier == 0.f---------Co-authored-by: Urs Ganse <urs@nerd2nerd.org>Co-authored-by: leejet <leejet714@gmail.com>
1 parent51b53d4 commitae1d5dc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎stable-diffusion.cpp‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,9 +276,11 @@ std::pair<std::unordered_map<std::string, float>, std::string> extract_and_remov
276276
while (std::regex_search(text, matches, re)) {
277277
std::string filename = matches[1].str();
278278
float multiplier =std::stof(matches[2].str());
279-
if (multiplier <0.f) {
279+
280+
if (multiplier ==0.f) {
280281
continue;
281282
}
283+
282284
if (filename2multiplier.find(filename) == filename2multiplier.end()) {
283285
filename2multiplier[filename] = multiplier;
284286
}else {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp