Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -36,13 +36,13 @@ def run_inference(prompt, stable_diffusion_model, num_inference_steps, guidance_
|
|
| 36 |
if model_3d:
|
| 37 |
image_path = os.path.join(f"output_minecraft_skins/{filename}")
|
| 38 |
image = Image.open(image_path)
|
| 39 |
-
image = image.resize(
|
| 40 |
image.save(image_path)
|
| 41 |
return image_path, os.path.join(f"output_minecraft_skins/{filename}_3d_model.glb")
|
| 42 |
else:
|
| 43 |
image_path = os.path.join(f"output_minecraft_skins/{filename}")
|
| 44 |
image = Image.open(image_path)
|
| 45 |
-
image = image.resize(
|
| 46 |
image.save(image_path)
|
| 47 |
return image_path, None
|
| 48 |
|
|
|
|
| 36 |
if model_3d:
|
| 37 |
image_path = os.path.join(f"output_minecraft_skins/{filename}")
|
| 38 |
image = Image.open(image_path)
|
| 39 |
+
image = image.resize(resample=Image.NEAREST) # Use nearest neighbor interpolation
|
| 40 |
image.save(image_path)
|
| 41 |
return image_path, os.path.join(f"output_minecraft_skins/{filename}_3d_model.glb")
|
| 42 |
else:
|
| 43 |
image_path = os.path.join(f"output_minecraft_skins/{filename}")
|
| 44 |
image = Image.open(image_path)
|
| 45 |
+
image = image.resize(resample=Image.NEAREST) # Use nearest neighbor interpolation
|
| 46 |
image.save(image_path)
|
| 47 |
return image_path, None
|
| 48 |
|