Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -22,12 +22,12 @@ def plex(img, cook, one, two, three):
|
|
22 |
negative_prior_prompt = "lowres,text,bad quality,low quality,jpeg artifacts,ugly,bad hands,bad face,blurry,bad eyes,watermark,signature"
|
23 |
img_emb = pope_prior(prompt=prompt, guidance_scale=0.85, num_inference_steps=5, generator=generator)
|
24 |
negative_emb = pope_prior(prompt=negative_prior_prompt, guidance_scale=1, num_inference_steps=5, generator=generator)
|
25 |
-
imags = pope(image_embeds=img_emb.image_embeds,negative_image_embeds=negative_emb.image_embeds,num_inference_steps=
|
26 |
images_texts = [cook, goof, imags]
|
27 |
weights = [one, two, three]
|
28 |
primpt = ""
|
29 |
prior_out = pope_prior.interpolate(images_texts, weights, num_inference_steps=5)
|
30 |
-
imas = pope(**prior_out, height=512, width=512, num_inference_steps=
|
31 |
return imas
|
32 |
|
33 |
iface = gr.Interface(fn=plex,inputs=[gr.Image(label="drop", type="filepath"), gr.Textbox(label="prompt"), gr.Slider(label="Text Guide",minimum=0.01,step=0.01,maximum=0.99,value=0.5), gr.Slider(label="Your Image Guide",minimum=0.01,step=0.01,maximum=0.99,value=0.5),gr.Slider(label="Generated Image Guide",minimum=0.01,step=0.01,maximum=0.99,value=0.3)], outputs=gr.Image(), title="Ksky22 Cntrl Gdd Interp", description="ksky22 Cntrl Gdd Interp")
|
|
|
22 |
negative_prior_prompt = "lowres,text,bad quality,low quality,jpeg artifacts,ugly,bad hands,bad face,blurry,bad eyes,watermark,signature"
|
23 |
img_emb = pope_prior(prompt=prompt, guidance_scale=0.85, num_inference_steps=5, generator=generator)
|
24 |
negative_emb = pope_prior(prompt=negative_prior_prompt, guidance_scale=1, num_inference_steps=5, generator=generator)
|
25 |
+
imags = pope(image_embeds=img_emb.image_embeds,negative_image_embeds=negative_emb.image_embeds,num_inference_steps=5,generator=generator,height=512,width=512,).images[0]
|
26 |
images_texts = [cook, goof, imags]
|
27 |
weights = [one, two, three]
|
28 |
primpt = ""
|
29 |
prior_out = pope_prior.interpolate(images_texts, weights, num_inference_steps=5)
|
30 |
+
imas = pope(**prior_out, height=512, width=512, num_inference_steps=5).images[0]
|
31 |
return imas
|
32 |
|
33 |
iface = gr.Interface(fn=plex,inputs=[gr.Image(label="drop", type="filepath"), gr.Textbox(label="prompt"), gr.Slider(label="Text Guide",minimum=0.01,step=0.01,maximum=0.99,value=0.5), gr.Slider(label="Your Image Guide",minimum=0.01,step=0.01,maximum=0.99,value=0.5),gr.Slider(label="Generated Image Guide",minimum=0.01,step=0.01,maximum=0.99,value=0.3)], outputs=gr.Image(), title="Ksky22 Cntrl Gdd Interp", description="ksky22 Cntrl Gdd Interp")
|