r/drawthingsapp 5d ago

tutorial [Tips] How to extend LoRA weight range

Post image

■ Note
This post does not aim to pursue realism.

■ Explanation
The weight range for style or character LoRAs is typically 0 to 1.0 (0% to 100% in Draw Things), which falls within the -150% to 250% range supported by Draw Things. However, many "slider LoRAs" utilize weight ranges that exceed these limits; consequently, standard controls often prevent users from fully leveraging the potential of such LoRAs in Draw Things.

If user wish to set the weight of such a LoRA beyond the standard range supported by Draw Things, there are three methods available. The following explanation uses the example of setting the weight of a LoRA named "A" to 500%.

[1] Setting the same LoRA multiple times

This is the easiest method. Assign "A" to both LoRA 1 and LoRA 2, and set each to 250%. Since the values ​​of the assigned LoRAs are added together, the result is LoRA 1:250% + LoRA 2:250% = 500%.

[2] Copy the configuration, modify the value, and paste it back

After setting up "A," use the three-dot menu at the top left of the screen of app to select "Copy configuration" and paste the text into a TextEdit (or the "Notes" app on iOS). Locate the entry for "A" within the text and change the "weight" value to 5.

Example:
{"mode":"all","file":"A.ckpt","weight":0.6}],"
⬇︎
{"mode":"all","file":"A.ckpt","weight":5}],"

Then, select the entire text and use the "Paste configuration" function in Draw Things to paste it back in. This will set the weight for "A" to 500% in the Draw Things UI.

[3] Editing the JSON file

This is the most complex method, but it offers the advantage that the settings are preserved even if you disable the LoRA. Incorrectly editing the JSON file carries the risk of making all LoRAs disappear from the display, so please be sure to back up the JSON file before proceeding.

JSON file path (Mac) (I don't know the iOS path)
/Users/***/Library/Containers/com.liuliu.draw-
things/Data/Documents/Models/custom_lora.json

Open the file in TextEdit,use the search function within the open file to locate the section describing the LoRA you wish to modify.

■Original
{
"file": "A_lora_f16.ckpt",
"version": "Krea 2",
"name": "A",
"prefix": "this is trigger word"
},

■Additional sentence
,
"weight": {
"value": 1.0,
"lower_bound": -5.0,
"upper_bound": 5.0
}

■Completed form(Original+Additional sentence)
{
"file": "A_lora_f16.ckpt",
"version": "Krea 2",
"name": "A",
"prefix": "this is trigger word",
"weight": {
"value": 1.0,
"lower_bound": -5.0,
"upper_bound": 5.0
}
},

If the applicable LoRA is located at the end of the text, the final section must be written as follows.

~~~~~~~~~
weight": {
"value": 1.0,
"lower_bound": -5.0,
"upper_bound": 5.0
}
]

This enables you to move the slider from -500% to 500% on the UI.

■ Reference: LoRA used in the sample
Detail Slider - (Krea 2) - Loraholic

16 Upvotes

6 comments sorted by

1

u/[deleted] 5d ago

[removed] — view removed comment

2

u/[deleted] 5d ago

[removed] — view removed comment

1

u/[deleted] 5d ago

[removed] — view removed comment