Route clothing choices through clothing seed
This commit is contained in:
@@ -3059,16 +3059,17 @@ def row_base(index: int, batch: int, subject: str, age: str, body: str, scene_sl
|
||||
}
|
||||
|
||||
|
||||
def make_single(index: int, batch: int, rng: random.Random, gender: str, expr_deck: ExpressionDeck, clothing: str = "full", ethnicity: str = "any", poses: str = "standard", backside_bias: float = 0.0, figure: str = "curvy", no_plus: bool = False, no_black: bool = False) -> dict:
|
||||
def make_single(index: int, batch: int, rng: random.Random, gender: str, expr_deck: ExpressionDeck, clothing: str = "full", ethnicity: str = "any", poses: str = "standard", backside_bias: float = 0.0, figure: str = "curvy", no_plus: bool = False, no_black: bool = False, clothing_rng: random.Random | None = None) -> dict:
|
||||
minimal = clothing == "minimal"
|
||||
wardrobe_rng = clothing_rng or rng
|
||||
if gender == "woman":
|
||||
subject, age, body, skin, hair, eyes = choose_woman(rng, ethnicity, no_plus, no_black)
|
||||
clothes = choose(rng, WOMEN_CLOTHES_MINIMAL if minimal else WOMEN_CLOTHES)
|
||||
clothes = choose(wardrobe_rng, WOMEN_CLOTHES_MINIMAL if minimal else WOMEN_CLOTHES)
|
||||
figure_note = choose(rng, figure_pool(figure))
|
||||
else:
|
||||
men_pool = by_ethnicity(MEN, ethnicity)
|
||||
subject, age, body, skin, hair, eyes = choose(rng, men_pool)
|
||||
clothes = choose(rng, MEN_CLOTHES_MINIMAL if minimal else MEN_CLOTHES)
|
||||
clothes = choose(wardrobe_rng, MEN_CLOTHES_MINIMAL if minimal else MEN_CLOTHES)
|
||||
figure_note = ""
|
||||
body_phrase = make_body_phrase(body, figure_note)
|
||||
|
||||
@@ -3119,7 +3120,7 @@ def make_single(index: int, batch: int, rng: random.Random, gender: str, expr_de
|
||||
return row
|
||||
|
||||
|
||||
def make_couple(index: int, batch: int, rng: random.Random, expr_deck: ExpressionDeck, clothing: str = "full", ethnicity: str = "any", no_plus: bool = False) -> dict:
|
||||
def make_couple(index: int, batch: int, rng: random.Random, expr_deck: ExpressionDeck, clothing: str = "full", ethnicity: str = "any", no_plus: bool = False, clothing_rng: random.Random | None = None) -> dict:
|
||||
primary_subject, subject_phrase, pose = choose(rng, COUPLE_TYPES)
|
||||
if ethnicity == "asian":
|
||||
subject_phrase = {
|
||||
@@ -3140,7 +3141,7 @@ def make_couple(index: int, batch: int, rng: random.Random, expr_deck: Expressio
|
||||
if no_plus:
|
||||
body_options = [b for b in body_options if "plus" not in b and "fat" not in b]
|
||||
body = choose(rng, body_options)
|
||||
outfits = choose(rng, COUPLE_OUTFITS_MINIMAL if clothing == "minimal" else COUPLE_OUTFITS)
|
||||
outfits = choose(clothing_rng or rng, COUPLE_OUTFITS_MINIMAL if clothing == "minimal" else COUPLE_OUTFITS)
|
||||
expr_a, expr_b = expr_deck.draw_two()
|
||||
|
||||
row = row_base(index, batch, primary_subject, ages, body, scene_slug, composition)
|
||||
@@ -3164,7 +3165,7 @@ def make_couple(index: int, batch: int, rng: random.Random, expr_deck: Expressio
|
||||
return row
|
||||
|
||||
|
||||
def make_group_or_layout(index: int, batch: int, rng: random.Random, expr_deck: ExpressionDeck, clothing: str = "full", ethnicity: str = "any", no_plus: bool = False) -> dict:
|
||||
def make_group_or_layout(index: int, batch: int, rng: random.Random, expr_deck: ExpressionDeck, clothing: str = "full", ethnicity: str = "any", no_plus: bool = False, clothing_rng: random.Random | None = None) -> dict:
|
||||
minimal = clothing == "minimal"
|
||||
group_outfits = "minimal beachwear and lingerie-inspired outfits" if minimal else "stylish revealing party outfits"
|
||||
if ethnicity == "asian":
|
||||
@@ -3203,7 +3204,7 @@ def make_group_or_layout(index: int, batch: int, rng: random.Random, expr_deck:
|
||||
)
|
||||
return row
|
||||
|
||||
layout_slug, layout_desc = choose(rng, LAYOUTS_MINIMAL if minimal else LAYOUTS_FULL)
|
||||
layout_slug, layout_desc = choose(clothing_rng or rng, LAYOUTS_MINIMAL if minimal else LAYOUTS_FULL)
|
||||
if ethnicity == "asian":
|
||||
layout_desc = layout_desc.replace("adult", "Asian adult")
|
||||
elif ethnicity == "white_asian":
|
||||
|
||||
Reference in New Issue
Block a user