Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -49,9 +49,9 @@ pipe = QwenImagePipeline.from_pretrained(
|
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
-
speedup = hf_hub_download(repo_id="witcherderivia/Qwen-Image-Style-Transfer", filename="diffsynth_Qwen-Image-Edit-2509-Lightning-4steps-V1.0-bf16.safetensors")
|
| 53 |
-
qwenstyle= hf_hub_download(repo_id="witcherderivia/Qwen-Image-Style-Transfer", filename="diffusers_Qwen-Image-Edit-2509-Style-Transfer-V1.safetensors")
|
| 54 |
|
|
|
|
|
|
|
| 55 |
|
| 56 |
|
| 57 |
|
|
@@ -105,7 +105,7 @@ def infer(
|
|
| 105 |
|
| 106 |
|
| 107 |
content_text_input='describe main objects (fewer than 3) with separated words, each word is separated by comma, the total number of words is strictly fewer than 3'
|
| 108 |
-
style_text_input='describe only the artistic style, material and stroke in 5 words, not objects.'
|
| 109 |
#pipe.text_encoder.eval()
|
| 110 |
content_prompt=''
|
| 111 |
style_prompt=''
|
|
@@ -385,7 +385,18 @@ with gr.Blocks() as demo:
|
|
| 385 |
gr.Markdown("changing the minedge could lead to different style similarity.")
|
| 386 |
default_prompt='Style Transfer the style of Figure 2 to Figure 1, and keep the content and characteristics of Figure 1.'
|
| 387 |
gr.Examples(examples=[
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 388 |
['./qwenstyleref/pulpfiction_2.jpg','./qwenstyleref/styleref=6_style_ref.png',default_prompt,123,False,1.0,4,832],
|
|
|
|
| 389 |
['./qwenstyleref/styleref=0_content_ref.png','./qwenstyleref/110.png',default_prompt,123,False,1.0,4,832],
|
| 390 |
['./qwenstyleref/romanholiday_1.jpg','./qwenstyleref/s0099____1113_01_query_1_img_000146_1682705733350_08158389675901344.jpg.jpg',default_prompt,123,False,1.0,4,800],
|
| 391 |
['./qwenstyleref/styleref=0_content_ref.png','./qwenstyleref/125.png',default_prompt,123,False,1.0,4,832],
|
|
@@ -397,6 +408,7 @@ with gr.Blocks() as demo:
|
|
| 397 |
['./qwenstyleref/styleref=0_content_ref.png','./qwenstyleref/Jotarokujo.webp',default_prompt,123,False,1.0,4,832],
|
| 398 |
['./qwenstyleref/wallstreet1.jpg','./qwenstyleref/034.png',default_prompt,123,False,1.0,4,1024],
|
| 399 |
['./qwenstyleref/bird.jpeg','./qwenstyleref/styleref=s0539.png',default_prompt,123,False,1.0,4,832],
|
|
|
|
| 400 |
|
| 401 |
|
| 402 |
|
|
@@ -409,6 +421,7 @@ with gr.Blocks() as demo:
|
|
| 409 |
true_guidance_scale,
|
| 410 |
num_inference_steps,
|
| 411 |
minedge,
|
|
|
|
| 412 |
],
|
| 413 |
outputs=[result, seed, content_prompt, style_prompt,prompt],
|
| 414 |
fn=infer,
|
|
|
|
| 49 |
|
| 50 |
|
| 51 |
|
|
|
|
|
|
|
| 52 |
|
| 53 |
+
qwenstyle= hf_hub_download(repo_id="Tele-AI/TeleStyleV2", filename="diffusers-TeleStyleV2-QIE-2509-Lora-bf16.safetensors")
|
| 54 |
+
speedup = hf_hub_download(repo_id="Tele-AI/TeleStyleV2", filename="QIE-2509-Lightning-4steps-V1.0-bf16.safetensors")
|
| 55 |
|
| 56 |
|
| 57 |
|
|
|
|
| 105 |
|
| 106 |
|
| 107 |
content_text_input='describe main objects (fewer than 3) with separated words, each word is separated by comma, the total number of words is strictly fewer than 3'
|
| 108 |
+
style_text_input='describe only the artistic style, material and stroke, lighting, color in 5 words, not objects.'
|
| 109 |
#pipe.text_encoder.eval()
|
| 110 |
content_prompt=''
|
| 111 |
style_prompt=''
|
|
|
|
| 385 |
gr.Markdown("changing the minedge could lead to different style similarity.")
|
| 386 |
default_prompt='Style Transfer the style of Figure 2 to Figure 1, and keep the content and characteristics of Figure 1.'
|
| 387 |
gr.Examples(examples=[
|
| 388 |
+
['./qwenstyleref/content_1.webp','./qwenstyleref/style_1.jpg',default_prompt,123,False,1.0,4,1024,[]],
|
| 389 |
+
['./qwenstyleref/content_6.jpg','./qwenstyleref/style_6.png',default_prompt,123,False,1.0,4,1024,[]],
|
| 390 |
+
['./qwenstyleref/style_6.png','./qwenstyleref/content_6.jpg','',123,False,1.0,4,1024,["infer with style prompt"]],
|
| 391 |
+
['./qwenstyleref/content_3.png','./qwenstyleref/style_3.png',default_prompt,123,False,1.0,4,1024,[]],
|
| 392 |
+
['./qwenstyleref/content_4.png','./qwenstyleref/style_4.png',default_prompt,123,False,1.0,4,1024,[]],
|
| 393 |
+
['./qwenstyleref/content_9.jpg','./qwenstyleref/style_9.png',default_prompt,123,False,1.0,4,1024,[]],
|
| 394 |
+
['./qwenstyleref/content_11.png','./qwenstyleref/style_11.jpg',default_prompt,123,False,1.0,4,832,[]],
|
| 395 |
+
['./qwenstyleref/content_7.png','./qwenstyleref/content_4.png',default_prompt,123,False,1.0,4,1024,[]],
|
| 396 |
+
'''
|
| 397 |
+
|
| 398 |
['./qwenstyleref/pulpfiction_2.jpg','./qwenstyleref/styleref=6_style_ref.png',default_prompt,123,False,1.0,4,832],
|
| 399 |
+
|
| 400 |
['./qwenstyleref/styleref=0_content_ref.png','./qwenstyleref/110.png',default_prompt,123,False,1.0,4,832],
|
| 401 |
['./qwenstyleref/romanholiday_1.jpg','./qwenstyleref/s0099____1113_01_query_1_img_000146_1682705733350_08158389675901344.jpg.jpg',default_prompt,123,False,1.0,4,800],
|
| 402 |
['./qwenstyleref/styleref=0_content_ref.png','./qwenstyleref/125.png',default_prompt,123,False,1.0,4,832],
|
|
|
|
| 408 |
['./qwenstyleref/styleref=0_content_ref.png','./qwenstyleref/Jotarokujo.webp',default_prompt,123,False,1.0,4,832],
|
| 409 |
['./qwenstyleref/wallstreet1.jpg','./qwenstyleref/034.png',default_prompt,123,False,1.0,4,1024],
|
| 410 |
['./qwenstyleref/bird.jpeg','./qwenstyleref/styleref=s0539.png',default_prompt,123,False,1.0,4,832],
|
| 411 |
+
'''
|
| 412 |
|
| 413 |
|
| 414 |
|
|
|
|
| 421 |
true_guidance_scale,
|
| 422 |
num_inference_steps,
|
| 423 |
minedge,
|
| 424 |
+
checkbox
|
| 425 |
],
|
| 426 |
outputs=[result, seed, content_prompt, style_prompt,prompt],
|
| 427 |
fn=infer,
|