Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,16 +10,14 @@ from huggingface_hub import hf_hub_download
|
|
| 10 |
from safetensors.torch import load_file
|
| 11 |
from PIL import Image
|
| 12 |
|
| 13 |
-
MORE = """ ## TRY Other
|
| 14 |
-
### JARVIS: Your VOICE Assistant -> https://huggingface.co/spaces/KingNish/JARVIS
|
| 15 |
### Instant Image: 4k images in 5 Second -> https://huggingface.co/spaces/KingNish/Instant-Image
|
| 16 |
"""
|
| 17 |
|
| 18 |
# Constants
|
| 19 |
-
# Prev Realistic - emilianJR/epiCRealism
|
| 20 |
bases = {
|
| 21 |
"Cartoon": "frankjoshua/toonyou_beta6",
|
| 22 |
-
"Realistic": "
|
| 23 |
"3d": "Lykon/DreamShaper",
|
| 24 |
"Anime": "Yntec/mistoonAnime2"
|
| 25 |
}
|
|
@@ -66,11 +64,7 @@ def generate_image(prompt, base="Realistic", motion="", step=8, progress=gr.Prog
|
|
| 66 |
pipe.set_adapters(["motion"], [0.7])
|
| 67 |
motion_loaded = motion
|
| 68 |
|
| 69 |
-
|
| 70 |
-
def progress_callback(i, t, z):
|
| 71 |
-
progress((i+1, step))
|
| 72 |
-
|
| 73 |
-
output = pipe(prompt=prompt, guidance_scale=1.2, num_inference_steps=step, callback=progress_callback, callback_steps=1)
|
| 74 |
|
| 75 |
name = str(uuid.uuid4()).replace("-", "")
|
| 76 |
path = f"/tmp/{name}.mp4"
|
|
|
|
| 10 |
from safetensors.torch import load_file
|
| 11 |
from PIL import Image
|
| 12 |
|
| 13 |
+
MORE = """ ## TRY Other Demos
|
|
|
|
| 14 |
### Instant Image: 4k images in 5 Second -> https://huggingface.co/spaces/KingNish/Instant-Image
|
| 15 |
"""
|
| 16 |
|
| 17 |
# Constants
|
|
|
|
| 18 |
bases = {
|
| 19 |
"Cartoon": "frankjoshua/toonyou_beta6",
|
| 20 |
+
"Realistic": "emilianJR/epiCRealism",
|
| 21 |
"3d": "Lykon/DreamShaper",
|
| 22 |
"Anime": "Yntec/mistoonAnime2"
|
| 23 |
}
|
|
|
|
| 64 |
pipe.set_adapters(["motion"], [0.7])
|
| 65 |
motion_loaded = motion
|
| 66 |
|
| 67 |
+
output = pipe(prompt=f"{base} image of {prompt}", guidance_scale=1.2, num_inference_steps=step)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
|
| 69 |
name = str(uuid.uuid4()).replace("-", "")
|
| 70 |
path = f"/tmp/{name}.mp4"
|