Manjushri commited on
Commit
48f34fb
·
verified ·
1 Parent(s): 8662d6a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -9,9 +9,9 @@ device = "cuda" if torch.cuda.is_available() else "cpu"
9
  pipe = DiffusionPipeline.from_pretrained("circulus/canvers-anime-v3.8.1", safety_checker=None)
10
  pipe = pipe.to(device)
11
 
12
- def genie (Prompt, negative_prompt, scale, steps, seed):
13
  generator = torch.Generator(device=device).manual_seed(seed)
14
- image = pipe(Prompt, negative_prompt=negative_prompt, height=512, width=512, num_inference_steps=steps, guidance_scale=scale, generator=generator).images[0]
15
  return image
16
 
17
  gr.Interface(fn=genie, inputs=[gr.Textbox(label='What you want the AI to generate. 77 Token Limit.'),
@@ -19,10 +19,10 @@ gr.Interface(fn=genie, inputs=[gr.Textbox(label='What you want the AI to generat
19
  #gr.Slider(512, 768, 512, step=128, label='height'),
20
  #gr.Slider(512, 768, 512, step=128, label='width'),
21
  gr.Slider(1, maximum=9, value=5, step=.25),
22
- gr.Slider(1, maximum=50, value=25, step=1),
23
  gr.Slider(minimum=0, step=1, maximum=9999999999999999, randomize=True, label='Seed'),
24
  ],
25
  outputs = 'image',
26
  title = 'Canvers Anime V3.8.1 - CPU',
27
- description = "<b>WARNING:</b> Extremely Slow. 35s/Iteration. Expect 8-16mins an image for 15-30 iterations respectively. 50 iterations takes ~28mins.",
28
  article = "Code Monkey: <a href=\"https://huggingface.co/Manjushri\">Manjushri</a>").launch(debug=True, max_threads=True)
 
9
  pipe = DiffusionPipeline.from_pretrained("circulus/canvers-anime-v3.8.1", safety_checker=None)
10
  pipe = pipe.to(device)
11
 
12
+ def genie (Prompt, negative_prompt, scale, seed):
13
  generator = torch.Generator(device=device).manual_seed(seed)
14
+ image = pipe(Prompt, negative_prompt=negative_prompt, height=512, width=512, guidance_scale=scale, generator=generator).images[0]
15
  return image
16
 
17
  gr.Interface(fn=genie, inputs=[gr.Textbox(label='What you want the AI to generate. 77 Token Limit.'),
 
19
  #gr.Slider(512, 768, 512, step=128, label='height'),
20
  #gr.Slider(512, 768, 512, step=128, label='width'),
21
  gr.Slider(1, maximum=9, value=5, step=.25),
22
+ #gr.Slider(1, maximum=50, value=25, step=1),
23
  gr.Slider(minimum=0, step=1, maximum=9999999999999999, randomize=True, label='Seed'),
24
  ],
25
  outputs = 'image',
26
  title = 'Canvers Anime V3.8.1 - CPU',
27
+ description = "<b>WARNING:</b> Extremely Slow. 15s/Iteration. Expect 8-16mins. 50 iterations takes ~15mins.",
28
  article = "Code Monkey: <a href=\"https://huggingface.co/Manjushri\">Manjushri</a>").launch(debug=True, max_threads=True)