Spaces:
Running
on
Zero
Running
on
Zero
update
Browse files- hf_demo.py +2 -2
- hf_demo_test.ipynb +1 -0
hf_demo.py
CHANGED
@@ -46,7 +46,7 @@ def demo_inference_gen(adapter_choice:str, prompt:str, samples:int=1,seed:int=0,
|
|
46 |
height=512, width=512, scales=[1.0],
|
47 |
save_dir=None, seed=seed,steps=steps, guidance_scale=guidance_scale,
|
48 |
start_noise=-1, show=False, style_prompt="sks art", no_load=True,
|
49 |
-
from_scratch=True)[0][1.0]
|
50 |
return pred_images
|
51 |
|
52 |
def demo_inference_stylization(adapter_path:str, prompts:list, image:list, start_noise=800,seed:int=0):
|
@@ -56,7 +56,7 @@ def demo_inference_stylization(adapter_path:str, prompts:list, image:list, start
|
|
56 |
height=512, width=512, scales=[0.,1.],
|
57 |
save_dir=None, seed=seed,steps=20, guidance_scale=7.5,
|
58 |
start_noise=start_noise, show=True, style_prompt="sks art", no_load=True,
|
59 |
-
from_scratch=False)
|
60 |
return pred_images
|
61 |
|
62 |
# def infer(prompt, samples, steps, scale, seed):
|
|
|
46 |
height=512, width=512, scales=[1.0],
|
47 |
save_dir=None, seed=seed,steps=steps, guidance_scale=guidance_scale,
|
48 |
start_noise=-1, show=False, style_prompt="sks art", no_load=True,
|
49 |
+
from_scratch=True, device=device)[0][1.0]
|
50 |
return pred_images
|
51 |
|
52 |
def demo_inference_stylization(adapter_path:str, prompts:list, image:list, start_noise=800,seed:int=0):
|
|
|
56 |
height=512, width=512, scales=[0.,1.],
|
57 |
save_dir=None, seed=seed,steps=20, guidance_scale=7.5,
|
58 |
start_noise=start_noise, show=True, style_prompt="sks art", no_load=True,
|
59 |
+
from_scratch=False, device=device)
|
60 |
return pred_images
|
61 |
|
62 |
# def infer(prompt, samples, steps, scale, seed):
|
hf_demo_test.ipynb
CHANGED
@@ -241,6 +241,7 @@
|
|
241 |
"# Direct infer\n",
|
242 |
"with block:\n",
|
243 |
" with gr.Group():\n",
|
|
|
244 |
" with gr.Row():\n",
|
245 |
" text = gr.Textbox(\n",
|
246 |
" label=\"Enter your prompt\",\n",
|
|
|
241 |
"# Direct infer\n",
|
242 |
"with block:\n",
|
243 |
" with gr.Group():\n",
|
244 |
+
" gr.Markdown(\" # Art-Free Diffusion Demo\")\n",
|
245 |
" with gr.Row():\n",
|
246 |
" text = gr.Textbox(\n",
|
247 |
" label=\"Enter your prompt\",\n",
|