Spaces:
Runtime error
Runtime error
Added spaces
Browse files- app.py +2 -0
- requirements.txt +1 -0
app.py
CHANGED
|
@@ -4,6 +4,7 @@ from injection_utils import regiter_attention_editor_diffusers
|
|
| 4 |
from bounded_attention import BoundedAttention
|
| 5 |
from pytorch_lightning import seed_everything
|
| 6 |
|
|
|
|
| 7 |
import gradio as gr
|
| 8 |
import torch
|
| 9 |
import numpy as np
|
|
@@ -61,6 +62,7 @@ def inference(
|
|
| 61 |
return model(prompts, latents=start_code, guidance_scale=classifier_free_guidance_scale).images
|
| 62 |
|
| 63 |
|
|
|
|
| 64 |
def generate(
|
| 65 |
device,
|
| 66 |
model,
|
|
|
|
| 4 |
from bounded_attention import BoundedAttention
|
| 5 |
from pytorch_lightning import seed_everything
|
| 6 |
|
| 7 |
+
import spaces
|
| 8 |
import gradio as gr
|
| 9 |
import torch
|
| 10 |
import numpy as np
|
|
|
|
| 62 |
return model(prompts, latents=start_code, guidance_scale=classifier_free_guidance_scale).images
|
| 63 |
|
| 64 |
|
| 65 |
+
@spaces.GPU
|
| 66 |
def generate(
|
| 67 |
device,
|
| 68 |
model,
|
requirements.txt
CHANGED
|
@@ -20,3 +20,4 @@ torchvision==0.15.2
|
|
| 20 |
tqdm==4.66.1
|
| 21 |
transformers==4.32.0
|
| 22 |
xformers==0.0.21
|
|
|
|
|
|
| 20 |
tqdm==4.66.1
|
| 21 |
transformers==4.32.0
|
| 22 |
xformers==0.0.21
|
| 23 |
+
spaces==0.24.2
|