Update app.py
Browse files
app.py
CHANGED
|
@@ -510,13 +510,13 @@ dict_styles = {
|
|
| 510 |
'Oil Painting':'styles/learned_embeds_oil.bin',
|
| 511 |
}
|
| 512 |
|
| 513 |
-
def inference(prompt, seed, style,num_inference_steps,
|
| 514 |
|
| 515 |
if prompt is not None and style is not None and seed is not None:
|
| 516 |
print(loss_function)
|
| 517 |
style = dict_styles[style]
|
| 518 |
torch.manual_seed(seed)
|
| 519 |
-
result = generate_with_prompt_style_guidance(prompt, style,seed,num_inference_steps,
|
| 520 |
return np.array(result)
|
| 521 |
else:
|
| 522 |
return None
|
|
|
|
| 510 |
'Oil Painting':'styles/learned_embeds_oil.bin',
|
| 511 |
}
|
| 512 |
|
| 513 |
+
def inference(prompt, seed, style,num_inference_steps,loss_function):
|
| 514 |
|
| 515 |
if prompt is not None and style is not None and seed is not None:
|
| 516 |
print(loss_function)
|
| 517 |
style = dict_styles[style]
|
| 518 |
torch.manual_seed(seed)
|
| 519 |
+
result = generate_with_prompt_style_guidance(prompt, style,seed,num_inference_steps, loss_function)
|
| 520 |
return np.array(result)
|
| 521 |
else:
|
| 522 |
return None
|