Yaron Koresh commited on
Commit
0f96918
·
verified ·
1 Parent(s): 31cf372

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -7
app.py CHANGED
@@ -450,8 +450,8 @@ MAX_SEED = np.iinfo(np.int32).max
450
  # precision data
451
 
452
  seq=512
453
- image_steps=200
454
- img_accu=4.5
455
 
456
  # ui data
457
 
@@ -513,7 +513,7 @@ function custom(){
513
  # torch pipes
514
 
515
  image_pipe = StableDiffusionPipeline.from_pretrained("emilianJR/epiCRealism", torch_dtype=dtype).to(device)
516
- image_pipe.enable_model_cpu_offload()
517
 
518
  torch.cuda.empty_cache()
519
 
@@ -1279,10 +1279,7 @@ def handle_generation(h,w,d):
1279
  d = " ".join(d_lines)
1280
 
1281
  d = re.sub(r"([ \t]){1,}", " ", d).lower().strip()
1282
- if len(d) > 400:
1283
- d = d if d == "" else summarize(translate(d))
1284
- else:
1285
- d = d if d == "" else translate(d)
1286
  d = re.sub(r"([ \t]){1,}", " ", d)
1287
  d = re.sub(r"(\. \.)", ".", d)
1288
 
 
450
  # precision data
451
 
452
  seq=512
453
+ image_steps=300
454
+ img_accu=7.5
455
 
456
  # ui data
457
 
 
513
  # torch pipes
514
 
515
  image_pipe = StableDiffusionPipeline.from_pretrained("emilianJR/epiCRealism", torch_dtype=dtype).to(device)
516
+ #image_pipe.enable_model_cpu_offload()
517
 
518
  torch.cuda.empty_cache()
519
 
 
1279
  d = " ".join(d_lines)
1280
 
1281
  d = re.sub(r"([ \t]){1,}", " ", d).lower().strip()
1282
+ d = d if d == "" else summarize(translate(d))
 
 
 
1283
  d = re.sub(r"([ \t]){1,}", " ", d)
1284
  d = re.sub(r"(\. \.)", ".", d)
1285