Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -5,13 +5,13 @@ import inversion
|
|
5 |
import numpy as np
|
6 |
from PIL import Image
|
7 |
import sa_handler
|
8 |
-
import spaces
|
9 |
|
10 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
11 |
scheduler = DDIMScheduler(beta_start=0.00085, beta_end=0.012, beta_schedule="scaled_linear", clip_sample=False, set_alpha_to_one=False)
|
12 |
pipeline = StableDiffusionXLPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16, variant="fp16", use_safetensors=True, scheduler=scheduler).to(device)
|
13 |
|
14 |
-
@spaces.GPU
|
15 |
def run(image, src_style, src_prompt, prompts, shared_score_shift, shared_score_scale, guidance_scale, num_inference_steps, seed, large=True):
|
16 |
prompts = prompts.splitlines()
|
17 |
dim, d = (1024, 128) if large else (512, 64)
|
|
|
5 |
import numpy as np
|
6 |
from PIL import Image
|
7 |
import sa_handler
|
8 |
+
# import spaces
|
9 |
|
10 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
11 |
scheduler = DDIMScheduler(beta_start=0.00085, beta_end=0.012, beta_schedule="scaled_linear", clip_sample=False, set_alpha_to_one=False)
|
12 |
pipeline = StableDiffusionXLPipeline.from_pretrained("stabilityai/stable-diffusion-xl-base-1.0", torch_dtype=torch.float16, variant="fp16", use_safetensors=True, scheduler=scheduler).to(device)
|
13 |
|
14 |
+
# @spaces.GPU
|
15 |
def run(image, src_style, src_prompt, prompts, shared_score_shift, shared_score_scale, guidance_scale, num_inference_steps, seed, large=True):
|
16 |
prompts = prompts.splitlines()
|
17 |
dim, d = (1024, 128) if large else (512, 64)
|