Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,17 +7,16 @@ import torch
|
|
| 7 |
|
| 8 |
|
| 9 |
model_id = "helenai/Linaqruf-anything-v3.0-ov"
|
| 10 |
-
negative_prompt = "score_6,score_5,score_4,source_furry,pathway,walkway,face mask,heterochromia,tattoos,muscular,deformed iris,deformed pupils,long body,long neck,text,error,print,signature,logo,watermark,deformed,distorted,disfigured,bad anatomy,wrong anatomy,ugly,disgusting,cropped,crooked teeth,multiple views,bad proportions,gross proportions,cloned face,worst quality,low quality,normal quality,bad quality,lowres,poorly drawn,semi-realistic,3d,render,cg,cgi,imperfect,partial,unfinished,incomplete,monochrome,grayscale,sepia,fat,wrinkle,fat leg,fat ass,loli,blurry,hazy,sagging breasts,loli,child,longbody,lowres,bad anatomy,bad hands,missing fingers,extra digit,fewer digits,worst quality,low quality,normal quality,watermark,artist name,signature,"
|
| 11 |
|
| 12 |
pipe = OVStableDiffusionPipeline.from_pretrained(model_id, compile=False)
|
| 13 |
pipe.reshape( batch_size=1, height=256, width=256, num_images_per_prompt=1)
|
| 14 |
pipe.compile()
|
| 15 |
|
| 16 |
-
def infer(prompt
|
| 17 |
|
| 18 |
image = pipe(
|
| 19 |
prompt = prompt,
|
| 20 |
-
negative_prompt =
|
| 21 |
width = 256,
|
| 22 |
height = 256,
|
| 23 |
).images[0]
|
|
@@ -69,7 +68,7 @@ with gr.Blocks(css=css) as demo:
|
|
| 69 |
|
| 70 |
run_button.click(
|
| 71 |
fn = infer,
|
| 72 |
-
inputs = [prompt
|
| 73 |
outputs = [result]
|
| 74 |
)
|
| 75 |
|
|
|
|
| 7 |
|
| 8 |
|
| 9 |
model_id = "helenai/Linaqruf-anything-v3.0-ov"
|
|
|
|
| 10 |
|
| 11 |
pipe = OVStableDiffusionPipeline.from_pretrained(model_id, compile=False)
|
| 12 |
pipe.reshape( batch_size=1, height=256, width=256, num_images_per_prompt=1)
|
| 13 |
pipe.compile()
|
| 14 |
|
| 15 |
+
def infer(prompt):
|
| 16 |
|
| 17 |
image = pipe(
|
| 18 |
prompt = prompt,
|
| 19 |
+
negative_prompt = "score_6,score_5,score_4,source_furry,pathway,walkway,face mask,heterochromia,tattoos,muscular,deformed iris,deformed pupils,long body,long neck,text,error,print,signature,logo,watermark,deformed,distorted,disfigured,bad anatomy,wrong anatomy,ugly,disgusting,cropped,crooked teeth,multiple views,bad proportions,gross proportions,cloned face,worst quality,low quality,normal quality,bad quality,lowres,poorly drawn,semi-realistic,3d,render,cg,cgi,imperfect,partial,unfinished,incomplete,monochrome,grayscale,sepia,fat,wrinkle,fat leg,fat ass,loli,blurry,hazy,sagging breasts,loli,child,longbody,lowres,bad anatomy,bad hands,missing fingers,extra digit,fewer digits,worst quality,low quality,normal quality,watermark,artist name,signature,",
|
| 20 |
width = 256,
|
| 21 |
height = 256,
|
| 22 |
).images[0]
|
|
|
|
| 68 |
|
| 69 |
run_button.click(
|
| 70 |
fn = infer,
|
| 71 |
+
inputs = [prompt],
|
| 72 |
outputs = [result]
|
| 73 |
)
|
| 74 |
|