Spaces:
Paused
Paused
Update app_quant_latent.py
Browse files- app_quant_latent.py +7 -9
app_quant_latent.py
CHANGED
|
@@ -688,8 +688,6 @@ def generate_image_all_latents(prompt, height, width, steps, seed, guidance_scal
|
|
| 688 |
yield placeholder, latent_gallery, LOGS
|
| 689 |
|
| 690 |
# this is astable vesopn tha can gen final and a noise to latent
|
| 691 |
-
|
| 692 |
-
|
| 693 |
@spaces.GPU
|
| 694 |
def generate_image(prompt, height, width, steps, seed, guidance_scale=0.0):
|
| 695 |
LOGS = []
|
|
@@ -736,12 +734,12 @@ def generate_image(prompt, height, width, steps, seed, guidance_scale=0.0):
|
|
| 736 |
yield None, latent_gallery, LOGS
|
| 737 |
|
| 738 |
# Upload latents
|
| 739 |
-
latent_dict = {"latents": latents.cpu(), "prompt": prompt, "seed": seed}
|
| 740 |
-
try:
|
| 741 |
-
|
| 742 |
-
|
| 743 |
-
except Exception as e:
|
| 744 |
-
|
| 745 |
|
| 746 |
except Exception as e:
|
| 747 |
LOGS.append(f"⚠️ Latent generation failed: {e}")
|
|
@@ -773,7 +771,7 @@ def generate_image(prompt, height, width, steps, seed, guidance_scale=0.0):
|
|
| 773 |
|
| 774 |
|
| 775 |
|
| 776 |
-
# this is astable vesopn tha can gen final and a noise to latent
|
| 777 |
@spaces.GPU
|
| 778 |
def generate_image_safe(prompt, height, width, steps, seed, guidance_scale=0.0):
|
| 779 |
LOGS = []
|
|
|
|
| 688 |
yield placeholder, latent_gallery, LOGS
|
| 689 |
|
| 690 |
# this is astable vesopn tha can gen final and a noise to latent
|
|
|
|
|
|
|
| 691 |
@spaces.GPU
|
| 692 |
def generate_image(prompt, height, width, steps, seed, guidance_scale=0.0):
|
| 693 |
LOGS = []
|
|
|
|
| 734 |
yield None, latent_gallery, LOGS
|
| 735 |
|
| 736 |
# Upload latents
|
| 737 |
+
#latent_dict = {"latents": latents.cpu(), "prompt": prompt, "seed": seed}
|
| 738 |
+
# try:
|
| 739 |
+
# hf_url = upload_latents_to_hf(latent_dict, filename=f"latents_{seed}.pt")
|
| 740 |
+
# LOGS.append(f"🔹 Latents uploaded: {hf_url}")
|
| 741 |
+
# except Exception as e:
|
| 742 |
+
# LOGS.append(f"⚠️ Failed to upload latents: {e}")
|
| 743 |
|
| 744 |
except Exception as e:
|
| 745 |
LOGS.append(f"⚠️ Latent generation failed: {e}")
|
|
|
|
| 771 |
|
| 772 |
|
| 773 |
|
| 774 |
+
# this is astable vesopn tha can gen final and a noise to latent with latent upload to repo
|
| 775 |
@spaces.GPU
|
| 776 |
def generate_image_safe(prompt, height, width, steps, seed, guidance_scale=0.0):
|
| 777 |
LOGS = []
|