Spaces:
Sleeping
Sleeping
Commit
·
d9c3c15
1
Parent(s):
07a1e16
change path on server
Browse files
model.py
CHANGED
@@ -29,6 +29,7 @@ from rgb2x.pipeline_rgb2x import StableDiffusionAOVMatEstPipeline
|
|
29 |
from app_texnet import image_to_temp_path
|
30 |
import os
|
31 |
import time
|
|
|
32 |
|
33 |
CONTROLNET_MODEL_IDS = {
|
34 |
# "Openpose": "lllyasviel/control_v11p_sd15_openpose",
|
@@ -320,7 +321,8 @@ class Model:
|
|
320 |
metallic_path = image_to_temp_path(preds[2].rotate(90), "metallic")
|
321 |
prompt_nospace = prompt.replace(' ', '_')
|
322 |
current_timecode = time.strftime("%Y%m%d_%H%M%S")
|
323 |
-
output_blend_path = os.path.join(os.getcwd(), "output", f"{obj_name}_{prompt_nospace}_{current_timecode}.blend") # replace with desired output path
|
|
|
324 |
os.makedirs(os.path.dirname(output_blend_path), exist_ok=True)
|
325 |
|
326 |
def run_blend_generation(
|
|
|
29 |
from app_texnet import image_to_temp_path
|
30 |
import os
|
31 |
import time
|
32 |
+
import tempfile
|
33 |
|
34 |
CONTROLNET_MODEL_IDS = {
|
35 |
# "Openpose": "lllyasviel/control_v11p_sd15_openpose",
|
|
|
321 |
metallic_path = image_to_temp_path(preds[2].rotate(90), "metallic")
|
322 |
prompt_nospace = prompt.replace(' ', '_')
|
323 |
current_timecode = time.strftime("%Y%m%d_%H%M%S")
|
324 |
+
# output_blend_path = os.path.join(os.getcwd(), "output", f"{obj_name}_{prompt_nospace}_{current_timecode}.blend") # replace with desired output path
|
325 |
+
output_blend_path = os.path.join(tempfile.mkdtemp(), f"{obj_name}_{prompt_nospace}_{current_timecode}.blend") # replace with desired output path
|
326 |
os.makedirs(os.path.dirname(output_blend_path), exist_ok=True)
|
327 |
|
328 |
def run_blend_generation(
|