Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -29,7 +29,7 @@ os.system(f'{conda_bin}/conda install nvidia/label/cuda-12.4.0::cuda-nvcc')
|
|
| 29 |
#subprocess.run(['pip', 'install', 'git+https://github.com/hidet-org/hidet.git'])
|
| 30 |
#subprocess.run(['pip', 'install', 'git+https://github.com/ford442/hidet.git@thread'])
|
| 31 |
|
| 32 |
-
os.system(f'{conda_bin}/conda install pytorch::pytorch-cuda')
|
| 33 |
#os.system(f'{conda_bin}/conda install rcdr_py37::tensorrt')
|
| 34 |
#subprocess.run(['sh', './hidet.sh'])
|
| 35 |
import hidet
|
|
@@ -51,7 +51,7 @@ import cyper
|
|
| 51 |
from image_gen_aux import UpscaleWithModel
|
| 52 |
import torch
|
| 53 |
import torch._dynamo
|
| 54 |
-
torch._dynamo.list_backends()
|
| 55 |
|
| 56 |
torch.backends.cuda.matmul.allow_tf32 = False
|
| 57 |
torch.backends.cuda.matmul.allow_bf16_reduced_precision_reduction = False
|
|
@@ -372,7 +372,7 @@ def generate_30(
|
|
| 372 |
#uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
| 373 |
batch_options = options.copy()
|
| 374 |
with torch.no_grad():
|
| 375 |
-
torch.compiler.cudagraph_mark_step_begin()
|
| 376 |
rv_image = pipe(**batch_options).images[0]
|
| 377 |
sd_image_path = f"rv_C_{timestamp}.png"
|
| 378 |
rv_image.save(sd_image_path,optimize=False,compress_level=0)
|
|
@@ -422,7 +422,7 @@ def generate_60(
|
|
| 422 |
uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
| 423 |
batch_options = options.copy()
|
| 424 |
with torch.no_grad():
|
| 425 |
-
torch.compiler.cudagraph_mark_step_begin()
|
| 426 |
rv_image = pipe(**batch_options).images[0]
|
| 427 |
sd_image_path = f"rv_C_{timestamp}.png"
|
| 428 |
rv_image.save(sd_image_path,optimize=False,compress_level=0)
|
|
@@ -465,7 +465,7 @@ def generate_90(
|
|
| 465 |
uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
| 466 |
batch_options = options.copy()
|
| 467 |
with torch.no_grad():
|
| 468 |
-
torch.compiler.cudagraph_mark_step_begin()
|
| 469 |
rv_image = pipe(**batch_options).images[0]
|
| 470 |
sd_image_path = f"rv_C_{timestamp}.png"
|
| 471 |
rv_image.save(sd_image_path,optimize=False,compress_level=0)
|
|
|
|
| 29 |
#subprocess.run(['pip', 'install', 'git+https://github.com/hidet-org/hidet.git'])
|
| 30 |
#subprocess.run(['pip', 'install', 'git+https://github.com/ford442/hidet.git@thread'])
|
| 31 |
|
| 32 |
+
#os.system(f'{conda_bin}/conda install pytorch::pytorch-cuda')
|
| 33 |
#os.system(f'{conda_bin}/conda install rcdr_py37::tensorrt')
|
| 34 |
#subprocess.run(['sh', './hidet.sh'])
|
| 35 |
import hidet
|
|
|
|
| 51 |
from image_gen_aux import UpscaleWithModel
|
| 52 |
import torch
|
| 53 |
import torch._dynamo
|
| 54 |
+
#torch._dynamo.list_backends()
|
| 55 |
|
| 56 |
torch.backends.cuda.matmul.allow_tf32 = False
|
| 57 |
torch.backends.cuda.matmul.allow_bf16_reduced_precision_reduction = False
|
|
|
|
| 372 |
#uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
| 373 |
batch_options = options.copy()
|
| 374 |
with torch.no_grad():
|
| 375 |
+
#torch.compiler.cudagraph_mark_step_begin()
|
| 376 |
rv_image = pipe(**batch_options).images[0]
|
| 377 |
sd_image_path = f"rv_C_{timestamp}.png"
|
| 378 |
rv_image.save(sd_image_path,optimize=False,compress_level=0)
|
|
|
|
| 422 |
uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
| 423 |
batch_options = options.copy()
|
| 424 |
with torch.no_grad():
|
| 425 |
+
#torch.compiler.cudagraph_mark_step_begin()
|
| 426 |
rv_image = pipe(**batch_options).images[0]
|
| 427 |
sd_image_path = f"rv_C_{timestamp}.png"
|
| 428 |
rv_image.save(sd_image_path,optimize=False,compress_level=0)
|
|
|
|
| 465 |
uploadNote(prompt,num_inference_steps,guidance_scale,timestamp)
|
| 466 |
batch_options = options.copy()
|
| 467 |
with torch.no_grad():
|
| 468 |
+
#torch.compiler.cudagraph_mark_step_begin()
|
| 469 |
rv_image = pipe(**batch_options).images[0]
|
| 470 |
sd_image_path = f"rv_C_{timestamp}.png"
|
| 471 |
rv_image.save(sd_image_path,optimize=False,compress_level=0)
|