Akjava commited on
Commit
11a679e
β€’
1 Parent(s): 08f634c
tools.html β†’ demo_tools.html RENAMED
@@ -1,12 +1,10 @@
1
  <div style="text-align: center;">
2
- <p><a href="https://huggingface.co/spaces/Akjava/godot-huggingface-chain">AI Diagram Chat with Voice/Face Character Making Tools</a></p>
3
- <p><a href="https://huggingface.co/spaces/Akjava/WebPTalkHead">[WebP-3F-TH]</a>
 
4
  <a href="https://huggingface.co/spaces/Akjava/flux1-schnell-mask-inpaint">[Flux1-Inpaint(GPU)]</a>
5
  <a href="https://huggingface.co/spaces/Akjava/OpenCVInpaintCPU">[OpenCV-Inapint]</a>
6
  <a href="https://huggingface.co/spaces/Akjava/Simple-Whitebalance-Image">[Whitebalance]</a>
7
  <a href="https://huggingface.co/spaces/Akjava/Simple-Mask-Paste-Image">[Paste Image]</a>
8
- <a href=" https://huggingface.co/spaces/Akjava/WebP-Resize-Convert">[WebP Resize Convert]</a></p>
9
-
10
-
11
-
12
  </div>
 
1
  <div style="text-align: center;">
2
+ <p><a href="https://huggingface.co/spaces/Akjava/AIDiagramChatWithVoice-FaceCharacter">AI Diagram Chat with Voice/Face Character Making Tools</a></p>
3
+ <p><a href="https://huggingface.co/spaces/Akjava/WebPTalkHead">[WebP-3F-TH]</a>
4
+ <a href="https://huggingface.co/spaces/Akjava/flux1-schnell-img2img">[Flux1-Img2Img(GPU)]</a>
5
  <a href="https://huggingface.co/spaces/Akjava/flux1-schnell-mask-inpaint">[Flux1-Inpaint(GPU)]</a>
6
  <a href="https://huggingface.co/spaces/Akjava/OpenCVInpaintCPU">[OpenCV-Inapint]</a>
7
  <a href="https://huggingface.co/spaces/Akjava/Simple-Whitebalance-Image">[Whitebalance]</a>
8
  <a href="https://huggingface.co/spaces/Akjava/Simple-Mask-Paste-Image">[Paste Image]</a>
9
+ <a href=" https://huggingface.co/spaces/Akjava/WebP-Resize-Convert">[WebP Resize Convert]</a></p>
 
 
 
10
  </div>
flux1_inpaint.py DELETED
@@ -1,31 +0,0 @@
1
- import torch
2
- from diffusers import FluxInpaintPipeline
3
-
4
- from PIL import Image
5
- import sys
6
- import spaces
7
-
8
- # I only test with FLUX.1-schnell
9
-
10
- #@spaces.GPU
11
- def process_image(image,mask_image,prompt="a person",model_id="black-forest-labs/FLUX.1-schnell",strength=0.75,seed=0,num_inference_steps=4):
12
- if image == None:
13
- return None
14
-
15
- pipe = FluxInpaintPipeline.from_pretrained(model_id, torch_dtype=torch.bfloat16)
16
- pipe.to("cuda")
17
-
18
- generators = []
19
- generator = torch.Generator("cuda").manual_seed(seed)
20
- generators.append(generator)
21
- # more parameter see https://huggingface.co/docs/diffusers/api/pipelines/flux#diffusers.FluxInpaintPipeline
22
- output = pipe(prompt=prompt, image=image, mask_image=mask_image,generator=generator,strength=strength)
23
-
24
- return output.images[0]
25
-
26
- if __name__ == "__main__":
27
- #args input-image input-mask output
28
- image = Image.open(sys.argv[1])
29
- mask = Image.open(sys.argv[2])
30
- output = process_image(image,mask)
31
- output.save(sys.argv[3])