If anyone wanted to set size in pixels, then there is how you do it:
var is = get_node("sprite").get_texture().get_size() #image size
var th = 50 #target height
var tw = 100 #target width
var scale = Vector2((is.x/(is.x/tw))/50, (is.y/(is.y/th))/50)
Somehow while those /50
, should be logically /100
, they shouldn't. For me, it made the sprites twice as small, so when setting /50
it was perfect. Might be different for you.