Spaces:
Runtime error
Runtime error
Commit
β’
21f9f22
1
Parent(s):
8755573
Update app.py
Browse files
app.py
CHANGED
@@ -33,7 +33,7 @@ pipe = StableDiffusionPipeline.from_pretrained(
|
|
33 |
ip_model = IPAdapterFaceID(pipe, ip_ckpt, device)
|
34 |
|
35 |
@spaces.GPU
|
36 |
-
def generate_image(images, prompt, negative_prompt):
|
37 |
pipe.to(device)
|
38 |
app = FaceAnalysis(name="buffalo_l", providers=['CUDAExecutionProvider', 'CPUExecutionProvider'])
|
39 |
app.prepare(ctx_id=0, det_size=(640, 640))
|
@@ -52,8 +52,11 @@ def generate_image(images, prompt, negative_prompt):
|
|
52 |
)
|
53 |
print(image)
|
54 |
return image
|
55 |
-
|
|
|
|
|
56 |
demo = gr.Interface(
|
|
|
57 |
fn=generate_image,
|
58 |
inputs=[
|
59 |
gr.Files(
|
|
|
33 |
ip_model = IPAdapterFaceID(pipe, ip_ckpt, device)
|
34 |
|
35 |
@spaces.GPU
|
36 |
+
def generate_image(images, prompt, negative_prompt, progress=gr.Progress(track_tqdm=True)):
|
37 |
pipe.to(device)
|
38 |
app = FaceAnalysis(name="buffalo_l", providers=['CUDAExecutionProvider', 'CPUExecutionProvider'])
|
39 |
app.prepare(ctx_id=0, det_size=(640, 640))
|
|
|
52 |
)
|
53 |
print(image)
|
54 |
return image
|
55 |
+
css = '''
|
56 |
+
h1{margin-bottom: 0 !important}
|
57 |
+
'''
|
58 |
demo = gr.Interface(
|
59 |
+
css=css,
|
60 |
fn=generate_image,
|
61 |
inputs=[
|
62 |
gr.Files(
|