diff --git a/README.md b/README.md index 3cc4019..45548d1 100644 --- a/README.md +++ b/README.md @@ -5,3 +5,11 @@ This repository is intended only for Workflows - if you want to add a flow, make The Visionatrix documentation is also stored here to not overload the main repository. For any problems with Visionatrix or suggestions for improvement, go to the [main repository](https://github.com/Visionatrix/Visionatrix). + +- [Documentation](https://visionatrix.github.io/VixFlowsDocs/) + - [Available Flows](https://visionatrix.github.io/VixFlowsDocs/Flows/index.html) + - [Manual Installation](https://visionatrix.github.io/VixFlowsDocs/Installation.html) + - [Command Line Options](https://visionatrix.github.io/VixFlowsDocs/CommandLineOptions.html) + - [Working modes](https://visionatrix.github.io/VixFlowsDocs/WorkingModes.html) + - [Vix Workflows](https://visionatrix.github.io/VixFlowsDocs/VixWorkflows.html) + - [Technical information](https://visionatrix.github.io/VixFlowsDocs/TechnicalInformation.html) diff --git a/docs/Flows/SD3_Medium.rst b/docs/Flows/SD3_Medium.rst new file mode 100644 index 0000000..afabf44 --- /dev/null +++ b/docs/Flows/SD3_Medium.rst @@ -0,0 +1,39 @@ +.. _SD3_Medium: + +StableDiffusion3-Medium +======================= + +Flow using the gated model, requires a HuggingFace token to setup. + +*This flow is made more for development and verification that we have successfully added the ability to use gated/closed models.* + +.. note:: + In the future this Flow will either be modernized or removed when something better appears to replace it based on the feature-tuned SD3, if there are any. + +**Supports various aspect ratios.** + +Hardware +"""""""" + +- **Required memory: 12-16 GB** + +Time to generate 1 image: + +- AMD 7900 XTX: **22.1 sec** +- NVIDIA RTX 3060 (12 GB): **25-32 sec** +- Apple M2 Max: **97 sec** + +Examples +"""""""" + +.. image:: /FlowsResults/SD3_Medium_1.png + +Prompt: "*Black kitten with white wings sitting on a blue cloud, cinematic*" | prompt_strength: 5.1 (seed: 6814591) + +.. image:: /FlowsResults/SD3_Medium_2.png + +Prompt: "*poster, cyborg girl against an alien, black baground, high contrast, high details, cinematic*" | prompt_strength: 5.5 (seed: 2131028) + +.. image:: /FlowsResults/SD3_Medium_3.png + +Prompt: "*an oil line art painting of the angel impressive neon shadows, warm colors*" | prompt_strength: 4.1 (seed: 1167357) \ No newline at end of file diff --git a/docs/Flows/index.rst b/docs/Flows/index.rst index 6b31fbe..8952bb1 100644 --- a/docs/Flows/index.rst +++ b/docs/Flows/index.rst @@ -18,3 +18,4 @@ Available Flows ComicuPortrait MemojiPortrait SupirUpscaler + SD3_Medium diff --git a/docs/FlowsResults/SD3_Medium_1.png b/docs/FlowsResults/SD3_Medium_1.png new file mode 100644 index 0000000..18d721a Binary files /dev/null and b/docs/FlowsResults/SD3_Medium_1.png differ diff --git a/docs/FlowsResults/SD3_Medium_2.png b/docs/FlowsResults/SD3_Medium_2.png new file mode 100644 index 0000000..5c76f99 Binary files /dev/null and b/docs/FlowsResults/SD3_Medium_2.png differ diff --git a/docs/FlowsResults/SD3_Medium_3.png b/docs/FlowsResults/SD3_Medium_3.png new file mode 100644 index 0000000..d999a5f Binary files /dev/null and b/docs/FlowsResults/SD3_Medium_3.png differ diff --git a/docs/GatedModels.rst b/docs/GatedModels.rst new file mode 100644 index 0000000..2d066f5 --- /dev/null +++ b/docs/GatedModels.rst @@ -0,0 +1,29 @@ +Gated Models +============ + +It often happens that the model you are using is not available for download without authentication. These are referred to as `Gated Models `_. + +Flows with such models have a separate mark in the Visionatrix UI. + +To be able to install such a flow, you need to specify an ``Access Token`` + +.. note:: + Currently, only HuggingFace Access Tokens are supported. + +Steps to Access Gated Models: + +1. Register on `HuggingFace `_ if you are not already registered +2. Gain access to the model on your account by going to its page (you can click on the model from Visionatrix UI) and filling out the form +3. Generate an access token in the settings of HuggingFace (click on your icon -> settings -> access tokens) +4. Click on ``Set Permissions`` of the token after generation and select ``Read access to contents of all public gated repos you can access`` +5. Go to the Visionatrix settings and enter this access token + +Alternatively, you can set an environment variable named ``HF_AUTH_TOKEN`` with the token value, but this requires setting up the environment variable for each worker if you have many of them. + +I'm a user and want to connect my own worker to process flows with closed models. +--------------------------------------------------------------------------------- + +As user's workers cannot receive global access tokens from the server to avoid leaks, you have two options: + +1. Download the model yourself and place it in the folder specified in ``models_catalog.json`` under the ``save_path`` key. +2. Set the ``HF_AUTH_TOKEN`` environment variable with your own public access token, and the worker will be able to install flows with gated models. \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst index 89f0c5c..e35f973 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -10,6 +10,7 @@ Here will leave all docs that is not suitable for Readme file. Installation.rst CommandLineOptions.rst WorkingModes.rst + GatedModels.rst VixWorkflows.rst TechnicalInformation.rst diff --git a/flows/sd3_medium/flow.json b/flows/sd3_medium/flow.json new file mode 100644 index 0000000..c49597e --- /dev/null +++ b/flows/sd3_medium/flow.json @@ -0,0 +1,135 @@ +{ + "name": "sd3_medium", + "display_name": "StableDiffusion3 Medium", + "description": "Simple one model flow for testing purposes", + "author": "Datou", + "homepage": "https://openart.ai/workflows/datou/sd3-basic-workflow/7Udt2JZ3Mwqf1if9EqWt", + "license": "", + "documentation": "https://visionatrix.github.io/VixFlowsDocs/Flows/SD3_Medium.html", + "tags": ["general"], + "input_params": [ + { + "name": "prompt", + "display_name": "Prompt", + "type": "text", + "optional": false, + "comfy_node_id": { + "6": { + "dest_field_name": [ + "inputs", + "text" + ] + } + } + }, + { + "name": "negative_prompt", + "display_name": "Negative Prompt", + "type": "text", + "default": "bad quality, poor quality, doll, disfigured, jpg, toy, bad anatomy, missing limbs, missing fingers, 3d, cgi", + "optional": false, + "advanced": true, + "comfy_node_id": { + "71": { + "dest_field_name": [ + "inputs", + "text" + ] + } + } + }, + { + "name": "aspect_ratio", + "display_name": "Aspect Ratio", + "type": "list", + "optional": true, + "advanced": true, + "default": "1x1 (1024x1024)", + "options": { + "1x1 (1024x1024)": [ + 1024, + 1024 + ], + "2x3 (832x1216)": [ + 832, + 1216 + ], + "3x4 (896x1152)": [ + 896, + 1152 + ], + "5:8 (768x1216)": [ + 768, + 1216 + ], + "9:16 (768x1344)": [ + 768, + 1344 + ], + "9:19 (704x1472)": [ + 704, + 1472 + ], + "9:21 (640x1536)": [ + 640, + 1536 + ], + "3:2 (1216x832)": [ + 1216, + 832 + ], + "4:3 (1152x896)": [ + 1152, + 896 + ], + "8:5 (1216x768)": [ + 1216, + 768 + ], + "16:9 (1344x768)": [ + 1344, + 768 + ], + "19:9 (1472x704)": [ + 1472, + 704 + ], + "21:9 (1536x640)": [ + 1536, + 640 + ] + }, + "comfy_node_id": { + "135": { + "dest_field_name": [ + "inputs", + [ + "width", + "height" + ] + ] + } + } + }, + { + "name": "prompt_strength", + "display_name": "Prompt strength", + "type": "range", + "optional": true, + "advanced": true, + "default": 4.1, + "min": 4.0, + "max": 7.0, + "step": 0.1, + "comfy_node_id": { + "271": { + "dest_field_name": [ + "inputs", + "cfg" + ], + "internal_type": "float" + } + } + } + ] +} \ No newline at end of file diff --git a/flows/sd3_medium/flow_comfy.json b/flows/sd3_medium/flow_comfy.json new file mode 100644 index 0000000..5d2ccad --- /dev/null +++ b/flows/sd3_medium/flow_comfy.json @@ -0,0 +1,107 @@ +{ + "6": { + "inputs": { + "text": "", + "clip": [ + "252", + 1 + ] + }, + "class_type": "CLIPTextEncode", + "_meta": { + "title": "CLIP Text Encode (Prompt)" + } + }, + "71": { + "inputs": { + "text": "bad quality, poor quality, doll, disfigured, jpg, toy, bad anatomy, missing limbs, missing fingers, 3d, cgi", + "clip": [ + "252", + 1 + ] + }, + "class_type": "CLIPTextEncode", + "_meta": { + "title": "CLIP Text Encode (Negative Prompt)" + } + }, + "135": { + "inputs": { + "width": 1024, + "height": 1024, + "batch_size": 1 + }, + "class_type": "EmptySD3LatentImage", + "_meta": { + "title": "EmptySD3LatentImage" + } + }, + "231": { + "inputs": { + "samples": [ + "271", + 0 + ], + "vae": [ + "252", + 2 + ] + }, + "class_type": "VAEDecode", + "_meta": { + "title": "VAE Decode" + } + }, + "252": { + "inputs": { + "ckpt_name": "sd3_medium_incl_clips_t5xxlfp16.safetensors" + }, + "class_type": "CheckpointLoaderSimple", + "_meta": { + "title": "Load Checkpoint" + } + }, + "271": { + "inputs": { + "seed": 71844603528225, + "steps": 28, + "cfg": 4.1, + "sampler_name": "dpmpp_2m", + "scheduler": "sgm_uniform", + "denoise": 1, + "model": [ + "252", + 0 + ], + "positive": [ + "6", + 0 + ], + "negative": [ + "71", + 0 + ], + "latent_image": [ + "135", + 0 + ] + }, + "class_type": "KSampler", + "_meta": { + "title": "KSampler" + } + }, + "273": { + "inputs": { + "filename_prefix": "comfy_", + "images": [ + "231", + 0 + ] + }, + "class_type": "SaveImage", + "_meta": { + "title": "@Datou" + } + } +} \ No newline at end of file diff --git a/models_catalog.json b/models_catalog.json index 9eda030..9dff6cb 100644 --- a/models_catalog.json +++ b/models_catalog.json @@ -417,5 +417,18 @@ "input_name": "^(?!.*(?i:lora)).*" } ] + }, + "SD3-Medium" : { + "save_path": "checkpoints/sd3_medium_incl_clips_t5xxlfp16.safetensors", + "url": "https://huggingface.co/stabilityai/stable-diffusion-3-medium/resolve/main/sd3_medium_incl_clips_t5xxlfp16.safetensors", + "homepage": "https://huggingface.co/stabilityai/stable-diffusion-3-medium", + "hash": "69a950c5d143ce782a7423c532c8a12b75da6a37b0e6f26a322acf4e76208912", + "regexes": [ + { + "input_value": "^(?=.*(?i:sd3))(?=.*(?i:medium))(?=.*(?i:fp16)).*", + "input_name": "^(?!.*(?i:lora)).*" + } + ], + "gated": true } }