Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -26,20 +26,21 @@ def generate(
|
|
| 26 |
output_image_name,
|
| 27 |
verbose
|
| 28 |
):
|
|
|
|
| 29 |
|
| 30 |
if verbose:
|
| 31 |
verbose_opt = '--verbose'
|
| 32 |
else:
|
| 33 |
verbose_opt = ''
|
| 34 |
-
|
|
|
|
| 35 |
if stable_diffusion_model == '2':
|
| 36 |
sd_model = "minecraft-skins"
|
| 37 |
else:
|
| 38 |
sd_model = "minecraft-skins-sdxl"
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
subprocess.run(["python", "$command"])
|
| 43 |
|
| 44 |
return os.path.join(f"output_minecraft_skins/{output_image_name}")
|
| 45 |
|
|
|
|
| 26 |
output_image_name,
|
| 27 |
verbose
|
| 28 |
):
|
| 29 |
+
|
| 30 |
|
| 31 |
if verbose:
|
| 32 |
verbose_opt = '--verbose'
|
| 33 |
else:
|
| 34 |
verbose_opt = ''
|
| 35 |
+
|
| 36 |
+
|
| 37 |
if stable_diffusion_model == '2':
|
| 38 |
sd_model = "minecraft-skins"
|
| 39 |
else:
|
| 40 |
sd_model = "minecraft-skins-sdxl"
|
| 41 |
+
|
| 42 |
+
|
| 43 |
+
subprocess.run(["python", f"Python_Scripts/{sd_model}.py '{prompt}' {num_inference_steps} {guidance_scale} {num_images_per_prompt} {model_precision_type} {output_image_name} {verbose_opt}"])
|
|
|
|
| 44 |
|
| 45 |
return os.path.join(f"output_minecraft_skins/{output_image_name}")
|
| 46 |
|