load loras
Browse files
app.py
CHANGED
@@ -121,6 +121,8 @@ def process(
|
|
121 |
resized_image = image.resize((width, height), Image.LANCZOS)
|
122 |
resized_mask = mask.resize((width, height), Image.LANCZOS)
|
123 |
|
|
|
|
|
124 |
if randomize_seed_checkbox:
|
125 |
seed_slicer = random.randint(0, MAX_SEED)
|
126 |
generator = torch.Generator().manual_seed(seed_slicer)
|
@@ -132,7 +134,8 @@ def process(
|
|
132 |
height=height,
|
133 |
strength=strength_slider,
|
134 |
generator=generator,
|
135 |
-
num_inference_steps=num_inference_steps_slider
|
|
|
136 |
).images[0]
|
137 |
print('INFERENCE DONE')
|
138 |
return result, resized_mask
|
|
|
121 |
resized_image = image.resize((width, height), Image.LANCZOS)
|
122 |
resized_mask = mask.resize((width, height), Image.LANCZOS)
|
123 |
|
124 |
+
pipe.load_lora_weights("jiuface/boy-001", weight_name="flux_train_replicate.safetensors")
|
125 |
+
lora_scale = 0.8
|
126 |
if randomize_seed_checkbox:
|
127 |
seed_slicer = random.randint(0, MAX_SEED)
|
128 |
generator = torch.Generator().manual_seed(seed_slicer)
|
|
|
134 |
height=height,
|
135 |
strength=strength_slider,
|
136 |
generator=generator,
|
137 |
+
num_inference_steps=num_inference_steps_slider,
|
138 |
+
joint_attention_kwargs={"scale": lora_scale},
|
139 |
).images[0]
|
140 |
print('INFERENCE DONE')
|
141 |
return result, resized_mask
|