rsamf commited on
Commit
00bce56
·
1 Parent(s): 8dab621

Correcting workflow file, setting hf cache dir

Browse files
Dockerfile CHANGED
@@ -8,5 +8,6 @@ RUN python -m pip install \
8
 
9
  COPY config.yaml .
10
  COPY workflow workflow
 
11
 
12
  CMD ["python", "-m", "graphbook.main", "--web_dir", "web/dist", "--isolate_users", "--no_sample"]
 
8
 
9
  COPY config.yaml .
10
  COPY workflow workflow
11
+ ENV HF_HOME=/app/.hf
12
 
13
  CMD ["python", "-m", "graphbook.main", "--web_dir", "web/dist", "--isolate_users", "--no_sample"]
workflow/BackgroundRemoval.json DELETED
@@ -1 +0,0 @@
1
- {"version": "0", "type": "workflow", "nodes": [{"id": "0", "type": "step", "position": {"x": 253.6139923086571, "y": 59.52037501520965}, "data": {"name": "RemoveBackground", "parameters": {"model": {"type": "resource"}, "batch_size": {"type": "number", "default": 8, "value": 8}, "item_key": {"type": "string", "default": "image", "value": "image"}, "output_dir": {"type": "string", "value": "/media/sam/shared/alternative/pokemon_masks"}}, "inputs": ["in"], "outputs": ["out"], "category": "Custom", "label": "RemoveBackground", "key": 12, "isCollapsed": false}, "width": 174, "height": 175, "selected": false, "positionAbsolute": {"x": 671.1501153288792, "y": 288.1274724574072}, "dragging": true, "parentId": "2", "hidden": false}, {"id": "2", "type": "group", "position": {"x": 417.53612302022213, "y": 228.60709744219753}, "width": 487, "height": 306, "data": {"label": "Group", "exports": {"inputs": [{"id": "1", "name": "in", "type": "step"}, {"id": "0", "name": "resource", "type": "resource"}], "outputs": [{"id": "0", "name": "out", "type": "step"}]}, "isCollapsed": false}, "style": {"width": 487, "height": 306}, "resizing": false, "selected": false, "positionAbsolute": {"x": 417.53612302022213, "y": 228.60709744219753}, "dragging": true}, {"id": "3", "type": "export", "position": {"x": 171.28302237599206, "y": 307.94365582341436}, "data": {"label": "split_fn", "exportType": "input", "isResource": true, "isCollapsed": false, "isEditing": false}, "width": 150, "height": 24, "selected": false, "positionAbsolute": {"x": 171.28302237599206, "y": 307.94365582341436}, "dragging": true}, {"id": "4", "type": "export", "position": {"x": 169.3283191390251, "y": 276.5582983666894}, "data": {"label": "Input", "exportType": "input", "isResource": false, "isCollapsed": false, "isEditing": false}, "width": 150, "height": 24, "selected": false, "positionAbsolute": {"x": 169.3283191390251, "y": 276.5582983666894}, "dragging": true}, {"id": "5", "type": "export", "position": {"x": 980.069924178094, "y": 281.42455113963734}, "data": {"label": "Output", "exportType": "output", "isResource": false, "isCollapsed": false}, "width": 150, "height": 24, "positionAbsolute": {"x": 980.069924178094, "y": 281.42455113963734}}, {"id": "6", "type": "resource", "position": {"x": 65.7467508136707, "y": 199.57544189414847}, "data": {"name": "RMBGModel", "parameters": {"model_name": {"type": "string", "description": "The name of the image processor.", "value": "briaai/RMBG-1.4"}}, "category": "Custom", "label": "RMBGModel", "key": 19, "isCollapsed": true}, "width": 150, "height": 24, "selected": false, "positionAbsolute": {"x": 483.28287383389284, "y": 428.182539336346}, "dragging": true, "parentId": "2", "hidden": false}, {"id": "7", "type": "step", "position": {"x": 78.30458080504991, "y": 20.95433445659424}, "data": {"name": "Split", "parameters": {"split_fn": {"type": "resource"}}, "inputs": ["in"], "outputs": ["A", "B"], "category": "Filtering", "label": "Split", "key": 2, "isCollapsed": false}, "width": 150, "height": 120, "selected": false, "positionAbsolute": {"x": 495.84070382527204, "y": 249.56143189879177}, "dragging": true, "parentId": "2", "hidden": false}], "edges": [{"source": "4", "sourceHandle": "in", "target": "2", "targetHandle": "1", "data": {}, "id": "reactflow__edge-4in-21"}, {"source": "6", "sourceHandle": "resource", "target": "0", "targetHandle": "model", "data": {}, "id": "reactflow__edge-6resource-0model"}, {"source": "0", "sourceHandle": "out", "target": "2", "targetHandle": "0_inner", "data": {}, "id": "reactflow__edge-0out-20_inner"}, {"source": "2", "sourceHandle": "0", "target": "5", "targetHandle": "out", "data": {}, "id": "reactflow__edge-20-5out"}, {"source": "3", "sourceHandle": "in", "target": "2", "targetHandle": "0", "data": {}, "id": "reactflow__edge-3in-20"}, {"source": "2", "sourceHandle": "1_inner", "target": "7", "targetHandle": "in", "data": {}, "id": "reactflow__edge-21_inner-7in"}, {"source": "2", "sourceHandle": "0_inner", "target": "7", "targetHandle": "split_fn", "data": {}, "id": "reactflow__edge-20_inner-7split_fn"}, {"source": "7", "sourceHandle": "A", "target": "0", "targetHandle": "in", "data": {}, "id": "reactflow__edge-7A-0in"}]}
 
 
workflow/RemoveBG.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"version": "0", "type": "workflow", "nodes": [{"id": "2", "position": {"x": 187.5, "y": 52.5}, "type": "step", "data": {"label": "HuggingfaceDataset", "name": "HuggingfaceDataset", "parameters": {"dataset_id": {"type": "string", "description": "The dataset ID from Huggingface", "value": "microsoft/cats_vs_dogs"}, "split": {"type": "string", "default": "train", "description": "The split of the dataset to use", "value": "train"}, "shuffle": {"type": "boolean", "default": false, "description": "Whether to shuffle the dataset", "value": true}, "log_data": {"type": "boolean", "default": true, "description": "Whether to log the outputs as JSON to the node UI", "value": false}, "image_columns": {"type": "list[string]", "description": "The columns in the dataset that contain images. This is to let Graphbook know how to display the images in the UI.", "required": false, "value": ["image"]}, "kwargs": {"type": "dict", "description": "Additional keyword arguments to pass to the dataset", "required": false, "value": []}}, "inputs": [], "outputs": ["out"], "category": "Huggingface", "isCollapsed": false}}, {"id": "3", "type": "resource", "position": {"x": 187.5, "y": 282.5}, "data": {"name": "RMBGModel", "parameters": {"model_name": {"type": "string", "default": "briaai/RMBG-1.4", "required": false, "description": "The name of the RMBG model.", "value": "briaai/RMBG-1.4"}, "use_cuda": {"type": "boolean", "default": true, "required": false, "description": "Whether to use CUDA acceleration.", "value": false}}, "category": "BackgroundRemoval", "label": "RMBGModel", "isCollapsed": false}}, {"id": "4", "type": "step", "position": {"x": 444.5, "y": 52.5}, "data": {"name": "RemoveBackground", "parameters": {"batch_size": {"type": "number", "description": "The batch size for background removal.", "default": 8, "value": 8}, "model": {"type": "resource", "description": "The model to use for background removal."}, "output_dir": {"type": "string", "description": "The directory to save the output images.", "default": "/tmp/output", "value": "/media/sam/shared/__DELETE"}}, "inputs": ["in"], "outputs": ["out"], "category": "BackgroundRemoval", "label": "RemoveBackground", "isCollapsed": false}}], "edges": [{"source": "2", "sourceHandle": "out", "target": "4", "targetHandle": "in", "data": {}, "id": "reactflow__edge-2out-4in"}, {"source": "3", "sourceHandle": "resource", "target": "4", "targetHandle": "model", "data": {}, "id": "reactflow__edge-3resource-4model"}]}