Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ import torch
|
|
5 |
from PIL import Image
|
6 |
import os
|
7 |
|
8 |
-
import spaces
|
9 |
|
10 |
from transformers import CLIPVisionModelWithProjection, CLIPImageProcessor
|
11 |
from kolors.pipelines.pipeline_stable_diffusion_xl_chatglm_256_ipadapter import StableDiffusionXLPipeline
|
@@ -61,7 +61,7 @@ pipe.load_ip_adapter(f'{root_dir}/weights/Kolors-IP-Adapter-Plus', subfolder="",
|
|
61 |
MAX_SEED = np.iinfo(np.int32).max
|
62 |
MAX_IMAGE_SIZE = 1024
|
63 |
|
64 |
-
@spaces.GPU(duration=80)
|
65 |
def infer(prompt, ip_adapter_image, ip_adapter_scale=0.5, negative_prompt="", seed=100, randomize_seed=False, width=1024, height=1024, guidance_scale=5.0, num_inference_steps=50, progress=gr.Progress(track_tqdm=True)):
|
66 |
if randomize_seed:
|
67 |
seed = random.randint(0, MAX_SEED)
|
|
|
5 |
from PIL import Image
|
6 |
import os
|
7 |
|
8 |
+
# import spaces
|
9 |
|
10 |
from transformers import CLIPVisionModelWithProjection, CLIPImageProcessor
|
11 |
from kolors.pipelines.pipeline_stable_diffusion_xl_chatglm_256_ipadapter import StableDiffusionXLPipeline
|
|
|
61 |
MAX_SEED = np.iinfo(np.int32).max
|
62 |
MAX_IMAGE_SIZE = 1024
|
63 |
|
64 |
+
# @spaces.GPU(duration=80)
|
65 |
def infer(prompt, ip_adapter_image, ip_adapter_scale=0.5, negative_prompt="", seed=100, randomize_seed=False, width=1024, height=1024, guidance_scale=5.0, num_inference_steps=50, progress=gr.Progress(track_tqdm=True)):
|
66 |
if randomize_seed:
|
67 |
seed = random.randint(0, MAX_SEED)
|