azkavyro commited on
Commit
6fecfbe
·
1 Parent(s): 892b4c4

Added all files including vyro_workflows

Browse files
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. Imagine/Readme.md +147 -0
  2. Imagine/Workflows/Imaginev5-Workflow.json +2307 -0
  3. Imagine/Workflows/Imaginev5-ultra-Workflow.json +1433 -0
  4. Imagine/imagine-v5-ultra/comfy/__pycache__/checkpoint_pickle.cpython-311.pyc +0 -0
  5. Imagine/imagine-v5-ultra/comfy/__pycache__/cli_args.cpython-311.pyc +0 -0
  6. Imagine/imagine-v5-ultra/comfy/__pycache__/clip_model.cpython-311.pyc +0 -0
  7. Imagine/imagine-v5-ultra/comfy/__pycache__/clip_vision.cpython-311.pyc +0 -0
  8. Imagine/imagine-v5-ultra/comfy/__pycache__/conds.cpython-311.pyc +0 -0
  9. Imagine/imagine-v5-ultra/comfy/__pycache__/controlnet.cpython-311.pyc +0 -0
  10. Imagine/imagine-v5-ultra/comfy/__pycache__/diffusers_convert.cpython-311.pyc +0 -0
  11. Imagine/imagine-v5-ultra/comfy/__pycache__/diffusers_load.cpython-311.pyc +0 -0
  12. Imagine/imagine-v5-ultra/comfy/__pycache__/float.cpython-311.pyc +0 -0
  13. Imagine/imagine-v5-ultra/comfy/__pycache__/gligen.cpython-311.pyc +0 -0
  14. Imagine/imagine-v5-ultra/comfy/__pycache__/hooks.cpython-311.pyc +0 -0
  15. Imagine/imagine-v5-ultra/comfy/__pycache__/latent_formats.cpython-311.pyc +0 -0
  16. Imagine/imagine-v5-ultra/comfy/__pycache__/lora.cpython-311.pyc +0 -0
  17. Imagine/imagine-v5-ultra/comfy/__pycache__/lora_convert.cpython-311.pyc +0 -0
  18. Imagine/imagine-v5-ultra/comfy/__pycache__/model_base.cpython-311.pyc +0 -0
  19. Imagine/imagine-v5-ultra/comfy/__pycache__/model_detection.cpython-311.pyc +0 -0
  20. Imagine/imagine-v5-ultra/comfy/__pycache__/model_management.cpython-311.pyc +0 -0
  21. Imagine/imagine-v5-ultra/comfy/__pycache__/model_patcher.cpython-311.pyc +0 -0
  22. Imagine/imagine-v5-ultra/comfy/__pycache__/model_sampling.cpython-311.pyc +0 -0
  23. Imagine/imagine-v5-ultra/comfy/__pycache__/ops.cpython-311.pyc +0 -0
  24. Imagine/imagine-v5-ultra/comfy/__pycache__/options.cpython-311.pyc +0 -0
  25. Imagine/imagine-v5-ultra/comfy/__pycache__/patcher_extension.cpython-311.pyc +0 -0
  26. Imagine/imagine-v5-ultra/comfy/__pycache__/sample.cpython-311.pyc +0 -0
  27. Imagine/imagine-v5-ultra/comfy/__pycache__/sampler_helpers.cpython-311.pyc +0 -0
  28. Imagine/imagine-v5-ultra/comfy/__pycache__/samplers.cpython-311.pyc +0 -0
  29. Imagine/imagine-v5-ultra/comfy/__pycache__/sd.cpython-311.pyc +0 -0
  30. Imagine/imagine-v5-ultra/comfy/__pycache__/sd1_clip.cpython-311.pyc +0 -0
  31. Imagine/imagine-v5-ultra/comfy/__pycache__/sdxl_clip.cpython-311.pyc +0 -0
  32. Imagine/imagine-v5-ultra/comfy/__pycache__/supported_models.cpython-311.pyc +0 -0
  33. Imagine/imagine-v5-ultra/comfy/__pycache__/supported_models_base.cpython-311.pyc +0 -0
  34. Imagine/imagine-v5-ultra/comfy/__pycache__/utils.cpython-311.pyc +0 -0
  35. Imagine/imagine-v5-ultra/comfy/checkpoint_pickle.py +13 -0
  36. Imagine/imagine-v5-ultra/comfy/cldm/__pycache__/cldm.cpython-311.pyc +0 -0
  37. Imagine/imagine-v5-ultra/comfy/cldm/__pycache__/control_types.cpython-311.pyc +0 -0
  38. Imagine/imagine-v5-ultra/comfy/cldm/__pycache__/dit_embedder.cpython-311.pyc +0 -0
  39. Imagine/imagine-v5-ultra/comfy/cldm/__pycache__/mmdit.cpython-311.pyc +0 -0
  40. Imagine/imagine-v5-ultra/comfy/cldm/cldm.py +433 -0
  41. Imagine/imagine-v5-ultra/comfy/cldm/control_types.py +10 -0
  42. Imagine/imagine-v5-ultra/comfy/cldm/dit_embedder.py +120 -0
  43. Imagine/imagine-v5-ultra/comfy/cldm/mmdit.py +81 -0
  44. Imagine/imagine-v5-ultra/comfy/cli_args.py +214 -0
  45. Imagine/imagine-v5-ultra/comfy/clip_config_bigg.json +23 -0
  46. Imagine/imagine-v5-ultra/comfy/clip_model.py +244 -0
  47. Imagine/imagine-v5-ultra/comfy/clip_vision.py +143 -0
  48. Imagine/imagine-v5-ultra/comfy/clip_vision_config_g.json +18 -0
  49. Imagine/imagine-v5-ultra/comfy/clip_vision_config_h.json +18 -0
  50. Imagine/imagine-v5-ultra/comfy/clip_vision_config_vitl.json +18 -0
Imagine/Readme.md ADDED
@@ -0,0 +1,147 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ library_name: diffusers
5
+ ---
6
+ # Imagine V5 Model Card
7
+
8
+ ![row01](v5.jpg)
9
+
10
+ ## Model Details
11
+
12
+ ### Model Description
13
+ The Imagine V5, developed by Vyro AI, represents the pinnacle of photorealism in AI art generation. Specializing in photographs and portraits, V5 is known for its exceptional ability to create images that closely mimic reality.
14
+
15
+ V5 boasts an impressive ability to recognize a wide array of prompts and handle multiple subjects effortlessly. It's important to note that V5, with its vast capabilities, also demands significant computational resources and may exhibit slower processing times. This model is best suited for users with a good understanding of prompt composition, as it offers high-quality outputs for those who can navigate its complexities.
16
+
17
+ - **Developed by:** Vyro AI
18
+ - **Model type:** Generative text-to-image model
19
+
20
+ ## Key Features
21
+ - Photorealistic Portraits and Landscapes: Specializes in creating highly realistic images.
22
+ - Large Dataset Training: Inherits a broad understanding of prompts from Stable Diffusion XL Model.
23
+ - Color Characteristics: Tends to produce slightly saturated imagery.
24
+ - Resource Intensive: Requires significant computational power.
25
+ ## Ideal Uses
26
+ - Digital Art Creation: Ideal for artists seeking to create photorealistic portraits and landscapes.
27
+ - Graphic Design: Useful for designers who require high-fidelity images.
28
+ - Creative Experimentation: A valuable tool for exploring new artistic concepts, especially in realistic styles.
29
+ - Professional Projects: Suitable for advanced users in fields like advertising, where photorealism is key.
30
+
31
+ For more ways to use V5 and to explore its full potential, visit [ImagineV5 Use Cases](https://www.imagine.art/blogs/10-awesome-ways-to-use-imagine-s-new-v5-model)
32
+ ## Limitations
33
+ - Factual Representations: Not intended for creating accurate depictions of real-world events or people.
34
+ - Sensitive Content: Must not be used for generating offensive or explicit material.
35
+ - Identity Misrepresentation and Deepfakes: Prohibited from creating deceptive images of real individuals.
36
+ - Legal and Ethical Compliance: Users must adhere to copyright, privacy, and ethical standards.
37
+
38
+ ## Get Started with Using V5
39
+ Ready to dive into the world of AI-generated art with Imagine V5?
40
+ Begin your journey into photorealistic art creation today. Visit [imagine.art](https://www.imagine.art/) to access a user-friendly platform designed to help you harness the full capabilities of V5. Whether you're an experienced artist or just starting out, you'll find the tools and guidance you need to transform your artistic visions into stunning digital realities.
41
+
42
+ Explore detailed tutorials, creative tips, and a supportive community that will guide you through the exciting process of AI art generation. Start crafting your unique art pieces with Imagine V5 now at [imagine.art](https://www.imagine.art/)
43
+
44
+ # Setup and Usage
45
+
46
+ We offer two workflows:
47
+ - One for **Imagine V5**
48
+ - One for **Imagine V5 Ultra**
49
+
50
+ ---
51
+
52
+ ### Initial Setup
53
+
54
+ Clone this repository
55
+ ```bash
56
+ git clone https://huggingface.co/vyroAI/ImagineV5
57
+ ```
58
+ Create a conda environment
59
+ ```bash
60
+ conda create -n imagineservices python==3.11 -y
61
+ ```
62
+ Install the requirements
63
+ ```bash
64
+ pip install -r requirements.txt
65
+ ```
66
+
67
+ ---
68
+
69
+ ## Imagine V5 Setup
70
+ ### Step 1: Navigate into the imagine-v5 folder
71
+ ```bash
72
+ cd imagine-v5
73
+ ```
74
+
75
+ ### Step 2: Install PyTorch Nightly
76
+ ```bash
77
+ pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128
78
+ ```
79
+
80
+ ### Step 3: Clone ComfyUI
81
+ ```bash
82
+ git clone https://github.com/comfyanonymous/ComfyUI.git
83
+ ```
84
+
85
+ ### Step 4: Replace & Configure
86
+ - Replace the ComfyUI/comfy and ComfyUI/models folders with the ones provided in this repo in imagine-v5 folder.
87
+ - Copy the vyro_workflows folder into ComfyUI/custom_nodes/.
88
+
89
+ ### Step 5: Run the Application
90
+ ```bash
91
+ cd ComfyUI
92
+ python3.11 main.py
93
+ ```
94
+
95
+ ### Step 6: Load the Workflow
96
+ - Load the workflow in the ComfyUI interface.
97
+ - Use the following workflow file:
98
+ ```text
99
+ https://huggingface.co/vyroAI/ImagineV5/blob/main/Imaginev5-Workflow.json
100
+ ```
101
+
102
+ ---
103
+
104
+ ### Imagine V5 Ultra
105
+
106
+ ## Imagine V5 Ultra Setup
107
+ ### Step 1: Navigate into the imagine-v5-ultra folder
108
+ ```bash
109
+ cd imagine-v5-ultra
110
+ ```
111
+ ### Step 2: Install PyTorch Nightly
112
+ ```bash
113
+ pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu128
114
+ ```
115
+
116
+ ### Step 3: Clone ComfyUI
117
+ ```bash
118
+ git clone https://github.com/comfyanonymous/ComfyUI.git
119
+ ```
120
+
121
+ ### Step 4: Replace & Configure
122
+ - Replace the ComfyUI/comfy and ComfyUI/models folders with the ones provided in this repo in imgaine-v5-ultra folder.
123
+ - Copy the vyro_workflows folder into ComfyUI/custom_nodes/.
124
+
125
+ ### Step 5: Run the Application
126
+ ```bash
127
+ cd ComfyUI
128
+ python3.11 main.py
129
+ ```
130
+
131
+ ### Step 6: Load the Workflow
132
+ - Load the workflow in the ComfyUI interface.
133
+ - Use the following workflow file provided in Workflows folder:
134
+
135
+ ```text
136
+ https://huggingface.co/vyroAI/ImagineV5/blob/main/Imaginev5-ultra-Workflow.json
137
+ ```
138
+ ⚠️ If you are facing any issues, make sure to use ComfyUI version: "0.3.27"
139
+
140
+ ---
141
+ ## Privacy Policy
142
+ For detailed information on data handling and privacy, refer to the [Imagine V5 Privacy Policy](https://drive.google.com/file/d/1odKfNRoJmwD3sg8dl4zGXjC65zzf8Ejm/view) document.
143
+
144
+ ## Conclusion
145
+ Imagine V5 stands as a significant advancement in the realm of AI art generation, especially in the domain of photorealism. It presents a unique opportunity for artists, designers, and creatives to push the boundaries of digital art. While V5 demands a certain level of proficiency and computational resources, the quality of its output makes it a worthy tool for those seeking to explore the forefront of AI-generated art.
146
+
147
+ Explore the capabilities of Imagine V5 on various platforms including web browsers, Android, and iOS devices. Join the Imagine AI Art community, participate in the Affiliate Program, or delve into technical integrations via the APIs page. Embrace the fusion of art and technology with Imagine AI Art.
Imagine/Workflows/Imaginev5-Workflow.json ADDED
@@ -0,0 +1,2307 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "id": "a353eeec-1dc4-41d6-b5d3-846916cc12bb",
3
+ "revision": 0,
4
+ "last_node_id": 394,
5
+ "last_link_id": 1209,
6
+ "nodes": [
7
+ {
8
+ "id": 71,
9
+ "type": "Reroute",
10
+ "pos": [
11
+ -706,
12
+ -1007
13
+ ],
14
+ "size": [
15
+ 75,
16
+ 26
17
+ ],
18
+ "flags": {},
19
+ "order": 7,
20
+ "mode": 0,
21
+ "inputs": [
22
+ {
23
+ "name": "",
24
+ "type": "*",
25
+ "link": 209
26
+ }
27
+ ],
28
+ "outputs": [
29
+ {
30
+ "name": "",
31
+ "type": "VAE",
32
+ "slot_index": 0,
33
+ "links": [
34
+ 210
35
+ ]
36
+ }
37
+ ],
38
+ "properties": {
39
+ "showOutputText": false,
40
+ "horizontal": false
41
+ }
42
+ },
43
+ {
44
+ "id": 147,
45
+ "type": "Reroute",
46
+ "pos": [
47
+ 3679,
48
+ -85
49
+ ],
50
+ "size": [
51
+ 140.8000030517578,
52
+ 26
53
+ ],
54
+ "flags": {},
55
+ "order": 25,
56
+ "mode": 0,
57
+ "inputs": [
58
+ {
59
+ "name": "",
60
+ "type": "*",
61
+ "link": 435
62
+ }
63
+ ],
64
+ "outputs": [
65
+ {
66
+ "name": "CONDITIONING",
67
+ "type": "CONDITIONING",
68
+ "slot_index": 0,
69
+ "links": [
70
+ 439,
71
+ 445
72
+ ]
73
+ }
74
+ ],
75
+ "properties": {
76
+ "showOutputText": true,
77
+ "horizontal": false
78
+ }
79
+ },
80
+ {
81
+ "id": 148,
82
+ "type": "Reroute",
83
+ "pos": [
84
+ 3681,
85
+ -44
86
+ ],
87
+ "size": [
88
+ 140.8000030517578,
89
+ 26
90
+ ],
91
+ "flags": {},
92
+ "order": 26,
93
+ "mode": 0,
94
+ "inputs": [
95
+ {
96
+ "name": "",
97
+ "type": "*",
98
+ "link": 436
99
+ }
100
+ ],
101
+ "outputs": [
102
+ {
103
+ "name": "CONDITIONING",
104
+ "type": "CONDITIONING",
105
+ "slot_index": 0,
106
+ "links": [
107
+ 440,
108
+ 446
109
+ ]
110
+ }
111
+ ],
112
+ "properties": {
113
+ "showOutputText": true,
114
+ "horizontal": false
115
+ }
116
+ },
117
+ {
118
+ "id": 150,
119
+ "type": "Reroute",
120
+ "pos": [
121
+ 3683.89599609375,
122
+ 15.209931373596191
123
+ ],
124
+ "size": [
125
+ 75,
126
+ 26
127
+ ],
128
+ "flags": {},
129
+ "order": 22,
130
+ "mode": 0,
131
+ "inputs": [
132
+ {
133
+ "name": "",
134
+ "type": "*",
135
+ "widget": {
136
+ "name": "value"
137
+ },
138
+ "link": 442
139
+ }
140
+ ],
141
+ "outputs": [
142
+ {
143
+ "name": "INT",
144
+ "type": "INT",
145
+ "slot_index": 0,
146
+ "links": [
147
+ 443,
148
+ 448
149
+ ]
150
+ }
151
+ ],
152
+ "properties": {
153
+ "showOutputText": true,
154
+ "horizontal": false
155
+ }
156
+ },
157
+ {
158
+ "id": 63,
159
+ "type": "KSamplerAdvanced",
160
+ "pos": [
161
+ 4274,
162
+ -795
163
+ ],
164
+ "size": [
165
+ 315,
166
+ 518
167
+ ],
168
+ "flags": {},
169
+ "order": 30,
170
+ "mode": 0,
171
+ "inputs": [
172
+ {
173
+ "name": "model",
174
+ "type": "MODEL",
175
+ "link": 734
176
+ },
177
+ {
178
+ "name": "positive",
179
+ "type": "CONDITIONING",
180
+ "link": 211
181
+ },
182
+ {
183
+ "name": "negative",
184
+ "type": "CONDITIONING",
185
+ "link": 212
186
+ },
187
+ {
188
+ "name": "latent_image",
189
+ "type": "LATENT",
190
+ "link": 176
191
+ },
192
+ {
193
+ "name": "noise_seed",
194
+ "type": "INT",
195
+ "widget": {
196
+ "name": "noise_seed"
197
+ },
198
+ "link": 430
199
+ }
200
+ ],
201
+ "outputs": [
202
+ {
203
+ "name": "LATENT",
204
+ "shape": 3,
205
+ "type": "LATENT",
206
+ "slot_index": 0,
207
+ "links": [
208
+ 441
209
+ ]
210
+ }
211
+ ],
212
+ "properties": {
213
+ "cnr_id": "comfy-core",
214
+ "ver": "0.3.27",
215
+ "Node name for S&R": "KSamplerAdvanced"
216
+ },
217
+ "widgets_values": [
218
+ "enable",
219
+ 95094378581456,
220
+ "randomize",
221
+ 40,
222
+ 7,
223
+ "dpmpp_3m_sde_gpu",
224
+ "simple",
225
+ 20,
226
+ 40,
227
+ "disable"
228
+ ]
229
+ },
230
+ {
231
+ "id": 149,
232
+ "type": "Reroute",
233
+ "pos": [
234
+ 3730,
235
+ -125
236
+ ],
237
+ "size": [
238
+ 82,
239
+ 26
240
+ ],
241
+ "flags": {},
242
+ "order": 24,
243
+ "mode": 0,
244
+ "inputs": [
245
+ {
246
+ "name": "",
247
+ "type": "*",
248
+ "link": 437
249
+ }
250
+ ],
251
+ "outputs": [
252
+ {
253
+ "name": "MODEL",
254
+ "type": "MODEL",
255
+ "slot_index": 0,
256
+ "links": [
257
+ 444,
258
+ 734
259
+ ]
260
+ }
261
+ ],
262
+ "properties": {
263
+ "showOutputText": true,
264
+ "horizontal": false
265
+ }
266
+ },
267
+ {
268
+ "id": 106,
269
+ "type": "Note",
270
+ "pos": [
271
+ -990,
272
+ -936
273
+ ],
274
+ "size": [
275
+ 210,
276
+ 140.22134399414062
277
+ ],
278
+ "flags": {},
279
+ "order": 0,
280
+ "mode": 0,
281
+ "inputs": [],
282
+ "outputs": [],
283
+ "properties": {
284
+ "text": ""
285
+ },
286
+ "widgets_values": [
287
+ "To simuulate image coming via API, right click on pipe input and click 'convert init_img to input'.\n(or face swap)\n\nDrag output from Vyro Image to String to init_img connector"
288
+ ],
289
+ "color": "#432",
290
+ "bgcolor": "#653"
291
+ },
292
+ {
293
+ "id": 103,
294
+ "type": "Vyro Image to String",
295
+ "pos": [
296
+ -932,
297
+ -711
298
+ ],
299
+ "size": [
300
+ 168,
301
+ 26
302
+ ],
303
+ "flags": {},
304
+ "order": 8,
305
+ "mode": 0,
306
+ "inputs": [
307
+ {
308
+ "name": "image",
309
+ "type": "IMAGE",
310
+ "link": 326
311
+ }
312
+ ],
313
+ "outputs": [
314
+ {
315
+ "name": "string",
316
+ "shape": 3,
317
+ "type": "STRING",
318
+ "slot_index": 0,
319
+ "links": [
320
+ 950
321
+ ]
322
+ }
323
+ ],
324
+ "properties": {
325
+ "aux_id": "Vyro-ai/vyro-workflows",
326
+ "ver": "bf85eeb45327c24b3fa1c946e86a28fae2056e80",
327
+ "Node name for S&R": "Vyro Image to String"
328
+ },
329
+ "widgets_values": []
330
+ },
331
+ {
332
+ "id": 68,
333
+ "type": "Note",
334
+ "pos": [
335
+ 111,
336
+ -1016
337
+ ],
338
+ "size": [
339
+ 228.4390106201172,
340
+ 416.8971862792969
341
+ ],
342
+ "flags": {},
343
+ "order": 1,
344
+ "mode": 0,
345
+ "inputs": [],
346
+ "outputs": [],
347
+ "properties": {
348
+ "text": ""
349
+ },
350
+ "widgets_values": [
351
+ "640 x 1536\n768 x 1344\n832 x 1216\n896 x 1152\n1024 x 1024\n1152 x 896\n1216 x 832\n1344 x 768\n1536 x 640\n\n\"3d render\",\n \"abstract art\",\n \"anime\",\n \"architecture\",\n \"cinematic\",\n \"conceptual art\",\n \"dark fantasy\",\n \"fantasy realism\",\n \"fashion\",\n \"graffiti\",\n \"illustration\",\n \"interior design\",\n \"logo\",\n \"painting\",\n \"photography:1.2\",\n \"portrait photography\",\n \"poster\",\n \"product:0.75\",\n \"sticker\",\n \"surrealism\",\n \"typography\",\n \"ukiyo-e\",\n \"vector design\",\n \"vibrant digital artwork:0.1\",\n \"watercolor\",\n \"wildlife photography\""
352
+ ],
353
+ "color": "#432",
354
+ "bgcolor": "#653"
355
+ },
356
+ {
357
+ "id": 2,
358
+ "type": "VAELoader",
359
+ "pos": [
360
+ -1066,
361
+ -1026
362
+ ],
363
+ "size": [
364
+ 315,
365
+ 58
366
+ ],
367
+ "flags": {},
368
+ "order": 2,
369
+ "mode": 0,
370
+ "inputs": [],
371
+ "outputs": [
372
+ {
373
+ "name": "VAE",
374
+ "shape": 3,
375
+ "type": "VAE",
376
+ "slot_index": 0,
377
+ "links": [
378
+ 209
379
+ ]
380
+ }
381
+ ],
382
+ "properties": {
383
+ "cnr_id": "comfy-core",
384
+ "ver": "0.3.27",
385
+ "Node name for S&R": "VAELoader"
386
+ },
387
+ "widgets_values": [
388
+ "sdxl_vae.safetensors"
389
+ ]
390
+ },
391
+ {
392
+ "id": 27,
393
+ "type": "Vyro Prompt Analyzer",
394
+ "pos": [
395
+ 761,
396
+ -525
397
+ ],
398
+ "size": [
399
+ 315,
400
+ 142
401
+ ],
402
+ "flags": {},
403
+ "order": 12,
404
+ "mode": 0,
405
+ "inputs": [
406
+ {
407
+ "name": "vyro_params",
408
+ "type": "VYRO_PARAMS",
409
+ "link": 48
410
+ },
411
+ {
412
+ "name": "styles",
413
+ "type": "LIST",
414
+ "link": 75
415
+ },
416
+ {
417
+ "name": "prompt_tree",
418
+ "type": "DICT",
419
+ "link": 50
420
+ },
421
+ {
422
+ "name": "classifier",
423
+ "type": "TRANSFORMER",
424
+ "link": 51
425
+ }
426
+ ],
427
+ "outputs": [
428
+ {
429
+ "name": "vyro_params",
430
+ "shape": 3,
431
+ "type": "VYRO_PARAMS",
432
+ "slot_index": 0,
433
+ "links": [
434
+ 147,
435
+ 1205
436
+ ]
437
+ },
438
+ {
439
+ "name": "style",
440
+ "shape": 3,
441
+ "type": "STYLE",
442
+ "slot_index": 1,
443
+ "links": [
444
+ 1147
445
+ ]
446
+ }
447
+ ],
448
+ "properties": {
449
+ "aux_id": "Vyro-ai/vyro-workflows",
450
+ "ver": "bf85eeb45327c24b3fa1c946e86a28fae2056e80",
451
+ "Node name for S&R": "Vyro Prompt Analyzer"
452
+ },
453
+ "widgets_values": [
454
+ "enabled",
455
+ "disabled"
456
+ ]
457
+ },
458
+ {
459
+ "id": 385,
460
+ "type": "Reroute",
461
+ "pos": [
462
+ 643,
463
+ -895
464
+ ],
465
+ "size": [
466
+ 82,
467
+ 26
468
+ ],
469
+ "flags": {},
470
+ "order": 14,
471
+ "mode": 0,
472
+ "inputs": [
473
+ {
474
+ "name": "",
475
+ "type": "*",
476
+ "link": 1147
477
+ }
478
+ ],
479
+ "outputs": [
480
+ {
481
+ "name": "STYLE",
482
+ "type": "STYLE",
483
+ "slot_index": 0,
484
+ "links": [
485
+ 1152,
486
+ 1153
487
+ ]
488
+ }
489
+ ],
490
+ "properties": {
491
+ "showOutputText": true,
492
+ "horizontal": false
493
+ }
494
+ },
495
+ {
496
+ "id": 386,
497
+ "type": "Reroute",
498
+ "pos": [
499
+ 620,
500
+ -1042
501
+ ],
502
+ "size": [
503
+ 75,
504
+ 26
505
+ ],
506
+ "flags": {},
507
+ "order": 9,
508
+ "mode": 0,
509
+ "inputs": [
510
+ {
511
+ "name": "",
512
+ "type": "*",
513
+ "link": 1149
514
+ }
515
+ ],
516
+ "outputs": [
517
+ {
518
+ "name": "DICT",
519
+ "type": "DICT",
520
+ "slot_index": 0,
521
+ "links": [
522
+ 1150,
523
+ 1155
524
+ ]
525
+ }
526
+ ],
527
+ "properties": {
528
+ "showOutputText": true,
529
+ "horizontal": false
530
+ }
531
+ },
532
+ {
533
+ "id": 387,
534
+ "type": "Reroute",
535
+ "pos": [
536
+ 639,
537
+ -968
538
+ ],
539
+ "size": [
540
+ 75,
541
+ 26
542
+ ],
543
+ "flags": {},
544
+ "order": 10,
545
+ "mode": 0,
546
+ "inputs": [
547
+ {
548
+ "name": "",
549
+ "type": "*",
550
+ "link": 1148
551
+ }
552
+ ],
553
+ "outputs": [
554
+ {
555
+ "name": "DICT",
556
+ "type": "DICT",
557
+ "slot_index": 0,
558
+ "links": [
559
+ 1151,
560
+ 1156
561
+ ]
562
+ }
563
+ ],
564
+ "properties": {
565
+ "showOutputText": true,
566
+ "horizontal": false
567
+ }
568
+ },
569
+ {
570
+ "id": 384,
571
+ "type": "Vyro Oneflow Refiner Model Loader",
572
+ "pos": [
573
+ 871,
574
+ -826
575
+ ],
576
+ "size": [
577
+ 330,
578
+ 66
579
+ ],
580
+ "flags": {},
581
+ "order": 17,
582
+ "mode": 0,
583
+ "inputs": [
584
+ {
585
+ "name": "style",
586
+ "type": "STYLE",
587
+ "link": 1153
588
+ },
589
+ {
590
+ "name": "prompt_tree",
591
+ "type": "DICT",
592
+ "link": 1155
593
+ },
594
+ {
595
+ "name": "model_config",
596
+ "type": "DICT",
597
+ "link": 1156
598
+ }
599
+ ],
600
+ "outputs": [
601
+ {
602
+ "name": "refiner_model",
603
+ "shape": 3,
604
+ "type": "MODEL",
605
+ "slot_index": 0,
606
+ "links": [
607
+ 1165
608
+ ]
609
+ },
610
+ {
611
+ "name": "refiner_clip",
612
+ "shape": 3,
613
+ "type": "CLIP",
614
+ "slot_index": 1,
615
+ "links": [
616
+ 1158
617
+ ]
618
+ }
619
+ ],
620
+ "properties": {
621
+ "aux_id": "Vyro-ai/vyro-workflows",
622
+ "ver": "bf85eeb45327c24b3fa1c946e86a28fae2056e80",
623
+ "Node name for S&R": "Vyro Oneflow Refiner Model Loader"
624
+ },
625
+ "widgets_values": []
626
+ },
627
+ {
628
+ "id": 57,
629
+ "type": "VAEDecode",
630
+ "pos": [
631
+ 5441,
632
+ -641
633
+ ],
634
+ "size": [
635
+ 210,
636
+ 46
637
+ ],
638
+ "flags": {},
639
+ "order": 33,
640
+ "mode": 0,
641
+ "inputs": [
642
+ {
643
+ "name": "samples",
644
+ "type": "LATENT",
645
+ "link": 728
646
+ },
647
+ {
648
+ "name": "vae",
649
+ "type": "VAE",
650
+ "link": 323
651
+ }
652
+ ],
653
+ "outputs": [
654
+ {
655
+ "name": "IMAGE",
656
+ "shape": 3,
657
+ "type": "IMAGE",
658
+ "slot_index": 0,
659
+ "links": [
660
+ 1142
661
+ ]
662
+ }
663
+ ],
664
+ "properties": {
665
+ "cnr_id": "comfy-core",
666
+ "ver": "0.3.27",
667
+ "Node name for S&R": "VAEDecode"
668
+ },
669
+ "widgets_values": []
670
+ },
671
+ {
672
+ "id": 84,
673
+ "type": "PreviewImage",
674
+ "pos": [
675
+ 5746,
676
+ -719
677
+ ],
678
+ "size": [
679
+ 511.7968444824219,
680
+ 426.3374938964844
681
+ ],
682
+ "flags": {},
683
+ "order": 34,
684
+ "mode": 0,
685
+ "inputs": [
686
+ {
687
+ "name": "images",
688
+ "type": "IMAGE",
689
+ "link": 1142
690
+ }
691
+ ],
692
+ "outputs": [],
693
+ "properties": {
694
+ "cnr_id": "comfy-core",
695
+ "ver": "0.3.27",
696
+ "Node name for S&R": "PreviewImage"
697
+ },
698
+ "widgets_values": [
699
+ ""
700
+ ]
701
+ },
702
+ {
703
+ "id": 145,
704
+ "type": "KSamplerAdvanced",
705
+ "pos": [
706
+ 4694,
707
+ -293
708
+ ],
709
+ "size": [
710
+ 315,
711
+ 518
712
+ ],
713
+ "flags": {},
714
+ "order": 31,
715
+ "mode": 0,
716
+ "inputs": [
717
+ {
718
+ "name": "model",
719
+ "type": "MODEL",
720
+ "link": 732
721
+ },
722
+ {
723
+ "name": "positive",
724
+ "type": "CONDITIONING",
725
+ "link": 439
726
+ },
727
+ {
728
+ "name": "negative",
729
+ "type": "CONDITIONING",
730
+ "link": 440
731
+ },
732
+ {
733
+ "name": "latent_image",
734
+ "type": "LATENT",
735
+ "link": 441
736
+ },
737
+ {
738
+ "name": "noise_seed",
739
+ "type": "INT",
740
+ "widget": {
741
+ "name": "noise_seed"
742
+ },
743
+ "link": 443
744
+ }
745
+ ],
746
+ "outputs": [
747
+ {
748
+ "name": "LATENT",
749
+ "shape": 3,
750
+ "type": "LATENT",
751
+ "slot_index": 0,
752
+ "links": [
753
+ 447
754
+ ]
755
+ }
756
+ ],
757
+ "title": "Step1",
758
+ "properties": {
759
+ "cnr_id": "comfy-core",
760
+ "ver": "0.3.27",
761
+ "Node name for S&R": "KSamplerAdvanced"
762
+ },
763
+ "widgets_values": [
764
+ "enable",
765
+ 1114398158696762,
766
+ "randomize",
767
+ 30,
768
+ 7,
769
+ "ddim",
770
+ "karras",
771
+ 25,
772
+ 27,
773
+ "enable"
774
+ ]
775
+ },
776
+ {
777
+ "id": 151,
778
+ "type": "KSamplerAdvanced",
779
+ "pos": [
780
+ 5085,
781
+ -268
782
+ ],
783
+ "size": [
784
+ 315,
785
+ 518
786
+ ],
787
+ "flags": {},
788
+ "order": 32,
789
+ "mode": 0,
790
+ "inputs": [
791
+ {
792
+ "name": "model",
793
+ "type": "MODEL",
794
+ "link": 444
795
+ },
796
+ {
797
+ "name": "positive",
798
+ "type": "CONDITIONING",
799
+ "link": 445
800
+ },
801
+ {
802
+ "name": "negative",
803
+ "type": "CONDITIONING",
804
+ "link": 446
805
+ },
806
+ {
807
+ "name": "latent_image",
808
+ "type": "LATENT",
809
+ "link": 447
810
+ },
811
+ {
812
+ "name": "noise_seed",
813
+ "type": "INT",
814
+ "widget": {
815
+ "name": "noise_seed"
816
+ },
817
+ "link": 448
818
+ }
819
+ ],
820
+ "outputs": [
821
+ {
822
+ "name": "LATENT",
823
+ "shape": 3,
824
+ "type": "LATENT",
825
+ "slot_index": 0,
826
+ "links": [
827
+ 728
828
+ ]
829
+ }
830
+ ],
831
+ "title": "Step2",
832
+ "properties": {
833
+ "cnr_id": "comfy-core",
834
+ "ver": "0.3.27",
835
+ "Node name for S&R": "KSamplerAdvanced"
836
+ },
837
+ "widgets_values": [
838
+ "disable",
839
+ 1089159239373161,
840
+ "randomize",
841
+ 30,
842
+ 7,
843
+ "ddim",
844
+ "karras",
845
+ 27,
846
+ 30,
847
+ "enable"
848
+ ]
849
+ },
850
+ {
851
+ "id": 254,
852
+ "type": "Reroute",
853
+ "pos": [
854
+ 1837,
855
+ -1031
856
+ ],
857
+ "size": [
858
+ 82,
859
+ 26
860
+ ],
861
+ "flags": {},
862
+ "order": 19,
863
+ "mode": 0,
864
+ "inputs": [
865
+ {
866
+ "name": "",
867
+ "type": "*",
868
+ "link": 1164
869
+ }
870
+ ],
871
+ "outputs": [
872
+ {
873
+ "name": "MODEL",
874
+ "type": "MODEL",
875
+ "slot_index": 0,
876
+ "links": [
877
+ 1195
878
+ ]
879
+ }
880
+ ],
881
+ "properties": {
882
+ "showOutputText": true,
883
+ "horizontal": false
884
+ }
885
+ },
886
+ {
887
+ "id": 28,
888
+ "type": "Vyro Prompt Encoder",
889
+ "pos": [
890
+ 1908,
891
+ -959
892
+ ],
893
+ "size": [
894
+ 367.79998779296875,
895
+ 118
896
+ ],
897
+ "flags": {},
898
+ "order": 21,
899
+ "mode": 0,
900
+ "inputs": [
901
+ {
902
+ "name": "base_clip",
903
+ "type": "CLIP",
904
+ "link": 1144
905
+ },
906
+ {
907
+ "name": "refiner_clip",
908
+ "type": "CLIP",
909
+ "link": 1158
910
+ },
911
+ {
912
+ "name": "params",
913
+ "type": "VYRO_PARAMS",
914
+ "link": 1205
915
+ }
916
+ ],
917
+ "outputs": [
918
+ {
919
+ "name": "base_positive",
920
+ "shape": 3,
921
+ "type": "CONDITIONING",
922
+ "slot_index": 0,
923
+ "links": [
924
+ 1166
925
+ ]
926
+ },
927
+ {
928
+ "name": "base_negative",
929
+ "shape": 3,
930
+ "type": "CONDITIONING",
931
+ "slot_index": 1,
932
+ "links": [
933
+ 1167
934
+ ]
935
+ },
936
+ {
937
+ "name": "refiner_positive",
938
+ "shape": 3,
939
+ "type": "CONDITIONING",
940
+ "slot_index": 2,
941
+ "links": [
942
+ 211,
943
+ 435
944
+ ]
945
+ },
946
+ {
947
+ "name": "refiner_negative",
948
+ "shape": 3,
949
+ "type": "CONDITIONING",
950
+ "slot_index": 3,
951
+ "links": [
952
+ 212,
953
+ 436
954
+ ]
955
+ }
956
+ ],
957
+ "properties": {
958
+ "aux_id": "Vyro-ai/vyro-workflows",
959
+ "ver": "bf85eeb45327c24b3fa1c946e86a28fae2056e80",
960
+ "Node name for S&R": "Vyro Prompt Encoder"
961
+ },
962
+ "widgets_values": [
963
+ 0
964
+ ]
965
+ },
966
+ {
967
+ "id": 55,
968
+ "type": "Reroute",
969
+ "pos": [
970
+ 2227,
971
+ -688
972
+ ],
973
+ "size": [
974
+ 75,
975
+ 26
976
+ ],
977
+ "flags": {},
978
+ "order": 13,
979
+ "mode": 0,
980
+ "inputs": [
981
+ {
982
+ "name": "",
983
+ "type": "*",
984
+ "link": 147
985
+ }
986
+ ],
987
+ "outputs": [
988
+ {
989
+ "name": "",
990
+ "type": "VYRO_PARAMS",
991
+ "slot_index": 0,
992
+ "links": [
993
+ 624
994
+ ]
995
+ }
996
+ ],
997
+ "properties": {
998
+ "showOutputText": false,
999
+ "horizontal": false
1000
+ }
1001
+ },
1002
+ {
1003
+ "id": 135,
1004
+ "type": "Vyro Mode Filter",
1005
+ "pos": [
1006
+ 2738,
1007
+ -899
1008
+ ],
1009
+ "size": [
1010
+ 315,
1011
+ 250
1012
+ ],
1013
+ "flags": {},
1014
+ "order": 15,
1015
+ "mode": 0,
1016
+ "inputs": [
1017
+ {
1018
+ "name": "vyro_params",
1019
+ "type": "VYRO_PARAMS",
1020
+ "link": 624
1021
+ }
1022
+ ],
1023
+ "outputs": [
1024
+ {
1025
+ "name": "vyro_params",
1026
+ "shape": 3,
1027
+ "type": "VYRO_PARAMS",
1028
+ "slot_index": 0,
1029
+ "links": [
1030
+ 429
1031
+ ]
1032
+ }
1033
+ ],
1034
+ "properties": {
1035
+ "aux_id": "Vyro-ai/vyro-workflows",
1036
+ "ver": "bf85eeb45327c24b3fa1c946e86a28fae2056e80",
1037
+ "Node name for S&R": "Vyro Mode Filter"
1038
+ },
1039
+ "widgets_values": [
1040
+ "allow",
1041
+ "allow",
1042
+ "allow"
1043
+ ]
1044
+ },
1045
+ {
1046
+ "id": 101,
1047
+ "type": "Reroute",
1048
+ "pos": [
1049
+ 2229,
1050
+ -766
1051
+ ],
1052
+ "size": [
1053
+ 75,
1054
+ 26
1055
+ ],
1056
+ "flags": {},
1057
+ "order": 20,
1058
+ "mode": 0,
1059
+ "inputs": [
1060
+ {
1061
+ "name": "",
1062
+ "type": "*",
1063
+ "link": 1165
1064
+ }
1065
+ ],
1066
+ "outputs": [
1067
+ {
1068
+ "name": "",
1069
+ "type": "MODEL",
1070
+ "slot_index": 0,
1071
+ "links": [
1072
+ 437,
1073
+ 732
1074
+ ]
1075
+ }
1076
+ ],
1077
+ "properties": {
1078
+ "showOutputText": false,
1079
+ "horizontal": false
1080
+ }
1081
+ },
1082
+ {
1083
+ "id": 390,
1084
+ "type": "KSamplerAdvanced",
1085
+ "pos": [
1086
+ 3448,
1087
+ -1001
1088
+ ],
1089
+ "size": [
1090
+ 315,
1091
+ 334
1092
+ ],
1093
+ "flags": {},
1094
+ "order": 27,
1095
+ "mode": 0,
1096
+ "inputs": [
1097
+ {
1098
+ "name": "model",
1099
+ "type": "MODEL",
1100
+ "link": 1196
1101
+ },
1102
+ {
1103
+ "name": "positive",
1104
+ "type": "CONDITIONING",
1105
+ "link": 1166
1106
+ },
1107
+ {
1108
+ "name": "negative",
1109
+ "type": "CONDITIONING",
1110
+ "link": 1167
1111
+ },
1112
+ {
1113
+ "name": "latent_image",
1114
+ "type": "LATENT",
1115
+ "link": 1168
1116
+ },
1117
+ {
1118
+ "name": "noise_seed",
1119
+ "type": "INT",
1120
+ "widget": {
1121
+ "name": "noise_seed"
1122
+ },
1123
+ "link": 1169
1124
+ }
1125
+ ],
1126
+ "outputs": [
1127
+ {
1128
+ "name": "LATENT",
1129
+ "shape": 3,
1130
+ "type": "LATENT",
1131
+ "slot_index": 0,
1132
+ "links": [
1133
+ 1204
1134
+ ]
1135
+ }
1136
+ ],
1137
+ "properties": {
1138
+ "cnr_id": "comfy-core",
1139
+ "ver": "0.3.27",
1140
+ "Node name for S&R": "KSamplerAdvanced"
1141
+ },
1142
+ "widgets_values": [
1143
+ "enable",
1144
+ 144870654803597,
1145
+ "randomize",
1146
+ 20,
1147
+ 8,
1148
+ "euler",
1149
+ "normal",
1150
+ 0,
1151
+ 10000,
1152
+ "disable"
1153
+ ]
1154
+ },
1155
+ {
1156
+ "id": 100,
1157
+ "type": "VAELoader",
1158
+ "pos": [
1159
+ 1540,
1160
+ 143
1161
+ ],
1162
+ "size": [
1163
+ 412.548095703125,
1164
+ 58
1165
+ ],
1166
+ "flags": {},
1167
+ "order": 3,
1168
+ "mode": 0,
1169
+ "inputs": [],
1170
+ "outputs": [
1171
+ {
1172
+ "name": "VAE",
1173
+ "shape": 3,
1174
+ "type": "VAE",
1175
+ "slot_index": 0,
1176
+ "links": [
1177
+ 323
1178
+ ]
1179
+ }
1180
+ ],
1181
+ "properties": {
1182
+ "cnr_id": "comfy-core",
1183
+ "ver": "0.3.27",
1184
+ "Node name for S&R": "VAELoader"
1185
+ },
1186
+ "widgets_values": [
1187
+ "vae-ft-mse-840000-ema-pruned.safetensors"
1188
+ ]
1189
+ },
1190
+ {
1191
+ "id": 48,
1192
+ "type": "VyroLatentInterposer",
1193
+ "pos": [
1194
+ 3861,
1195
+ -1029
1196
+ ],
1197
+ "size": [
1198
+ 315,
1199
+ 82
1200
+ ],
1201
+ "flags": {},
1202
+ "order": 28,
1203
+ "mode": 0,
1204
+ "inputs": [
1205
+ {
1206
+ "name": "samples",
1207
+ "type": "LATENT",
1208
+ "link": 1204
1209
+ }
1210
+ ],
1211
+ "outputs": [
1212
+ {
1213
+ "name": "LATENT",
1214
+ "shape": 3,
1215
+ "type": "LATENT",
1216
+ "slot_index": 0,
1217
+ "links": [
1218
+ 140
1219
+ ]
1220
+ }
1221
+ ],
1222
+ "properties": {
1223
+ "aux_id": "Vyro-ai/vyro-workflows",
1224
+ "ver": "bf85eeb45327c24b3fa1c946e86a28fae2056e80",
1225
+ "Node name for S&R": "VyroLatentInterposer"
1226
+ },
1227
+ "widgets_values": [
1228
+ "xl",
1229
+ "v1"
1230
+ ]
1231
+ },
1232
+ {
1233
+ "id": 393,
1234
+ "type": "Reroute",
1235
+ "pos": [
1236
+ 3095,
1237
+ -1056
1238
+ ],
1239
+ "size": [
1240
+ 75,
1241
+ 26
1242
+ ],
1243
+ "flags": {},
1244
+ "order": 23,
1245
+ "mode": 0,
1246
+ "inputs": [
1247
+ {
1248
+ "name": "",
1249
+ "type": "*",
1250
+ "link": 1195
1251
+ }
1252
+ ],
1253
+ "outputs": [
1254
+ {
1255
+ "name": "",
1256
+ "type": "MODEL",
1257
+ "slot_index": 0,
1258
+ "links": [
1259
+ 1196
1260
+ ]
1261
+ }
1262
+ ],
1263
+ "properties": {
1264
+ "showOutputText": false,
1265
+ "horizontal": false
1266
+ }
1267
+ },
1268
+ {
1269
+ "id": 102,
1270
+ "type": "LoadImage",
1271
+ "pos": [
1272
+ -1527,
1273
+ -880
1274
+ ],
1275
+ "size": [
1276
+ 315,
1277
+ 314
1278
+ ],
1279
+ "flags": {},
1280
+ "order": 4,
1281
+ "mode": 0,
1282
+ "inputs": [],
1283
+ "outputs": [
1284
+ {
1285
+ "name": "IMAGE",
1286
+ "shape": 3,
1287
+ "type": "IMAGE",
1288
+ "slot_index": 0,
1289
+ "links": [
1290
+ 326
1291
+ ]
1292
+ },
1293
+ {
1294
+ "name": "MASK",
1295
+ "shape": 3,
1296
+ "type": "MASK",
1297
+ "links": null
1298
+ }
1299
+ ],
1300
+ "properties": {
1301
+ "cnr_id": "comfy-core",
1302
+ "ver": "0.3.27",
1303
+ "Node name for S&R": "LoadImage"
1304
+ },
1305
+ "widgets_values": [
1306
+ "example.png",
1307
+ "image",
1308
+ ""
1309
+ ]
1310
+ },
1311
+ {
1312
+ "id": 25,
1313
+ "type": "Vyro Config Loader",
1314
+ "pos": [
1315
+ 125,
1316
+ -526
1317
+ ],
1318
+ "size": [
1319
+ 315,
1320
+ 162
1321
+ ],
1322
+ "flags": {},
1323
+ "order": 5,
1324
+ "mode": 0,
1325
+ "inputs": [],
1326
+ "outputs": [
1327
+ {
1328
+ "name": "styles",
1329
+ "shape": 3,
1330
+ "type": "LIST",
1331
+ "slot_index": 0,
1332
+ "links": [
1333
+ 75
1334
+ ]
1335
+ },
1336
+ {
1337
+ "name": "prompt_tree",
1338
+ "shape": 3,
1339
+ "type": "DICT",
1340
+ "slot_index": 1,
1341
+ "links": [
1342
+ 50,
1343
+ 1149
1344
+ ]
1345
+ },
1346
+ {
1347
+ "name": "model_config",
1348
+ "shape": 3,
1349
+ "type": "DICT",
1350
+ "slot_index": 2,
1351
+ "links": [
1352
+ 1148
1353
+ ]
1354
+ },
1355
+ {
1356
+ "name": "classifier",
1357
+ "shape": 3,
1358
+ "type": "TRANSFORMER",
1359
+ "slot_index": 3,
1360
+ "links": [
1361
+ 51
1362
+ ]
1363
+ },
1364
+ {
1365
+ "name": "unweighted_styles",
1366
+ "shape": 3,
1367
+ "type": "LIST",
1368
+ "slot_index": 4,
1369
+ "links": []
1370
+ }
1371
+ ],
1372
+ "properties": {
1373
+ "aux_id": "Vyro-ai/vyro-workflows",
1374
+ "ver": "bf85eeb45327c24b3fa1c946e86a28fae2056e80",
1375
+ "Node name for S&R": "Vyro Config Loader"
1376
+ },
1377
+ "widgets_values": [
1378
+ "v5.json",
1379
+ "en_core_web_trf-3.8.0"
1380
+ ]
1381
+ },
1382
+ {
1383
+ "id": 382,
1384
+ "type": "Vyro Oneflow Base Model Loader",
1385
+ "pos": [
1386
+ 644.8353881835938,
1387
+ -1211.888671875
1388
+ ],
1389
+ "size": [
1390
+ 315,
1391
+ 78
1392
+ ],
1393
+ "flags": {},
1394
+ "order": 6,
1395
+ "mode": 0,
1396
+ "inputs": [],
1397
+ "outputs": [
1398
+ {
1399
+ "name": "base_model",
1400
+ "shape": 3,
1401
+ "type": "MODEL",
1402
+ "slot_index": 0,
1403
+ "links": [
1404
+ 1206
1405
+ ]
1406
+ },
1407
+ {
1408
+ "name": "base_clip",
1409
+ "shape": 3,
1410
+ "type": "CLIP",
1411
+ "slot_index": 1,
1412
+ "links": [
1413
+ 1146
1414
+ ]
1415
+ }
1416
+ ],
1417
+ "properties": {
1418
+ "aux_id": "Vyro-ai/vyro-workflows",
1419
+ "ver": "bf85eeb45327c24b3fa1c946e86a28fae2056e80",
1420
+ "Node name for S&R": "Vyro Oneflow Base Model Loader"
1421
+ },
1422
+ "widgets_values": [
1423
+ "sd_xl_base_1.0.safetensors"
1424
+ ]
1425
+ },
1426
+ {
1427
+ "id": 383,
1428
+ "type": "Vyro LoRa Loader",
1429
+ "pos": [
1430
+ 1137.228515625,
1431
+ -1234.281005859375
1432
+ ],
1433
+ "size": [
1434
+ 292.20001220703125,
1435
+ 106
1436
+ ],
1437
+ "flags": {},
1438
+ "order": 16,
1439
+ "mode": 0,
1440
+ "inputs": [
1441
+ {
1442
+ "name": "base_model",
1443
+ "type": "MODEL",
1444
+ "link": 1206
1445
+ },
1446
+ {
1447
+ "name": "base_clip",
1448
+ "type": "CLIP",
1449
+ "link": 1146
1450
+ },
1451
+ {
1452
+ "name": "style",
1453
+ "type": "STYLE",
1454
+ "link": 1152
1455
+ },
1456
+ {
1457
+ "name": "prompt_tree",
1458
+ "type": "DICT",
1459
+ "link": 1150
1460
+ },
1461
+ {
1462
+ "name": "model_config",
1463
+ "type": "DICT",
1464
+ "link": 1151
1465
+ }
1466
+ ],
1467
+ "outputs": [
1468
+ {
1469
+ "name": "base_model",
1470
+ "shape": 3,
1471
+ "type": "MODEL",
1472
+ "slot_index": 0,
1473
+ "links": [
1474
+ 1164
1475
+ ]
1476
+ },
1477
+ {
1478
+ "name": "base_clip",
1479
+ "shape": 3,
1480
+ "type": "CLIP",
1481
+ "slot_index": 1,
1482
+ "links": [
1483
+ 1144
1484
+ ]
1485
+ }
1486
+ ],
1487
+ "properties": {
1488
+ "aux_id": "Vyro-ai/vyro-workflows",
1489
+ "ver": "bf85eeb45327c24b3fa1c946e86a28fae2056e80",
1490
+ "Node name for S&R": "Vyro LoRa Loader"
1491
+ },
1492
+ "widgets_values": []
1493
+ },
1494
+ {
1495
+ "id": 144,
1496
+ "type": "Vyro Param Extractor",
1497
+ "pos": [
1498
+ 2857.13623046875,
1499
+ -499.512939453125
1500
+ ],
1501
+ "size": [
1502
+ 418.1999816894531,
1503
+ 466
1504
+ ],
1505
+ "flags": {},
1506
+ "order": 18,
1507
+ "mode": 0,
1508
+ "inputs": [
1509
+ {
1510
+ "name": "vyro_params",
1511
+ "type": "VYRO_PARAMS",
1512
+ "link": 429
1513
+ }
1514
+ ],
1515
+ "outputs": [
1516
+ {
1517
+ "name": "latents",
1518
+ "shape": 3,
1519
+ "type": "LATENT",
1520
+ "slot_index": 0,
1521
+ "links": [
1522
+ 1168
1523
+ ]
1524
+ },
1525
+ {
1526
+ "name": "user_prompt",
1527
+ "shape": 3,
1528
+ "type": "STRING",
1529
+ "links": null
1530
+ },
1531
+ {
1532
+ "name": "user_neg_prompt",
1533
+ "shape": 3,
1534
+ "type": "STRING",
1535
+ "links": null
1536
+ },
1537
+ {
1538
+ "name": "mode",
1539
+ "shape": 3,
1540
+ "type": "STRING",
1541
+ "links": null
1542
+ },
1543
+ {
1544
+ "name": "cfg",
1545
+ "shape": 3,
1546
+ "type": "FLOAT",
1547
+ "links": null
1548
+ },
1549
+ {
1550
+ "name": "batch_size",
1551
+ "shape": 3,
1552
+ "type": "INT",
1553
+ "links": null
1554
+ },
1555
+ {
1556
+ "name": "steps",
1557
+ "shape": 3,
1558
+ "type": "INT",
1559
+ "links": null
1560
+ },
1561
+ {
1562
+ "name": "width",
1563
+ "shape": 3,
1564
+ "type": "INT",
1565
+ "links": null
1566
+ },
1567
+ {
1568
+ "name": "height",
1569
+ "shape": 3,
1570
+ "type": "INT",
1571
+ "links": null
1572
+ },
1573
+ {
1574
+ "name": "seed",
1575
+ "shape": 3,
1576
+ "type": "INT",
1577
+ "slot_index": 9,
1578
+ "links": [
1579
+ 430,
1580
+ 442,
1581
+ 1169
1582
+ ]
1583
+ },
1584
+ {
1585
+ "name": "denoise",
1586
+ "shape": 3,
1587
+ "type": "FLOAT",
1588
+ "slot_index": 10,
1589
+ "links": []
1590
+ },
1591
+ {
1592
+ "name": "stage1_strength",
1593
+ "shape": 3,
1594
+ "type": "FLOAT",
1595
+ "links": null
1596
+ },
1597
+ {
1598
+ "name": "stage2_strength",
1599
+ "shape": 3,
1600
+ "type": "FLOAT",
1601
+ "links": []
1602
+ },
1603
+ {
1604
+ "name": "efficiency_multiplier",
1605
+ "shape": 3,
1606
+ "type": "FLOAT",
1607
+ "links": [
1608
+ 1209
1609
+ ]
1610
+ },
1611
+ {
1612
+ "name": "style",
1613
+ "shape": 3,
1614
+ "type": "STRING",
1615
+ "links": null
1616
+ },
1617
+ {
1618
+ "name": "final_positive_prompt",
1619
+ "shape": 3,
1620
+ "type": "STRING",
1621
+ "slot_index": 15,
1622
+ "links": []
1623
+ },
1624
+ {
1625
+ "name": "final_negative_prompt",
1626
+ "shape": 3,
1627
+ "type": "STRING",
1628
+ "links": null
1629
+ },
1630
+ {
1631
+ "name": "is_raw",
1632
+ "shape": 3,
1633
+ "type": "BOOLEAN",
1634
+ "links": null
1635
+ },
1636
+ {
1637
+ "name": "final_negative_prompt",
1638
+ "shape": 3,
1639
+ "type": "STRING",
1640
+ "links": null
1641
+ },
1642
+ {
1643
+ "name": "is_raw",
1644
+ "shape": 3,
1645
+ "type": "BOOLEAN",
1646
+ "links": null
1647
+ },
1648
+ {
1649
+ "name": "face_swap_img",
1650
+ "shape": 3,
1651
+ "type": "IMAGE",
1652
+ "links": null
1653
+ },
1654
+ {
1655
+ "name": "image_prompt_weights",
1656
+ "shape": 3,
1657
+ "type": "STRING",
1658
+ "links": null
1659
+ },
1660
+ {
1661
+ "name": "control_net_input_img",
1662
+ "shape": 3,
1663
+ "type": "IMAGE",
1664
+ "links": null
1665
+ }
1666
+ ],
1667
+ "properties": {
1668
+ "aux_id": "Vyro-ai/vyro-workflows",
1669
+ "ver": "bf85eeb45327c24b3fa1c946e86a28fae2056e80",
1670
+ "Node name for S&R": "Vyro Param Extractor"
1671
+ },
1672
+ "widgets_values": []
1673
+ },
1674
+ {
1675
+ "id": 49,
1676
+ "type": "LatentUpscaleBy",
1677
+ "pos": [
1678
+ 4250,
1679
+ -1046
1680
+ ],
1681
+ "size": [
1682
+ 315,
1683
+ 82
1684
+ ],
1685
+ "flags": {},
1686
+ "order": 29,
1687
+ "mode": 0,
1688
+ "inputs": [
1689
+ {
1690
+ "name": "samples",
1691
+ "type": "LATENT",
1692
+ "link": 140
1693
+ },
1694
+ {
1695
+ "name": "scale_by",
1696
+ "type": "FLOAT",
1697
+ "widget": {
1698
+ "name": "scale_by"
1699
+ },
1700
+ "link": 1209
1701
+ }
1702
+ ],
1703
+ "outputs": [
1704
+ {
1705
+ "name": "LATENT",
1706
+ "shape": 3,
1707
+ "type": "LATENT",
1708
+ "slot_index": 0,
1709
+ "links": [
1710
+ 176
1711
+ ]
1712
+ }
1713
+ ],
1714
+ "properties": {
1715
+ "cnr_id": "comfy-core",
1716
+ "ver": "0.3.27",
1717
+ "Node name for S&R": "LatentUpscaleBy"
1718
+ },
1719
+ "widgets_values": [
1720
+ "nearest-exact",
1721
+ 1.333
1722
+ ]
1723
+ },
1724
+ {
1725
+ "id": 16,
1726
+ "type": "Vyro Pipe Input V2",
1727
+ "pos": [
1728
+ -584,
1729
+ -1007
1730
+ ],
1731
+ "size": [
1732
+ 400,
1733
+ 732
1734
+ ],
1735
+ "flags": {},
1736
+ "order": 11,
1737
+ "mode": 0,
1738
+ "inputs": [
1739
+ {
1740
+ "name": "vae",
1741
+ "type": "VAE",
1742
+ "link": 210
1743
+ },
1744
+ {
1745
+ "name": "init_img",
1746
+ "type": "STRING",
1747
+ "widget": {
1748
+ "name": "init_img"
1749
+ },
1750
+ "link": 950
1751
+ }
1752
+ ],
1753
+ "outputs": [
1754
+ {
1755
+ "name": "vyro_params",
1756
+ "shape": 3,
1757
+ "type": "VYRO_PARAMS",
1758
+ "slot_index": 0,
1759
+ "links": [
1760
+ 48
1761
+ ]
1762
+ }
1763
+ ],
1764
+ "properties": {
1765
+ "aux_id": "Vyro-ai/vyro-workflows",
1766
+ "ver": "bf85eeb45327c24b3fa1c946e86a28fae2056e80",
1767
+ "Node name for S&R": "Vyro Pipe Input V2"
1768
+ },
1769
+ "widgets_values": [
1770
+ "professor working in lab",
1771
+ "t2i",
1772
+ "perlin1",
1773
+ "",
1774
+ 1,
1775
+ 8,
1776
+ 10,
1777
+ 1024,
1778
+ 1024,
1779
+ 2890257064,
1780
+ "randomize",
1781
+ "",
1782
+ 0.8,
1783
+ 1,
1784
+ 1,
1785
+ 1
1786
+ ]
1787
+ }
1788
+ ],
1789
+ "links": [
1790
+ [
1791
+ 48,
1792
+ 16,
1793
+ 0,
1794
+ 27,
1795
+ 0,
1796
+ "VYRO_PARAMS"
1797
+ ],
1798
+ [
1799
+ 50,
1800
+ 25,
1801
+ 1,
1802
+ 27,
1803
+ 2,
1804
+ "DICT"
1805
+ ],
1806
+ [
1807
+ 51,
1808
+ 25,
1809
+ 3,
1810
+ 27,
1811
+ 3,
1812
+ "TRANSFORMER"
1813
+ ],
1814
+ [
1815
+ 75,
1816
+ 25,
1817
+ 0,
1818
+ 27,
1819
+ 1,
1820
+ "LIST"
1821
+ ],
1822
+ [
1823
+ 140,
1824
+ 48,
1825
+ 0,
1826
+ 49,
1827
+ 0,
1828
+ "LATENT"
1829
+ ],
1830
+ [
1831
+ 147,
1832
+ 27,
1833
+ 0,
1834
+ 55,
1835
+ 0,
1836
+ "*"
1837
+ ],
1838
+ [
1839
+ 176,
1840
+ 49,
1841
+ 0,
1842
+ 63,
1843
+ 3,
1844
+ "LATENT"
1845
+ ],
1846
+ [
1847
+ 209,
1848
+ 2,
1849
+ 0,
1850
+ 71,
1851
+ 0,
1852
+ "*"
1853
+ ],
1854
+ [
1855
+ 210,
1856
+ 71,
1857
+ 0,
1858
+ 16,
1859
+ 0,
1860
+ "VAE"
1861
+ ],
1862
+ [
1863
+ 211,
1864
+ 28,
1865
+ 2,
1866
+ 63,
1867
+ 1,
1868
+ "CONDITIONING"
1869
+ ],
1870
+ [
1871
+ 212,
1872
+ 28,
1873
+ 3,
1874
+ 63,
1875
+ 2,
1876
+ "CONDITIONING"
1877
+ ],
1878
+ [
1879
+ 323,
1880
+ 100,
1881
+ 0,
1882
+ 57,
1883
+ 1,
1884
+ "VAE"
1885
+ ],
1886
+ [
1887
+ 326,
1888
+ 102,
1889
+ 0,
1890
+ 103,
1891
+ 0,
1892
+ "IMAGE"
1893
+ ],
1894
+ [
1895
+ 429,
1896
+ 135,
1897
+ 0,
1898
+ 144,
1899
+ 0,
1900
+ "VYRO_PARAMS"
1901
+ ],
1902
+ [
1903
+ 430,
1904
+ 144,
1905
+ 9,
1906
+ 63,
1907
+ 4,
1908
+ "INT"
1909
+ ],
1910
+ [
1911
+ 435,
1912
+ 28,
1913
+ 2,
1914
+ 147,
1915
+ 0,
1916
+ "*"
1917
+ ],
1918
+ [
1919
+ 436,
1920
+ 28,
1921
+ 3,
1922
+ 148,
1923
+ 0,
1924
+ "*"
1925
+ ],
1926
+ [
1927
+ 437,
1928
+ 101,
1929
+ 0,
1930
+ 149,
1931
+ 0,
1932
+ "*"
1933
+ ],
1934
+ [
1935
+ 439,
1936
+ 147,
1937
+ 0,
1938
+ 145,
1939
+ 1,
1940
+ "CONDITIONING"
1941
+ ],
1942
+ [
1943
+ 440,
1944
+ 148,
1945
+ 0,
1946
+ 145,
1947
+ 2,
1948
+ "CONDITIONING"
1949
+ ],
1950
+ [
1951
+ 441,
1952
+ 63,
1953
+ 0,
1954
+ 145,
1955
+ 3,
1956
+ "LATENT"
1957
+ ],
1958
+ [
1959
+ 442,
1960
+ 144,
1961
+ 9,
1962
+ 150,
1963
+ 0,
1964
+ "*"
1965
+ ],
1966
+ [
1967
+ 443,
1968
+ 150,
1969
+ 0,
1970
+ 145,
1971
+ 4,
1972
+ "INT"
1973
+ ],
1974
+ [
1975
+ 444,
1976
+ 149,
1977
+ 0,
1978
+ 151,
1979
+ 0,
1980
+ "MODEL"
1981
+ ],
1982
+ [
1983
+ 445,
1984
+ 147,
1985
+ 0,
1986
+ 151,
1987
+ 1,
1988
+ "CONDITIONING"
1989
+ ],
1990
+ [
1991
+ 446,
1992
+ 148,
1993
+ 0,
1994
+ 151,
1995
+ 2,
1996
+ "CONDITIONING"
1997
+ ],
1998
+ [
1999
+ 447,
2000
+ 145,
2001
+ 0,
2002
+ 151,
2003
+ 3,
2004
+ "LATENT"
2005
+ ],
2006
+ [
2007
+ 448,
2008
+ 150,
2009
+ 0,
2010
+ 151,
2011
+ 4,
2012
+ "INT"
2013
+ ],
2014
+ [
2015
+ 624,
2016
+ 55,
2017
+ 0,
2018
+ 135,
2019
+ 0,
2020
+ "VYRO_PARAMS"
2021
+ ],
2022
+ [
2023
+ 728,
2024
+ 151,
2025
+ 0,
2026
+ 57,
2027
+ 0,
2028
+ "LATENT"
2029
+ ],
2030
+ [
2031
+ 732,
2032
+ 101,
2033
+ 0,
2034
+ 145,
2035
+ 0,
2036
+ "MODEL"
2037
+ ],
2038
+ [
2039
+ 734,
2040
+ 149,
2041
+ 0,
2042
+ 63,
2043
+ 0,
2044
+ "MODEL"
2045
+ ],
2046
+ [
2047
+ 950,
2048
+ 103,
2049
+ 0,
2050
+ 16,
2051
+ 1,
2052
+ "STRING"
2053
+ ],
2054
+ [
2055
+ 1142,
2056
+ 57,
2057
+ 0,
2058
+ 84,
2059
+ 0,
2060
+ "IMAGE"
2061
+ ],
2062
+ [
2063
+ 1144,
2064
+ 383,
2065
+ 1,
2066
+ 28,
2067
+ 0,
2068
+ "CLIP"
2069
+ ],
2070
+ [
2071
+ 1146,
2072
+ 382,
2073
+ 1,
2074
+ 383,
2075
+ 1,
2076
+ "CLIP"
2077
+ ],
2078
+ [
2079
+ 1147,
2080
+ 27,
2081
+ 1,
2082
+ 385,
2083
+ 0,
2084
+ "*"
2085
+ ],
2086
+ [
2087
+ 1148,
2088
+ 25,
2089
+ 2,
2090
+ 387,
2091
+ 0,
2092
+ "*"
2093
+ ],
2094
+ [
2095
+ 1149,
2096
+ 25,
2097
+ 1,
2098
+ 386,
2099
+ 0,
2100
+ "*"
2101
+ ],
2102
+ [
2103
+ 1150,
2104
+ 386,
2105
+ 0,
2106
+ 383,
2107
+ 3,
2108
+ "DICT"
2109
+ ],
2110
+ [
2111
+ 1151,
2112
+ 387,
2113
+ 0,
2114
+ 383,
2115
+ 4,
2116
+ "DICT"
2117
+ ],
2118
+ [
2119
+ 1152,
2120
+ 385,
2121
+ 0,
2122
+ 383,
2123
+ 2,
2124
+ "STYLE"
2125
+ ],
2126
+ [
2127
+ 1153,
2128
+ 385,
2129
+ 0,
2130
+ 384,
2131
+ 0,
2132
+ "STYLE"
2133
+ ],
2134
+ [
2135
+ 1155,
2136
+ 386,
2137
+ 0,
2138
+ 384,
2139
+ 1,
2140
+ "DICT"
2141
+ ],
2142
+ [
2143
+ 1156,
2144
+ 387,
2145
+ 0,
2146
+ 384,
2147
+ 2,
2148
+ "DICT"
2149
+ ],
2150
+ [
2151
+ 1158,
2152
+ 384,
2153
+ 1,
2154
+ 28,
2155
+ 1,
2156
+ "CLIP"
2157
+ ],
2158
+ [
2159
+ 1164,
2160
+ 383,
2161
+ 0,
2162
+ 254,
2163
+ 0,
2164
+ "*"
2165
+ ],
2166
+ [
2167
+ 1165,
2168
+ 384,
2169
+ 0,
2170
+ 101,
2171
+ 0,
2172
+ "*"
2173
+ ],
2174
+ [
2175
+ 1166,
2176
+ 28,
2177
+ 0,
2178
+ 390,
2179
+ 1,
2180
+ "CONDITIONING"
2181
+ ],
2182
+ [
2183
+ 1167,
2184
+ 28,
2185
+ 1,
2186
+ 390,
2187
+ 2,
2188
+ "CONDITIONING"
2189
+ ],
2190
+ [
2191
+ 1168,
2192
+ 144,
2193
+ 0,
2194
+ 390,
2195
+ 3,
2196
+ "LATENT"
2197
+ ],
2198
+ [
2199
+ 1169,
2200
+ 144,
2201
+ 9,
2202
+ 390,
2203
+ 4,
2204
+ "INT"
2205
+ ],
2206
+ [
2207
+ 1195,
2208
+ 254,
2209
+ 0,
2210
+ 393,
2211
+ 0,
2212
+ "*"
2213
+ ],
2214
+ [
2215
+ 1196,
2216
+ 393,
2217
+ 0,
2218
+ 390,
2219
+ 0,
2220
+ "MODEL"
2221
+ ],
2222
+ [
2223
+ 1204,
2224
+ 390,
2225
+ 0,
2226
+ 48,
2227
+ 0,
2228
+ "LATENT"
2229
+ ],
2230
+ [
2231
+ 1205,
2232
+ 27,
2233
+ 0,
2234
+ 28,
2235
+ 2,
2236
+ "VYRO_PARAMS"
2237
+ ],
2238
+ [
2239
+ 1206,
2240
+ 382,
2241
+ 0,
2242
+ 383,
2243
+ 0,
2244
+ "MODEL"
2245
+ ],
2246
+ [
2247
+ 1209,
2248
+ 144,
2249
+ 13,
2250
+ 49,
2251
+ 1,
2252
+ "FLOAT"
2253
+ ]
2254
+ ],
2255
+ "groups": [
2256
+ {
2257
+ "id": 1,
2258
+ "title": "I/O",
2259
+ "bounding": [
2260
+ -673,
2261
+ -1108,
2262
+ 1094,
2263
+ 787
2264
+ ],
2265
+ "color": "#3f789e",
2266
+ "font_size": 24,
2267
+ "flags": {}
2268
+ },
2269
+ {
2270
+ "id": 2,
2271
+ "title": "Analysis/Encoding",
2272
+ "bounding": [
2273
+ 842,
2274
+ -1110,
2275
+ 1491,
2276
+ 810
2277
+ ],
2278
+ "color": "#8AA",
2279
+ "font_size": 24,
2280
+ "flags": {}
2281
+ },
2282
+ {
2283
+ "id": 3,
2284
+ "title": "T2I/I2I",
2285
+ "bounding": [
2286
+ 2661,
2287
+ -1160,
2288
+ 3644,
2289
+ 1695
2290
+ ],
2291
+ "color": "#3f789e",
2292
+ "font_size": 24,
2293
+ "flags": {}
2294
+ }
2295
+ ],
2296
+ "config": {},
2297
+ "extra": {
2298
+ "ds": {
2299
+ "scale": 0.2853116706110015,
2300
+ "offset": [
2301
+ 2577.217082241404,
2302
+ 2131.7449438691942
2303
+ ]
2304
+ }
2305
+ },
2306
+ "version": 0.4
2307
+ }
Imagine/Workflows/Imaginev5-ultra-Workflow.json ADDED
@@ -0,0 +1,1433 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "id": "f2d9da4d-a1e8-47f3-b08e-e6bc0ea46feb",
3
+ "revision": 0,
4
+ "last_node_id": 99,
5
+ "last_link_id": 263,
6
+ "nodes": [
7
+ {
8
+ "id": 35,
9
+ "type": "Reroute",
10
+ "pos": [
11
+ 530,
12
+ 770
13
+ ],
14
+ "size": [
15
+ 75,
16
+ 26
17
+ ],
18
+ "flags": {},
19
+ "order": 0,
20
+ "mode": 0,
21
+ "inputs": [
22
+ {
23
+ "name": "",
24
+ "type": "*",
25
+ "link": null
26
+ }
27
+ ],
28
+ "outputs": [
29
+ {
30
+ "name": "",
31
+ "type": "*",
32
+ "links": []
33
+ }
34
+ ],
35
+ "properties": {
36
+ "showOutputText": false,
37
+ "horizontal": false
38
+ }
39
+ },
40
+ {
41
+ "id": 36,
42
+ "type": "Reroute",
43
+ "pos": [
44
+ 530,
45
+ 820
46
+ ],
47
+ "size": [
48
+ 75,
49
+ 26
50
+ ],
51
+ "flags": {},
52
+ "order": 1,
53
+ "mode": 0,
54
+ "inputs": [
55
+ {
56
+ "name": "",
57
+ "type": "*",
58
+ "link": null
59
+ }
60
+ ],
61
+ "outputs": [
62
+ {
63
+ "name": "",
64
+ "type": "*",
65
+ "links": []
66
+ }
67
+ ],
68
+ "properties": {
69
+ "showOutputText": false,
70
+ "horizontal": false
71
+ }
72
+ },
73
+ {
74
+ "id": 45,
75
+ "type": "Reroute",
76
+ "pos": [
77
+ 840,
78
+ 50
79
+ ],
80
+ "size": [
81
+ 75,
82
+ 26
83
+ ],
84
+ "flags": {},
85
+ "order": 5,
86
+ "mode": 0,
87
+ "inputs": [
88
+ {
89
+ "name": "",
90
+ "type": "*",
91
+ "link": 82
92
+ }
93
+ ],
94
+ "outputs": [
95
+ {
96
+ "name": "",
97
+ "type": "CLIP",
98
+ "slot_index": 0,
99
+ "links": [
100
+ 83,
101
+ 84
102
+ ]
103
+ }
104
+ ],
105
+ "properties": {
106
+ "showOutputText": false,
107
+ "horizontal": false
108
+ }
109
+ },
110
+ {
111
+ "id": 66,
112
+ "type": "Reroute",
113
+ "pos": [
114
+ 830,
115
+ 110
116
+ ],
117
+ "size": [
118
+ 75,
119
+ 26
120
+ ],
121
+ "flags": {},
122
+ "order": 6,
123
+ "mode": 0,
124
+ "inputs": [
125
+ {
126
+ "name": "",
127
+ "type": "*",
128
+ "link": 150
129
+ }
130
+ ],
131
+ "outputs": [
132
+ {
133
+ "name": "",
134
+ "type": "VAE",
135
+ "slot_index": 0,
136
+ "links": [
137
+ 188
138
+ ]
139
+ }
140
+ ],
141
+ "properties": {
142
+ "showOutputText": false,
143
+ "horizontal": false
144
+ }
145
+ },
146
+ {
147
+ "id": 87,
148
+ "type": "Reroute",
149
+ "pos": [
150
+ 85,
151
+ 253
152
+ ],
153
+ "size": [
154
+ 75,
155
+ 26
156
+ ],
157
+ "flags": {},
158
+ "order": 9,
159
+ "mode": 0,
160
+ "inputs": [
161
+ {
162
+ "name": "",
163
+ "type": "*",
164
+ "widget": {
165
+ "name": "value"
166
+ },
167
+ "link": 227
168
+ }
169
+ ],
170
+ "outputs": [
171
+ {
172
+ "name": "",
173
+ "type": "STRING",
174
+ "slot_index": 0,
175
+ "links": [
176
+ 228,
177
+ 229
178
+ ]
179
+ }
180
+ ],
181
+ "properties": {
182
+ "showOutputText": false,
183
+ "horizontal": false
184
+ }
185
+ },
186
+ {
187
+ "id": 92,
188
+ "type": "EmptyLatentImage",
189
+ "pos": [
190
+ 1001,
191
+ 1057
192
+ ],
193
+ "size": [
194
+ 315,
195
+ 106
196
+ ],
197
+ "flags": {},
198
+ "order": 11,
199
+ "mode": 0,
200
+ "inputs": [
201
+ {
202
+ "name": "width",
203
+ "type": "INT",
204
+ "widget": {
205
+ "name": "width"
206
+ },
207
+ "link": 241
208
+ },
209
+ {
210
+ "name": "height",
211
+ "type": "INT",
212
+ "widget": {
213
+ "name": "height"
214
+ },
215
+ "link": 242
216
+ }
217
+ ],
218
+ "outputs": [
219
+ {
220
+ "name": "LATENT",
221
+ "shape": 3,
222
+ "type": "LATENT",
223
+ "slot_index": 0,
224
+ "links": [
225
+ 243
226
+ ]
227
+ }
228
+ ],
229
+ "properties": {
230
+ "cnr_id": "comfy-core",
231
+ "ver": "0.3.27",
232
+ "Node name for S&R": "EmptyLatentImage"
233
+ },
234
+ "widgets_values": [
235
+ 512,
236
+ 512,
237
+ 1
238
+ ]
239
+ },
240
+ {
241
+ "id": 86,
242
+ "type": "Vyro Param Extractor",
243
+ "pos": [
244
+ -379,
245
+ 228
246
+ ],
247
+ "size": [
248
+ 418.1999816894531,
249
+ 466
250
+ ],
251
+ "flags": {},
252
+ "order": 8,
253
+ "mode": 0,
254
+ "inputs": [
255
+ {
256
+ "name": "vyro_params",
257
+ "type": "VYRO_PARAMS",
258
+ "link": 226
259
+ }
260
+ ],
261
+ "outputs": [
262
+ {
263
+ "name": "latents",
264
+ "shape": 3,
265
+ "type": "LATENT",
266
+ "slot_index": 0,
267
+ "links": null
268
+ },
269
+ {
270
+ "name": "user_prompt",
271
+ "shape": 3,
272
+ "type": "STRING",
273
+ "slot_index": 1,
274
+ "links": [
275
+ 227
276
+ ]
277
+ },
278
+ {
279
+ "name": "user_neg_prompt",
280
+ "shape": 3,
281
+ "type": "STRING",
282
+ "slot_index": 2,
283
+ "links": [
284
+ 238
285
+ ]
286
+ },
287
+ {
288
+ "name": "mode",
289
+ "shape": 3,
290
+ "type": "STRING",
291
+ "links": null
292
+ },
293
+ {
294
+ "name": "cfg",
295
+ "shape": 3,
296
+ "type": "FLOAT",
297
+ "links": null
298
+ },
299
+ {
300
+ "name": "batch_size",
301
+ "shape": 3,
302
+ "type": "INT",
303
+ "links": null
304
+ },
305
+ {
306
+ "name": "steps",
307
+ "shape": 3,
308
+ "type": "INT",
309
+ "links": null
310
+ },
311
+ {
312
+ "name": "width",
313
+ "shape": 3,
314
+ "type": "INT",
315
+ "slot_index": 7,
316
+ "links": [
317
+ 241
318
+ ]
319
+ },
320
+ {
321
+ "name": "height",
322
+ "shape": 3,
323
+ "type": "INT",
324
+ "slot_index": 8,
325
+ "links": [
326
+ 242
327
+ ]
328
+ },
329
+ {
330
+ "name": "seed",
331
+ "shape": 3,
332
+ "type": "INT",
333
+ "links": [
334
+ 247,
335
+ 248
336
+ ]
337
+ },
338
+ {
339
+ "name": "denoise",
340
+ "shape": 3,
341
+ "type": "FLOAT",
342
+ "links": null
343
+ },
344
+ {
345
+ "name": "stage1_strength",
346
+ "shape": 3,
347
+ "type": "FLOAT",
348
+ "links": null
349
+ },
350
+ {
351
+ "name": "stage2_strength",
352
+ "shape": 3,
353
+ "type": "FLOAT",
354
+ "links": null
355
+ },
356
+ {
357
+ "name": "efficiency_multiplier",
358
+ "shape": 3,
359
+ "type": "FLOAT",
360
+ "links": null
361
+ },
362
+ {
363
+ "name": "style",
364
+ "shape": 3,
365
+ "type": "STRING",
366
+ "links": null
367
+ },
368
+ {
369
+ "name": "final_positive_prompt",
370
+ "shape": 3,
371
+ "type": "STRING",
372
+ "links": null
373
+ },
374
+ {
375
+ "name": "final_negative_prompt",
376
+ "shape": 3,
377
+ "type": "STRING",
378
+ "links": null
379
+ },
380
+ {
381
+ "name": "is_raw",
382
+ "shape": 3,
383
+ "type": "BOOLEAN",
384
+ "links": null
385
+ },
386
+ {
387
+ "name": "final_negative_prompt",
388
+ "shape": 3,
389
+ "type": "STRING",
390
+ "links": null
391
+ },
392
+ {
393
+ "name": "is_raw",
394
+ "shape": 3,
395
+ "type": "BOOLEAN",
396
+ "links": null
397
+ },
398
+ {
399
+ "name": "face_swap_img",
400
+ "shape": 3,
401
+ "type": "IMAGE",
402
+ "links": null
403
+ },
404
+ {
405
+ "name": "image_prompt_weights",
406
+ "shape": 3,
407
+ "type": "STRING",
408
+ "links": null
409
+ },
410
+ {
411
+ "name": "control_net_input_img",
412
+ "shape": 3,
413
+ "type": "IMAGE",
414
+ "links": null
415
+ }
416
+ ],
417
+ "properties": {
418
+ "aux_id": "Vyro-ai/vyro-workflows",
419
+ "ver": "987bd627ca63ee6815b42082eccf1b2199bf53ed",
420
+ "Node name for S&R": "Vyro Param Extractor"
421
+ },
422
+ "widgets_values": []
423
+ },
424
+ {
425
+ "id": 89,
426
+ "type": "Reroute",
427
+ "pos": [
428
+ 141,
429
+ 329
430
+ ],
431
+ "size": [
432
+ 75,
433
+ 26
434
+ ],
435
+ "flags": {},
436
+ "order": 10,
437
+ "mode": 0,
438
+ "inputs": [
439
+ {
440
+ "name": "",
441
+ "type": "*",
442
+ "widget": {
443
+ "name": "value"
444
+ },
445
+ "link": 238
446
+ }
447
+ ],
448
+ "outputs": [
449
+ {
450
+ "name": "",
451
+ "type": "STRING",
452
+ "slot_index": 0,
453
+ "links": [
454
+ 239,
455
+ 240
456
+ ]
457
+ }
458
+ ],
459
+ "properties": {
460
+ "showOutputText": false,
461
+ "horizontal": false
462
+ }
463
+ },
464
+ {
465
+ "id": 30,
466
+ "type": "CLIPTextEncodeSDXL",
467
+ "pos": [
468
+ 1009,
469
+ 728
470
+ ],
471
+ "size": [
472
+ 400,
473
+ 270.0000305175781
474
+ ],
475
+ "flags": {},
476
+ "order": 13,
477
+ "mode": 0,
478
+ "inputs": [
479
+ {
480
+ "name": "clip",
481
+ "type": "CLIP",
482
+ "link": 84
483
+ },
484
+ {
485
+ "name": "text_g",
486
+ "type": "STRING",
487
+ "widget": {
488
+ "name": "text_g"
489
+ },
490
+ "link": 239
491
+ },
492
+ {
493
+ "name": "text_l",
494
+ "type": "STRING",
495
+ "widget": {
496
+ "name": "text_l"
497
+ },
498
+ "link": 240
499
+ },
500
+ {
501
+ "name": "width",
502
+ "type": "INT",
503
+ "widget": {
504
+ "name": "width"
505
+ },
506
+ "link": 234
507
+ },
508
+ {
509
+ "name": "height",
510
+ "type": "INT",
511
+ "widget": {
512
+ "name": "height"
513
+ },
514
+ "link": 235
515
+ },
516
+ {
517
+ "name": "target_width",
518
+ "type": "INT",
519
+ "widget": {
520
+ "name": "target_width"
521
+ },
522
+ "link": 236
523
+ },
524
+ {
525
+ "name": "target_height",
526
+ "type": "INT",
527
+ "widget": {
528
+ "name": "target_height"
529
+ },
530
+ "link": 237
531
+ }
532
+ ],
533
+ "outputs": [
534
+ {
535
+ "name": "CONDITIONING",
536
+ "shape": 3,
537
+ "type": "CONDITIONING",
538
+ "slot_index": 0,
539
+ "links": [
540
+ 159,
541
+ 163
542
+ ]
543
+ }
544
+ ],
545
+ "title": "negativePromt_sdxl1Base",
546
+ "properties": {
547
+ "cnr_id": "comfy-core",
548
+ "ver": "0.3.27",
549
+ "Node name for S&R": "CLIPTextEncodeSDXL"
550
+ },
551
+ "widgets_values": [
552
+ 4096,
553
+ 4096,
554
+ 0,
555
+ 0,
556
+ 4096,
557
+ 4096,
558
+ "blurry, bokeh,",
559
+ "blurry, bokeh,"
560
+ ],
561
+ "color": "#322",
562
+ "bgcolor": "#533"
563
+ },
564
+ {
565
+ "id": 29,
566
+ "type": "CLIPTextEncodeSDXL",
567
+ "pos": [
568
+ 1001,
569
+ 383
570
+ ],
571
+ "size": [
572
+ 400,
573
+ 270.0000305175781
574
+ ],
575
+ "flags": {},
576
+ "order": 12,
577
+ "mode": 0,
578
+ "inputs": [
579
+ {
580
+ "name": "clip",
581
+ "type": "CLIP",
582
+ "link": 83
583
+ },
584
+ {
585
+ "name": "text_g",
586
+ "type": "STRING",
587
+ "widget": {
588
+ "name": "text_g"
589
+ },
590
+ "link": 228
591
+ },
592
+ {
593
+ "name": "text_l",
594
+ "type": "STRING",
595
+ "widget": {
596
+ "name": "text_l"
597
+ },
598
+ "link": 229
599
+ },
600
+ {
601
+ "name": "width",
602
+ "type": "INT",
603
+ "widget": {
604
+ "name": "width"
605
+ },
606
+ "link": 230
607
+ },
608
+ {
609
+ "name": "height",
610
+ "type": "INT",
611
+ "widget": {
612
+ "name": "height"
613
+ },
614
+ "link": 231
615
+ },
616
+ {
617
+ "name": "target_width",
618
+ "type": "INT",
619
+ "widget": {
620
+ "name": "target_width"
621
+ },
622
+ "link": 232
623
+ },
624
+ {
625
+ "name": "target_height",
626
+ "type": "INT",
627
+ "widget": {
628
+ "name": "target_height"
629
+ },
630
+ "link": 233
631
+ }
632
+ ],
633
+ "outputs": [
634
+ {
635
+ "name": "CONDITIONING",
636
+ "shape": 3,
637
+ "type": "CONDITIONING",
638
+ "slot_index": 0,
639
+ "links": [
640
+ 158,
641
+ 162
642
+ ]
643
+ }
644
+ ],
645
+ "title": "positivePromt_sdxl1Base",
646
+ "properties": {
647
+ "cnr_id": "comfy-core",
648
+ "ver": "0.3.27",
649
+ "Node name for S&R": "CLIPTextEncodeSDXL"
650
+ },
651
+ "widgets_values": [
652
+ 4096,
653
+ 4096,
654
+ 0,
655
+ 0,
656
+ 4096,
657
+ 4096,
658
+ "photo of beautiful 24 years woman, closeup, peach fuzz, skin pores, teal punk rocker hair style, sitting on a couch",
659
+ "photo of beautiful 24 years woman, closeup, peach fuzz, skin pores, teal punk rocker hair style, sitting on a couch"
660
+ ],
661
+ "color": "#232",
662
+ "bgcolor": "#353"
663
+ },
664
+ {
665
+ "id": 67,
666
+ "type": "KSamplerAdvanced",
667
+ "pos": [
668
+ 1571,
669
+ 209
670
+ ],
671
+ "size": [
672
+ 315,
673
+ 546
674
+ ],
675
+ "flags": {
676
+ "collapsed": false
677
+ },
678
+ "order": 14,
679
+ "mode": 0,
680
+ "inputs": [
681
+ {
682
+ "name": "model",
683
+ "type": "MODEL",
684
+ "link": 156
685
+ },
686
+ {
687
+ "name": "positive",
688
+ "type": "CONDITIONING",
689
+ "link": 158
690
+ },
691
+ {
692
+ "name": "negative",
693
+ "type": "CONDITIONING",
694
+ "link": 159
695
+ },
696
+ {
697
+ "name": "latent_image",
698
+ "type": "LATENT",
699
+ "link": 243
700
+ },
701
+ {
702
+ "name": "noise_seed",
703
+ "type": "INT",
704
+ "widget": {
705
+ "name": "noise_seed"
706
+ },
707
+ "link": 247
708
+ }
709
+ ],
710
+ "outputs": [
711
+ {
712
+ "name": "LATENT",
713
+ "shape": 3,
714
+ "type": "LATENT",
715
+ "slot_index": 0,
716
+ "links": [
717
+ 261
718
+ ]
719
+ }
720
+ ],
721
+ "properties": {
722
+ "cnr_id": "comfy-core",
723
+ "ver": "0.3.27",
724
+ "Node name for S&R": "KSamplerAdvanced"
725
+ },
726
+ "widgets_values": [
727
+ "enable",
728
+ 987654321357988,
729
+ "increment",
730
+ 6,
731
+ 1.1,
732
+ "dpmpp_2m_sde",
733
+ "karras",
734
+ 0,
735
+ 12,
736
+ "enable"
737
+ ]
738
+ },
739
+ {
740
+ "id": 68,
741
+ "type": "KSamplerAdvanced",
742
+ "pos": [
743
+ 2263,
744
+ 212
745
+ ],
746
+ "size": [
747
+ 315,
748
+ 546
749
+ ],
750
+ "flags": {},
751
+ "order": 16,
752
+ "mode": 0,
753
+ "inputs": [
754
+ {
755
+ "name": "model",
756
+ "type": "MODEL",
757
+ "link": 161
758
+ },
759
+ {
760
+ "name": "positive",
761
+ "type": "CONDITIONING",
762
+ "link": 162
763
+ },
764
+ {
765
+ "name": "negative",
766
+ "type": "CONDITIONING",
767
+ "link": 163
768
+ },
769
+ {
770
+ "name": "latent_image",
771
+ "type": "LATENT",
772
+ "link": 246
773
+ },
774
+ {
775
+ "name": "noise_seed",
776
+ "type": "INT",
777
+ "widget": {
778
+ "name": "noise_seed"
779
+ },
780
+ "link": 248
781
+ }
782
+ ],
783
+ "outputs": [
784
+ {
785
+ "name": "LATENT",
786
+ "shape": 3,
787
+ "type": "LATENT",
788
+ "slot_index": 0,
789
+ "links": [
790
+ 189
791
+ ]
792
+ }
793
+ ],
794
+ "properties": {
795
+ "cnr_id": "comfy-core",
796
+ "ver": "0.3.27",
797
+ "Node name for S&R": "KSamplerAdvanced"
798
+ },
799
+ "widgets_values": [
800
+ "enable",
801
+ 987654321357988,
802
+ "increment",
803
+ 12,
804
+ 1.1,
805
+ "dpmpp_2m_sde",
806
+ "karras",
807
+ 5,
808
+ 10000,
809
+ "disable"
810
+ ]
811
+ },
812
+ {
813
+ "id": 88,
814
+ "type": "PrimitiveNode",
815
+ "pos": [
816
+ 655,
817
+ 488
818
+ ],
819
+ "size": [
820
+ 210,
821
+ 82
822
+ ],
823
+ "flags": {},
824
+ "order": 2,
825
+ "mode": 0,
826
+ "inputs": [],
827
+ "outputs": [
828
+ {
829
+ "name": "INT",
830
+ "type": "INT",
831
+ "widget": {
832
+ "name": "width"
833
+ },
834
+ "slot_index": 0,
835
+ "links": [
836
+ 230,
837
+ 231,
838
+ 232,
839
+ 233,
840
+ 234,
841
+ 235,
842
+ 236,
843
+ 237
844
+ ]
845
+ }
846
+ ],
847
+ "properties": {
848
+ "Run widget replace on values": false
849
+ },
850
+ "widgets_values": [
851
+ 4096,
852
+ "fixed"
853
+ ]
854
+ },
855
+ {
856
+ "id": 93,
857
+ "type": "LatentUpscaleBy",
858
+ "pos": [
859
+ 1920,
860
+ 87
861
+ ],
862
+ "size": [
863
+ 315,
864
+ 82
865
+ ],
866
+ "flags": {},
867
+ "order": 15,
868
+ "mode": 0,
869
+ "inputs": [
870
+ {
871
+ "name": "samples",
872
+ "type": "LATENT",
873
+ "link": 261
874
+ }
875
+ ],
876
+ "outputs": [
877
+ {
878
+ "name": "LATENT",
879
+ "shape": 3,
880
+ "type": "LATENT",
881
+ "slot_index": 0,
882
+ "links": [
883
+ 246
884
+ ]
885
+ }
886
+ ],
887
+ "properties": {
888
+ "cnr_id": "comfy-core",
889
+ "ver": "0.3.27",
890
+ "Node name for S&R": "LatentUpscaleBy"
891
+ },
892
+ "widgets_values": [
893
+ "nearest-exact",
894
+ 2
895
+ ]
896
+ },
897
+ {
898
+ "id": 46,
899
+ "type": "Reroute",
900
+ "pos": [
901
+ 840,
902
+ 10
903
+ ],
904
+ "size": [
905
+ 75,
906
+ 26
907
+ ],
908
+ "flags": {},
909
+ "order": 4,
910
+ "mode": 0,
911
+ "inputs": [
912
+ {
913
+ "name": "",
914
+ "type": "*",
915
+ "link": 262
916
+ }
917
+ ],
918
+ "outputs": [
919
+ {
920
+ "name": "",
921
+ "type": "MODEL",
922
+ "slot_index": 0,
923
+ "links": [
924
+ 156,
925
+ 161
926
+ ]
927
+ }
928
+ ],
929
+ "properties": {
930
+ "showOutputText": false,
931
+ "horizontal": false
932
+ }
933
+ },
934
+ {
935
+ "id": 20,
936
+ "type": "CheckpointLoaderSimple",
937
+ "pos": [
938
+ -474,
939
+ -165
940
+ ],
941
+ "size": [
942
+ 645.7987060546875,
943
+ 98
944
+ ],
945
+ "flags": {},
946
+ "order": 3,
947
+ "mode": 0,
948
+ "inputs": [],
949
+ "outputs": [
950
+ {
951
+ "name": "MODEL",
952
+ "shape": 3,
953
+ "type": "MODEL",
954
+ "slot_index": 0,
955
+ "links": [
956
+ 262
957
+ ]
958
+ },
959
+ {
960
+ "name": "CLIP",
961
+ "shape": 3,
962
+ "type": "CLIP",
963
+ "slot_index": 1,
964
+ "links": [
965
+ 82
966
+ ]
967
+ },
968
+ {
969
+ "name": "VAE",
970
+ "shape": 3,
971
+ "type": "VAE",
972
+ "slot_index": 2,
973
+ "links": [
974
+ 150,
975
+ 244
976
+ ]
977
+ }
978
+ ],
979
+ "properties": {
980
+ "cnr_id": "comfy-core",
981
+ "ver": "0.3.27",
982
+ "Node name for S&R": "CheckpointLoaderSimple"
983
+ },
984
+ "widgets_values": [
985
+ "turbovisionxlSuperFastXLBasedOnNew_alphaV0101Bakedvae.safetensors"
986
+ ]
987
+ },
988
+ {
989
+ "id": 77,
990
+ "type": "VAEDecode",
991
+ "pos": [
992
+ 2645.012939453125,
993
+ 381.77679443359375
994
+ ],
995
+ "size": [
996
+ 210,
997
+ 46
998
+ ],
999
+ "flags": {
1000
+ "collapsed": true
1001
+ },
1002
+ "order": 17,
1003
+ "mode": 0,
1004
+ "inputs": [
1005
+ {
1006
+ "name": "samples",
1007
+ "type": "LATENT",
1008
+ "link": 189
1009
+ },
1010
+ {
1011
+ "name": "vae",
1012
+ "type": "VAE",
1013
+ "link": 188
1014
+ }
1015
+ ],
1016
+ "outputs": [
1017
+ {
1018
+ "name": "IMAGE",
1019
+ "shape": 3,
1020
+ "type": "IMAGE",
1021
+ "slot_index": 0,
1022
+ "links": [
1023
+ 190,
1024
+ 263
1025
+ ]
1026
+ }
1027
+ ],
1028
+ "properties": {
1029
+ "cnr_id": "comfy-core",
1030
+ "ver": "0.3.27",
1031
+ "Node name for S&R": "VAEDecode"
1032
+ },
1033
+ "widgets_values": []
1034
+ },
1035
+ {
1036
+ "id": 99,
1037
+ "type": "PreviewImage",
1038
+ "pos": [
1039
+ 2965.96533203125,
1040
+ 326.4072570800781
1041
+ ],
1042
+ "size": [
1043
+ 584.3117065429688,
1044
+ 613.8179931640625
1045
+ ],
1046
+ "flags": {},
1047
+ "order": 18,
1048
+ "mode": 0,
1049
+ "inputs": [
1050
+ {
1051
+ "name": "images",
1052
+ "type": "IMAGE",
1053
+ "link": 263
1054
+ }
1055
+ ],
1056
+ "outputs": [],
1057
+ "properties": {
1058
+ "cnr_id": "comfy-core",
1059
+ "ver": "0.3.27",
1060
+ "Node name for S&R": "PreviewImage"
1061
+ },
1062
+ "widgets_values": [
1063
+ ""
1064
+ ]
1065
+ },
1066
+ {
1067
+ "id": 85,
1068
+ "type": "Vyro Pipe Input V2",
1069
+ "pos": [
1070
+ -811,
1071
+ 200
1072
+ ],
1073
+ "size": [
1074
+ 400,
1075
+ 748
1076
+ ],
1077
+ "flags": {},
1078
+ "order": 7,
1079
+ "mode": 0,
1080
+ "inputs": [
1081
+ {
1082
+ "name": "vae",
1083
+ "type": "VAE",
1084
+ "link": 244
1085
+ }
1086
+ ],
1087
+ "outputs": [
1088
+ {
1089
+ "name": "vyro_params",
1090
+ "shape": 3,
1091
+ "type": "VYRO_PARAMS",
1092
+ "slot_index": 0,
1093
+ "links": [
1094
+ 226
1095
+ ]
1096
+ }
1097
+ ],
1098
+ "properties": {
1099
+ "aux_id": "Vyro-ai/vyro-workflows",
1100
+ "ver": "987bd627ca63ee6815b42082eccf1b2199bf53ed",
1101
+ "Node name for S&R": "Vyro Pipe Input V2"
1102
+ },
1103
+ "widgets_values": [
1104
+ "digital drawing of cyberpunk skull with armor, maximalist detailing, colorful, vibrant, --ar 9:16 --chaos 30",
1105
+ "t2i",
1106
+ "perlin1",
1107
+ "trees",
1108
+ 1,
1109
+ 7.5,
1110
+ 10,
1111
+ 512,
1112
+ 512,
1113
+ 3465171079,
1114
+ "randomize",
1115
+ "",
1116
+ 1,
1117
+ 0.25000000000000006,
1118
+ 1,
1119
+ 1
1120
+ ]
1121
+ }
1122
+ ],
1123
+ "links": [
1124
+ [
1125
+ 82,
1126
+ 20,
1127
+ 1,
1128
+ 45,
1129
+ 0,
1130
+ "*"
1131
+ ],
1132
+ [
1133
+ 83,
1134
+ 45,
1135
+ 0,
1136
+ 29,
1137
+ 0,
1138
+ "CLIP"
1139
+ ],
1140
+ [
1141
+ 84,
1142
+ 45,
1143
+ 0,
1144
+ 30,
1145
+ 0,
1146
+ "CLIP"
1147
+ ],
1148
+ [
1149
+ 150,
1150
+ 20,
1151
+ 2,
1152
+ 66,
1153
+ 0,
1154
+ "*"
1155
+ ],
1156
+ [
1157
+ 156,
1158
+ 46,
1159
+ 0,
1160
+ 67,
1161
+ 0,
1162
+ "MODEL"
1163
+ ],
1164
+ [
1165
+ 158,
1166
+ 29,
1167
+ 0,
1168
+ 67,
1169
+ 1,
1170
+ "CONDITIONING"
1171
+ ],
1172
+ [
1173
+ 159,
1174
+ 30,
1175
+ 0,
1176
+ 67,
1177
+ 2,
1178
+ "CONDITIONING"
1179
+ ],
1180
+ [
1181
+ 161,
1182
+ 46,
1183
+ 0,
1184
+ 68,
1185
+ 0,
1186
+ "MODEL"
1187
+ ],
1188
+ [
1189
+ 162,
1190
+ 29,
1191
+ 0,
1192
+ 68,
1193
+ 1,
1194
+ "CONDITIONING"
1195
+ ],
1196
+ [
1197
+ 163,
1198
+ 30,
1199
+ 0,
1200
+ 68,
1201
+ 2,
1202
+ "CONDITIONING"
1203
+ ],
1204
+ [
1205
+ 188,
1206
+ 66,
1207
+ 0,
1208
+ 77,
1209
+ 1,
1210
+ "VAE"
1211
+ ],
1212
+ [
1213
+ 189,
1214
+ 68,
1215
+ 0,
1216
+ 77,
1217
+ 0,
1218
+ "LATENT"
1219
+ ],
1220
+ [
1221
+ 226,
1222
+ 85,
1223
+ 0,
1224
+ 86,
1225
+ 0,
1226
+ "VYRO_PARAMS"
1227
+ ],
1228
+ [
1229
+ 227,
1230
+ 86,
1231
+ 1,
1232
+ 87,
1233
+ 0,
1234
+ "*"
1235
+ ],
1236
+ [
1237
+ 228,
1238
+ 87,
1239
+ 0,
1240
+ 29,
1241
+ 1,
1242
+ "STRING"
1243
+ ],
1244
+ [
1245
+ 229,
1246
+ 87,
1247
+ 0,
1248
+ 29,
1249
+ 2,
1250
+ "STRING"
1251
+ ],
1252
+ [
1253
+ 230,
1254
+ 88,
1255
+ 0,
1256
+ 29,
1257
+ 3,
1258
+ "INT"
1259
+ ],
1260
+ [
1261
+ 231,
1262
+ 88,
1263
+ 0,
1264
+ 29,
1265
+ 4,
1266
+ "INT"
1267
+ ],
1268
+ [
1269
+ 232,
1270
+ 88,
1271
+ 0,
1272
+ 29,
1273
+ 5,
1274
+ "INT"
1275
+ ],
1276
+ [
1277
+ 233,
1278
+ 88,
1279
+ 0,
1280
+ 29,
1281
+ 6,
1282
+ "INT"
1283
+ ],
1284
+ [
1285
+ 234,
1286
+ 88,
1287
+ 0,
1288
+ 30,
1289
+ 3,
1290
+ "INT"
1291
+ ],
1292
+ [
1293
+ 235,
1294
+ 88,
1295
+ 0,
1296
+ 30,
1297
+ 4,
1298
+ "INT"
1299
+ ],
1300
+ [
1301
+ 236,
1302
+ 88,
1303
+ 0,
1304
+ 30,
1305
+ 5,
1306
+ "INT"
1307
+ ],
1308
+ [
1309
+ 237,
1310
+ 88,
1311
+ 0,
1312
+ 30,
1313
+ 6,
1314
+ "INT"
1315
+ ],
1316
+ [
1317
+ 238,
1318
+ 86,
1319
+ 2,
1320
+ 89,
1321
+ 0,
1322
+ "*"
1323
+ ],
1324
+ [
1325
+ 239,
1326
+ 89,
1327
+ 0,
1328
+ 30,
1329
+ 1,
1330
+ "STRING"
1331
+ ],
1332
+ [
1333
+ 240,
1334
+ 89,
1335
+ 0,
1336
+ 30,
1337
+ 2,
1338
+ "STRING"
1339
+ ],
1340
+ [
1341
+ 241,
1342
+ 86,
1343
+ 7,
1344
+ 92,
1345
+ 0,
1346
+ "INT"
1347
+ ],
1348
+ [
1349
+ 242,
1350
+ 86,
1351
+ 8,
1352
+ 92,
1353
+ 1,
1354
+ "INT"
1355
+ ],
1356
+ [
1357
+ 243,
1358
+ 92,
1359
+ 0,
1360
+ 67,
1361
+ 3,
1362
+ "LATENT"
1363
+ ],
1364
+ [
1365
+ 244,
1366
+ 20,
1367
+ 2,
1368
+ 85,
1369
+ 0,
1370
+ "VAE"
1371
+ ],
1372
+ [
1373
+ 246,
1374
+ 93,
1375
+ 0,
1376
+ 68,
1377
+ 3,
1378
+ "LATENT"
1379
+ ],
1380
+ [
1381
+ 247,
1382
+ 86,
1383
+ 9,
1384
+ 67,
1385
+ 4,
1386
+ "INT"
1387
+ ],
1388
+ [
1389
+ 248,
1390
+ 86,
1391
+ 9,
1392
+ 68,
1393
+ 4,
1394
+ "INT"
1395
+ ],
1396
+ [
1397
+ 261,
1398
+ 67,
1399
+ 0,
1400
+ 93,
1401
+ 0,
1402
+ "LATENT"
1403
+ ],
1404
+ [
1405
+ 262,
1406
+ 20,
1407
+ 0,
1408
+ 46,
1409
+ 0,
1410
+ "*"
1411
+ ],
1412
+ [
1413
+ 263,
1414
+ 77,
1415
+ 0,
1416
+ 99,
1417
+ 0,
1418
+ "IMAGE"
1419
+ ]
1420
+ ],
1421
+ "groups": [],
1422
+ "config": {},
1423
+ "extra": {
1424
+ "ds": {
1425
+ "scale": 0.15030096025614706,
1426
+ "offset": [
1427
+ 6414.9972594019255,
1428
+ 3091.1902356429177
1429
+ ]
1430
+ }
1431
+ },
1432
+ "version": 0.4
1433
+ }
Imagine/imagine-v5-ultra/comfy/__pycache__/checkpoint_pickle.cpython-311.pyc ADDED
Binary file (1.12 kB). View file
 
Imagine/imagine-v5-ultra/comfy/__pycache__/cli_args.cpython-311.pyc ADDED
Binary file (18.2 kB). View file
 
Imagine/imagine-v5-ultra/comfy/__pycache__/clip_model.cpython-311.pyc ADDED
Binary file (21.2 kB). View file
 
Imagine/imagine-v5-ultra/comfy/__pycache__/clip_vision.cpython-311.pyc ADDED
Binary file (12.8 kB). View file
 
Imagine/imagine-v5-ultra/comfy/__pycache__/conds.cpython-311.pyc ADDED
Binary file (5.33 kB). View file
 
Imagine/imagine-v5-ultra/comfy/__pycache__/controlnet.cpython-311.pyc ADDED
Binary file (53.9 kB). View file
 
Imagine/imagine-v5-ultra/comfy/__pycache__/diffusers_convert.cpython-311.pyc ADDED
Binary file (9.6 kB). View file
 
Imagine/imagine-v5-ultra/comfy/__pycache__/diffusers_load.cpython-311.pyc ADDED
Binary file (2.41 kB). View file
 
Imagine/imagine-v5-ultra/comfy/__pycache__/float.cpython-311.pyc ADDED
Binary file (4.1 kB). View file
 
Imagine/imagine-v5-ultra/comfy/__pycache__/gligen.cpython-311.pyc ADDED
Binary file (22.1 kB). View file
 
Imagine/imagine-v5-ultra/comfy/__pycache__/hooks.cpython-311.pyc ADDED
Binary file (43.1 kB). View file
 
Imagine/imagine-v5-ultra/comfy/__pycache__/latent_formats.cpython-311.pyc ADDED
Binary file (24.7 kB). View file
 
Imagine/imagine-v5-ultra/comfy/__pycache__/lora.cpython-311.pyc ADDED
Binary file (39.4 kB). View file
 
Imagine/imagine-v5-ultra/comfy/__pycache__/lora_convert.cpython-311.pyc ADDED
Binary file (1.29 kB). View file
 
Imagine/imagine-v5-ultra/comfy/__pycache__/model_base.cpython-311.pyc ADDED
Binary file (81.4 kB). View file
 
Imagine/imagine-v5-ultra/comfy/__pycache__/model_detection.cpython-311.pyc ADDED
Binary file (41.9 kB). View file
 
Imagine/imagine-v5-ultra/comfy/__pycache__/model_management.cpython-311.pyc ADDED
Binary file (57.6 kB). View file
 
Imagine/imagine-v5-ultra/comfy/__pycache__/model_patcher.cpython-311.pyc ADDED
Binary file (73.2 kB). View file
 
Imagine/imagine-v5-ultra/comfy/__pycache__/model_sampling.cpython-311.pyc ADDED
Binary file (23.9 kB). View file
 
Imagine/imagine-v5-ultra/comfy/__pycache__/ops.cpython-311.pyc ADDED
Binary file (27.2 kB). View file
 
Imagine/imagine-v5-ultra/comfy/__pycache__/options.cpython-311.pyc ADDED
Binary file (361 Bytes). View file
 
Imagine/imagine-v5-ultra/comfy/__pycache__/patcher_extension.cpython-311.pyc ADDED
Binary file (10.7 kB). View file
 
Imagine/imagine-v5-ultra/comfy/__pycache__/sample.cpython-311.pyc ADDED
Binary file (4.97 kB). View file
 
Imagine/imagine-v5-ultra/comfy/__pycache__/sampler_helpers.cpython-311.pyc ADDED
Binary file (9.21 kB). View file
 
Imagine/imagine-v5-ultra/comfy/__pycache__/samplers.cpython-311.pyc ADDED
Binary file (64.7 kB). View file
 
Imagine/imagine-v5-ultra/comfy/__pycache__/sd.cpython-311.pyc ADDED
Binary file (78.1 kB). View file
 
Imagine/imagine-v5-ultra/comfy/__pycache__/sd1_clip.cpython-311.pyc ADDED
Binary file (38.9 kB). View file
 
Imagine/imagine-v5-ultra/comfy/__pycache__/sdxl_clip.cpython-311.pyc ADDED
Binary file (10.6 kB). View file
 
Imagine/imagine-v5-ultra/comfy/__pycache__/supported_models.cpython-311.pyc ADDED
Binary file (49 kB). View file
 
Imagine/imagine-v5-ultra/comfy/__pycache__/supported_models_base.cpython-311.pyc ADDED
Binary file (6.93 kB). View file
 
Imagine/imagine-v5-ultra/comfy/__pycache__/utils.cpython-311.pyc ADDED
Binary file (62.6 kB). View file
 
Imagine/imagine-v5-ultra/comfy/checkpoint_pickle.py ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import pickle
2
+
3
+ load = pickle.load
4
+
5
+ class Empty:
6
+ pass
7
+
8
+ class Unpickler(pickle.Unpickler):
9
+ def find_class(self, module, name):
10
+ #TODO: safe unpickle
11
+ if module.startswith("pytorch_lightning"):
12
+ return Empty
13
+ return super().find_class(module, name)
Imagine/imagine-v5-ultra/comfy/cldm/__pycache__/cldm.cpython-311.pyc ADDED
Binary file (22.9 kB). View file
 
Imagine/imagine-v5-ultra/comfy/cldm/__pycache__/control_types.cpython-311.pyc ADDED
Binary file (420 Bytes). View file
 
Imagine/imagine-v5-ultra/comfy/cldm/__pycache__/dit_embedder.cpython-311.pyc ADDED
Binary file (5.72 kB). View file
 
Imagine/imagine-v5-ultra/comfy/cldm/__pycache__/mmdit.cpython-311.pyc ADDED
Binary file (4 kB). View file
 
Imagine/imagine-v5-ultra/comfy/cldm/cldm.py ADDED
@@ -0,0 +1,433 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #taken from: https://github.com/lllyasviel/ControlNet
2
+ #and modified
3
+
4
+ import torch
5
+ import torch.nn as nn
6
+
7
+ from ..ldm.modules.diffusionmodules.util import (
8
+ timestep_embedding,
9
+ )
10
+
11
+ from ..ldm.modules.attention import SpatialTransformer
12
+ from ..ldm.modules.diffusionmodules.openaimodel import UNetModel, TimestepEmbedSequential, ResBlock, Downsample
13
+ from ..ldm.util import exists
14
+ from .control_types import UNION_CONTROLNET_TYPES
15
+ from collections import OrderedDict
16
+ import comfy.ops
17
+ from comfy.ldm.modules.attention import optimized_attention
18
+
19
+ class OptimizedAttention(nn.Module):
20
+ def __init__(self, c, nhead, dropout=0.0, dtype=None, device=None, operations=None):
21
+ super().__init__()
22
+ self.heads = nhead
23
+ self.c = c
24
+
25
+ self.in_proj = operations.Linear(c, c * 3, bias=True, dtype=dtype, device=device)
26
+ self.out_proj = operations.Linear(c, c, bias=True, dtype=dtype, device=device)
27
+
28
+ def forward(self, x):
29
+ x = self.in_proj(x)
30
+ q, k, v = x.split(self.c, dim=2)
31
+ out = optimized_attention(q, k, v, self.heads)
32
+ return self.out_proj(out)
33
+
34
+ class QuickGELU(nn.Module):
35
+ def forward(self, x: torch.Tensor):
36
+ return x * torch.sigmoid(1.702 * x)
37
+
38
+ class ResBlockUnionControlnet(nn.Module):
39
+ def __init__(self, dim, nhead, dtype=None, device=None, operations=None):
40
+ super().__init__()
41
+ self.attn = OptimizedAttention(dim, nhead, dtype=dtype, device=device, operations=operations)
42
+ self.ln_1 = operations.LayerNorm(dim, dtype=dtype, device=device)
43
+ self.mlp = nn.Sequential(
44
+ OrderedDict([("c_fc", operations.Linear(dim, dim * 4, dtype=dtype, device=device)), ("gelu", QuickGELU()),
45
+ ("c_proj", operations.Linear(dim * 4, dim, dtype=dtype, device=device))]))
46
+ self.ln_2 = operations.LayerNorm(dim, dtype=dtype, device=device)
47
+
48
+ def attention(self, x: torch.Tensor):
49
+ return self.attn(x)
50
+
51
+ def forward(self, x: torch.Tensor):
52
+ x = x + self.attention(self.ln_1(x))
53
+ x = x + self.mlp(self.ln_2(x))
54
+ return x
55
+
56
+ class ControlledUnetModel(UNetModel):
57
+ #implemented in the ldm unet
58
+ pass
59
+
60
+ class ControlNet(nn.Module):
61
+ def __init__(
62
+ self,
63
+ image_size,
64
+ in_channels,
65
+ model_channels,
66
+ hint_channels,
67
+ num_res_blocks,
68
+ dropout=0,
69
+ channel_mult=(1, 2, 4, 8),
70
+ conv_resample=True,
71
+ dims=2,
72
+ num_classes=None,
73
+ use_checkpoint=False,
74
+ dtype=torch.float32,
75
+ num_heads=-1,
76
+ num_head_channels=-1,
77
+ num_heads_upsample=-1,
78
+ use_scale_shift_norm=False,
79
+ resblock_updown=False,
80
+ use_new_attention_order=False,
81
+ use_spatial_transformer=False, # custom transformer support
82
+ transformer_depth=1, # custom transformer support
83
+ context_dim=None, # custom transformer support
84
+ n_embed=None, # custom support for prediction of discrete ids into codebook of first stage vq model
85
+ legacy=True,
86
+ disable_self_attentions=None,
87
+ num_attention_blocks=None,
88
+ disable_middle_self_attn=False,
89
+ use_linear_in_transformer=False,
90
+ adm_in_channels=None,
91
+ transformer_depth_middle=None,
92
+ transformer_depth_output=None,
93
+ attn_precision=None,
94
+ union_controlnet_num_control_type=None,
95
+ device=None,
96
+ operations=comfy.ops.disable_weight_init,
97
+ **kwargs,
98
+ ):
99
+ super().__init__()
100
+ assert use_spatial_transformer == True, "use_spatial_transformer has to be true"
101
+ if use_spatial_transformer:
102
+ assert context_dim is not None, 'Fool!! You forgot to include the dimension of your cross-attention conditioning...'
103
+
104
+ if context_dim is not None:
105
+ assert use_spatial_transformer, 'Fool!! You forgot to use the spatial transformer for your cross-attention conditioning...'
106
+ # from omegaconf.listconfig import ListConfig
107
+ # if type(context_dim) == ListConfig:
108
+ # context_dim = list(context_dim)
109
+
110
+ if num_heads_upsample == -1:
111
+ num_heads_upsample = num_heads
112
+
113
+ if num_heads == -1:
114
+ assert num_head_channels != -1, 'Either num_heads or num_head_channels has to be set'
115
+
116
+ if num_head_channels == -1:
117
+ assert num_heads != -1, 'Either num_heads or num_head_channels has to be set'
118
+
119
+ self.dims = dims
120
+ self.image_size = image_size
121
+ self.in_channels = in_channels
122
+ self.model_channels = model_channels
123
+
124
+ if isinstance(num_res_blocks, int):
125
+ self.num_res_blocks = len(channel_mult) * [num_res_blocks]
126
+ else:
127
+ if len(num_res_blocks) != len(channel_mult):
128
+ raise ValueError("provide num_res_blocks either as an int (globally constant) or "
129
+ "as a list/tuple (per-level) with the same length as channel_mult")
130
+ self.num_res_blocks = num_res_blocks
131
+
132
+ if disable_self_attentions is not None:
133
+ # should be a list of booleans, indicating whether to disable self-attention in TransformerBlocks or not
134
+ assert len(disable_self_attentions) == len(channel_mult)
135
+ if num_attention_blocks is not None:
136
+ assert len(num_attention_blocks) == len(self.num_res_blocks)
137
+ assert all(map(lambda i: self.num_res_blocks[i] >= num_attention_blocks[i], range(len(num_attention_blocks))))
138
+
139
+ transformer_depth = transformer_depth[:]
140
+
141
+ self.dropout = dropout
142
+ self.channel_mult = channel_mult
143
+ self.conv_resample = conv_resample
144
+ self.num_classes = num_classes
145
+ self.use_checkpoint = use_checkpoint
146
+ self.dtype = dtype
147
+ self.num_heads = num_heads
148
+ self.num_head_channels = num_head_channels
149
+ self.num_heads_upsample = num_heads_upsample
150
+ self.predict_codebook_ids = n_embed is not None
151
+
152
+ time_embed_dim = model_channels * 4
153
+ self.time_embed = nn.Sequential(
154
+ operations.Linear(model_channels, time_embed_dim, dtype=self.dtype, device=device),
155
+ nn.SiLU(),
156
+ operations.Linear(time_embed_dim, time_embed_dim, dtype=self.dtype, device=device),
157
+ )
158
+
159
+ if self.num_classes is not None:
160
+ if isinstance(self.num_classes, int):
161
+ self.label_emb = nn.Embedding(num_classes, time_embed_dim)
162
+ elif self.num_classes == "continuous":
163
+ self.label_emb = nn.Linear(1, time_embed_dim)
164
+ elif self.num_classes == "sequential":
165
+ assert adm_in_channels is not None
166
+ self.label_emb = nn.Sequential(
167
+ nn.Sequential(
168
+ operations.Linear(adm_in_channels, time_embed_dim, dtype=self.dtype, device=device),
169
+ nn.SiLU(),
170
+ operations.Linear(time_embed_dim, time_embed_dim, dtype=self.dtype, device=device),
171
+ )
172
+ )
173
+ else:
174
+ raise ValueError()
175
+
176
+ self.input_blocks = nn.ModuleList(
177
+ [
178
+ TimestepEmbedSequential(
179
+ operations.conv_nd(dims, in_channels, model_channels, 3, padding=1, dtype=self.dtype, device=device)
180
+ )
181
+ ]
182
+ )
183
+ self.zero_convs = nn.ModuleList([self.make_zero_conv(model_channels, operations=operations, dtype=self.dtype, device=device)])
184
+
185
+ self.input_hint_block = TimestepEmbedSequential(
186
+ operations.conv_nd(dims, hint_channels, 16, 3, padding=1, dtype=self.dtype, device=device),
187
+ nn.SiLU(),
188
+ operations.conv_nd(dims, 16, 16, 3, padding=1, dtype=self.dtype, device=device),
189
+ nn.SiLU(),
190
+ operations.conv_nd(dims, 16, 32, 3, padding=1, stride=2, dtype=self.dtype, device=device),
191
+ nn.SiLU(),
192
+ operations.conv_nd(dims, 32, 32, 3, padding=1, dtype=self.dtype, device=device),
193
+ nn.SiLU(),
194
+ operations.conv_nd(dims, 32, 96, 3, padding=1, stride=2, dtype=self.dtype, device=device),
195
+ nn.SiLU(),
196
+ operations.conv_nd(dims, 96, 96, 3, padding=1, dtype=self.dtype, device=device),
197
+ nn.SiLU(),
198
+ operations.conv_nd(dims, 96, 256, 3, padding=1, stride=2, dtype=self.dtype, device=device),
199
+ nn.SiLU(),
200
+ operations.conv_nd(dims, 256, model_channels, 3, padding=1, dtype=self.dtype, device=device)
201
+ )
202
+
203
+ self._feature_size = model_channels
204
+ input_block_chans = [model_channels]
205
+ ch = model_channels
206
+ ds = 1
207
+ for level, mult in enumerate(channel_mult):
208
+ for nr in range(self.num_res_blocks[level]):
209
+ layers = [
210
+ ResBlock(
211
+ ch,
212
+ time_embed_dim,
213
+ dropout,
214
+ out_channels=mult * model_channels,
215
+ dims=dims,
216
+ use_checkpoint=use_checkpoint,
217
+ use_scale_shift_norm=use_scale_shift_norm,
218
+ dtype=self.dtype,
219
+ device=device,
220
+ operations=operations,
221
+ )
222
+ ]
223
+ ch = mult * model_channels
224
+ num_transformers = transformer_depth.pop(0)
225
+ if num_transformers > 0:
226
+ if num_head_channels == -1:
227
+ dim_head = ch // num_heads
228
+ else:
229
+ num_heads = ch // num_head_channels
230
+ dim_head = num_head_channels
231
+ if legacy:
232
+ #num_heads = 1
233
+ dim_head = ch // num_heads if use_spatial_transformer else num_head_channels
234
+ if exists(disable_self_attentions):
235
+ disabled_sa = disable_self_attentions[level]
236
+ else:
237
+ disabled_sa = False
238
+
239
+ if not exists(num_attention_blocks) or nr < num_attention_blocks[level]:
240
+ layers.append(
241
+ SpatialTransformer(
242
+ ch, num_heads, dim_head, depth=num_transformers, context_dim=context_dim,
243
+ disable_self_attn=disabled_sa, use_linear=use_linear_in_transformer,
244
+ use_checkpoint=use_checkpoint, attn_precision=attn_precision, dtype=self.dtype, device=device, operations=operations
245
+ )
246
+ )
247
+ self.input_blocks.append(TimestepEmbedSequential(*layers))
248
+ self.zero_convs.append(self.make_zero_conv(ch, operations=operations, dtype=self.dtype, device=device))
249
+ self._feature_size += ch
250
+ input_block_chans.append(ch)
251
+ if level != len(channel_mult) - 1:
252
+ out_ch = ch
253
+ self.input_blocks.append(
254
+ TimestepEmbedSequential(
255
+ ResBlock(
256
+ ch,
257
+ time_embed_dim,
258
+ dropout,
259
+ out_channels=out_ch,
260
+ dims=dims,
261
+ use_checkpoint=use_checkpoint,
262
+ use_scale_shift_norm=use_scale_shift_norm,
263
+ down=True,
264
+ dtype=self.dtype,
265
+ device=device,
266
+ operations=operations
267
+ )
268
+ if resblock_updown
269
+ else Downsample(
270
+ ch, conv_resample, dims=dims, out_channels=out_ch, dtype=self.dtype, device=device, operations=operations
271
+ )
272
+ )
273
+ )
274
+ ch = out_ch
275
+ input_block_chans.append(ch)
276
+ self.zero_convs.append(self.make_zero_conv(ch, operations=operations, dtype=self.dtype, device=device))
277
+ ds *= 2
278
+ self._feature_size += ch
279
+
280
+ if num_head_channels == -1:
281
+ dim_head = ch // num_heads
282
+ else:
283
+ num_heads = ch // num_head_channels
284
+ dim_head = num_head_channels
285
+ if legacy:
286
+ #num_heads = 1
287
+ dim_head = ch // num_heads if use_spatial_transformer else num_head_channels
288
+ mid_block = [
289
+ ResBlock(
290
+ ch,
291
+ time_embed_dim,
292
+ dropout,
293
+ dims=dims,
294
+ use_checkpoint=use_checkpoint,
295
+ use_scale_shift_norm=use_scale_shift_norm,
296
+ dtype=self.dtype,
297
+ device=device,
298
+ operations=operations
299
+ )]
300
+ if transformer_depth_middle >= 0:
301
+ mid_block += [SpatialTransformer( # always uses a self-attn
302
+ ch, num_heads, dim_head, depth=transformer_depth_middle, context_dim=context_dim,
303
+ disable_self_attn=disable_middle_self_attn, use_linear=use_linear_in_transformer,
304
+ use_checkpoint=use_checkpoint, attn_precision=attn_precision, dtype=self.dtype, device=device, operations=operations
305
+ ),
306
+ ResBlock(
307
+ ch,
308
+ time_embed_dim,
309
+ dropout,
310
+ dims=dims,
311
+ use_checkpoint=use_checkpoint,
312
+ use_scale_shift_norm=use_scale_shift_norm,
313
+ dtype=self.dtype,
314
+ device=device,
315
+ operations=operations
316
+ )]
317
+ self.middle_block = TimestepEmbedSequential(*mid_block)
318
+ self.middle_block_out = self.make_zero_conv(ch, operations=operations, dtype=self.dtype, device=device)
319
+ self._feature_size += ch
320
+
321
+ if union_controlnet_num_control_type is not None:
322
+ self.num_control_type = union_controlnet_num_control_type
323
+ num_trans_channel = 320
324
+ num_trans_head = 8
325
+ num_trans_layer = 1
326
+ num_proj_channel = 320
327
+ # task_scale_factor = num_trans_channel ** 0.5
328
+ self.task_embedding = nn.Parameter(torch.empty(self.num_control_type, num_trans_channel, dtype=self.dtype, device=device))
329
+
330
+ self.transformer_layes = nn.Sequential(*[ResBlockUnionControlnet(num_trans_channel, num_trans_head, dtype=self.dtype, device=device, operations=operations) for _ in range(num_trans_layer)])
331
+ self.spatial_ch_projs = operations.Linear(num_trans_channel, num_proj_channel, dtype=self.dtype, device=device)
332
+ #-----------------------------------------------------------------------------------------------------
333
+
334
+ control_add_embed_dim = 256
335
+ class ControlAddEmbedding(nn.Module):
336
+ def __init__(self, in_dim, out_dim, num_control_type, dtype=None, device=None, operations=None):
337
+ super().__init__()
338
+ self.num_control_type = num_control_type
339
+ self.in_dim = in_dim
340
+ self.linear_1 = operations.Linear(in_dim * num_control_type, out_dim, dtype=dtype, device=device)
341
+ self.linear_2 = operations.Linear(out_dim, out_dim, dtype=dtype, device=device)
342
+ def forward(self, control_type, dtype, device):
343
+ c_type = torch.zeros((self.num_control_type,), device=device)
344
+ c_type[control_type] = 1.0
345
+ c_type = timestep_embedding(c_type.flatten(), self.in_dim, repeat_only=False).to(dtype).reshape((-1, self.num_control_type * self.in_dim))
346
+ return self.linear_2(torch.nn.functional.silu(self.linear_1(c_type)))
347
+
348
+ self.control_add_embedding = ControlAddEmbedding(control_add_embed_dim, time_embed_dim, self.num_control_type, dtype=self.dtype, device=device, operations=operations)
349
+ else:
350
+ self.task_embedding = None
351
+ self.control_add_embedding = None
352
+
353
+ def union_controlnet_merge(self, hint, control_type, emb, context):
354
+ # Equivalent to: https://github.com/xinsir6/ControlNetPlus/tree/main
355
+ inputs = []
356
+ condition_list = []
357
+
358
+ for idx in range(min(1, len(control_type))):
359
+ controlnet_cond = self.input_hint_block(hint[idx], emb, context)
360
+ feat_seq = torch.mean(controlnet_cond, dim=(2, 3))
361
+ if idx < len(control_type):
362
+ feat_seq += self.task_embedding[control_type[idx]].to(dtype=feat_seq.dtype, device=feat_seq.device)
363
+
364
+ inputs.append(feat_seq.unsqueeze(1))
365
+ condition_list.append(controlnet_cond)
366
+
367
+ x = torch.cat(inputs, dim=1)
368
+ x = self.transformer_layes(x)
369
+ controlnet_cond_fuser = None
370
+ for idx in range(len(control_type)):
371
+ alpha = self.spatial_ch_projs(x[:, idx])
372
+ alpha = alpha.unsqueeze(-1).unsqueeze(-1)
373
+ o = condition_list[idx] + alpha
374
+ if controlnet_cond_fuser is None:
375
+ controlnet_cond_fuser = o
376
+ else:
377
+ controlnet_cond_fuser += o
378
+ return controlnet_cond_fuser
379
+
380
+ def make_zero_conv(self, channels, operations=None, dtype=None, device=None):
381
+ return TimestepEmbedSequential(operations.conv_nd(self.dims, channels, channels, 1, padding=0, dtype=dtype, device=device))
382
+
383
+ def forward(self, x, hint, timesteps, context, y=None, **kwargs):
384
+ t_emb = timestep_embedding(timesteps, self.model_channels, repeat_only=False).to(x.dtype)
385
+ emb = self.time_embed(t_emb)
386
+
387
+ guided_hint = None
388
+ if self.control_add_embedding is not None: #Union Controlnet
389
+ control_type = kwargs.get("control_type", [])
390
+
391
+ if any([c >= self.num_control_type for c in control_type]):
392
+ max_type = max(control_type)
393
+ max_type_name = {
394
+ v: k for k, v in UNION_CONTROLNET_TYPES.items()
395
+ }[max_type]
396
+ raise ValueError(
397
+ f"Control type {max_type_name}({max_type}) is out of range for the number of control types" +
398
+ f"({self.num_control_type}) supported.\n" +
399
+ "Please consider using the ProMax ControlNet Union model.\n" +
400
+ "https://huggingface.co/xinsir/controlnet-union-sdxl-1.0/tree/main"
401
+ )
402
+
403
+ emb += self.control_add_embedding(control_type, emb.dtype, emb.device)
404
+ if len(control_type) > 0:
405
+ if len(hint.shape) < 5:
406
+ hint = hint.unsqueeze(dim=0)
407
+ guided_hint = self.union_controlnet_merge(hint, control_type, emb, context)
408
+
409
+ if guided_hint is None:
410
+ guided_hint = self.input_hint_block(hint, emb, context)
411
+
412
+ out_output = []
413
+ out_middle = []
414
+
415
+ if self.num_classes is not None:
416
+ assert y.shape[0] == x.shape[0]
417
+ emb = emb + self.label_emb(y)
418
+
419
+ h = x
420
+ for module, zero_conv in zip(self.input_blocks, self.zero_convs):
421
+ if guided_hint is not None:
422
+ h = module(h, emb, context)
423
+ h += guided_hint
424
+ guided_hint = None
425
+ else:
426
+ h = module(h, emb, context)
427
+ out_output.append(zero_conv(h, emb, context))
428
+
429
+ h = self.middle_block(h, emb, context)
430
+ out_middle.append(self.middle_block_out(h, emb, context))
431
+
432
+ return {"middle": out_middle, "output": out_output}
433
+
Imagine/imagine-v5-ultra/comfy/cldm/control_types.py ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ UNION_CONTROLNET_TYPES = {
2
+ "openpose": 0,
3
+ "depth": 1,
4
+ "hed/pidi/scribble/ted": 2,
5
+ "canny/lineart/anime_lineart/mlsd": 3,
6
+ "normal": 4,
7
+ "segment": 5,
8
+ "tile": 6,
9
+ "repaint": 7,
10
+ }
Imagine/imagine-v5-ultra/comfy/cldm/dit_embedder.py ADDED
@@ -0,0 +1,120 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import math
2
+ from typing import List, Optional, Tuple
3
+
4
+ import torch
5
+ import torch.nn as nn
6
+ from torch import Tensor
7
+
8
+ from comfy.ldm.modules.diffusionmodules.mmdit import DismantledBlock, PatchEmbed, VectorEmbedder, TimestepEmbedder, get_2d_sincos_pos_embed_torch
9
+
10
+
11
+ class ControlNetEmbedder(nn.Module):
12
+
13
+ def __init__(
14
+ self,
15
+ img_size: int,
16
+ patch_size: int,
17
+ in_chans: int,
18
+ attention_head_dim: int,
19
+ num_attention_heads: int,
20
+ adm_in_channels: int,
21
+ num_layers: int,
22
+ main_model_double: int,
23
+ double_y_emb: bool,
24
+ device: torch.device,
25
+ dtype: torch.dtype,
26
+ pos_embed_max_size: Optional[int] = None,
27
+ operations = None,
28
+ ):
29
+ super().__init__()
30
+ self.main_model_double = main_model_double
31
+ self.dtype = dtype
32
+ self.hidden_size = num_attention_heads * attention_head_dim
33
+ self.patch_size = patch_size
34
+ self.x_embedder = PatchEmbed(
35
+ img_size=img_size,
36
+ patch_size=patch_size,
37
+ in_chans=in_chans,
38
+ embed_dim=self.hidden_size,
39
+ strict_img_size=pos_embed_max_size is None,
40
+ device=device,
41
+ dtype=dtype,
42
+ operations=operations,
43
+ )
44
+
45
+ self.t_embedder = TimestepEmbedder(self.hidden_size, dtype=dtype, device=device, operations=operations)
46
+
47
+ self.double_y_emb = double_y_emb
48
+ if self.double_y_emb:
49
+ self.orig_y_embedder = VectorEmbedder(
50
+ adm_in_channels, self.hidden_size, dtype, device, operations=operations
51
+ )
52
+ self.y_embedder = VectorEmbedder(
53
+ self.hidden_size, self.hidden_size, dtype, device, operations=operations
54
+ )
55
+ else:
56
+ self.y_embedder = VectorEmbedder(
57
+ adm_in_channels, self.hidden_size, dtype, device, operations=operations
58
+ )
59
+
60
+ self.transformer_blocks = nn.ModuleList(
61
+ DismantledBlock(
62
+ hidden_size=self.hidden_size, num_heads=num_attention_heads, qkv_bias=True,
63
+ dtype=dtype, device=device, operations=operations
64
+ )
65
+ for _ in range(num_layers)
66
+ )
67
+
68
+ # self.use_y_embedder = pooled_projection_dim != self.time_text_embed.text_embedder.linear_1.in_features
69
+ # TODO double check this logic when 8b
70
+ self.use_y_embedder = True
71
+
72
+ self.controlnet_blocks = nn.ModuleList([])
73
+ for _ in range(len(self.transformer_blocks)):
74
+ controlnet_block = operations.Linear(self.hidden_size, self.hidden_size, dtype=dtype, device=device)
75
+ self.controlnet_blocks.append(controlnet_block)
76
+
77
+ self.pos_embed_input = PatchEmbed(
78
+ img_size=img_size,
79
+ patch_size=patch_size,
80
+ in_chans=in_chans,
81
+ embed_dim=self.hidden_size,
82
+ strict_img_size=False,
83
+ device=device,
84
+ dtype=dtype,
85
+ operations=operations,
86
+ )
87
+
88
+ def forward(
89
+ self,
90
+ x: torch.Tensor,
91
+ timesteps: torch.Tensor,
92
+ y: Optional[torch.Tensor] = None,
93
+ context: Optional[torch.Tensor] = None,
94
+ hint = None,
95
+ ) -> Tuple[Tensor, List[Tensor]]:
96
+ x_shape = list(x.shape)
97
+ x = self.x_embedder(x)
98
+ if not self.double_y_emb:
99
+ h = (x_shape[-2] + 1) // self.patch_size
100
+ w = (x_shape[-1] + 1) // self.patch_size
101
+ x += get_2d_sincos_pos_embed_torch(self.hidden_size, w, h, device=x.device)
102
+ c = self.t_embedder(timesteps, dtype=x.dtype)
103
+ if y is not None and self.y_embedder is not None:
104
+ if self.double_y_emb:
105
+ y = self.orig_y_embedder(y)
106
+ y = self.y_embedder(y)
107
+ c = c + y
108
+
109
+ x = x + self.pos_embed_input(hint)
110
+
111
+ block_out = ()
112
+
113
+ repeat = math.ceil(self.main_model_double / len(self.transformer_blocks))
114
+ for i in range(len(self.transformer_blocks)):
115
+ out = self.transformer_blocks[i](x, c)
116
+ if not self.double_y_emb:
117
+ x = out
118
+ block_out += (self.controlnet_blocks[i](out),) * repeat
119
+
120
+ return {"output": block_out}
Imagine/imagine-v5-ultra/comfy/cldm/mmdit.py ADDED
@@ -0,0 +1,81 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+ from typing import Optional
3
+ import comfy.ldm.modules.diffusionmodules.mmdit
4
+
5
+ class ControlNet(comfy.ldm.modules.diffusionmodules.mmdit.MMDiT):
6
+ def __init__(
7
+ self,
8
+ num_blocks = None,
9
+ control_latent_channels = None,
10
+ dtype = None,
11
+ device = None,
12
+ operations = None,
13
+ **kwargs,
14
+ ):
15
+ super().__init__(dtype=dtype, device=device, operations=operations, final_layer=False, num_blocks=num_blocks, **kwargs)
16
+ # controlnet_blocks
17
+ self.controlnet_blocks = torch.nn.ModuleList([])
18
+ for _ in range(len(self.joint_blocks)):
19
+ self.controlnet_blocks.append(operations.Linear(self.hidden_size, self.hidden_size, device=device, dtype=dtype))
20
+
21
+ if control_latent_channels is None:
22
+ control_latent_channels = self.in_channels
23
+
24
+ self.pos_embed_input = comfy.ldm.modules.diffusionmodules.mmdit.PatchEmbed(
25
+ None,
26
+ self.patch_size,
27
+ control_latent_channels,
28
+ self.hidden_size,
29
+ bias=True,
30
+ strict_img_size=False,
31
+ dtype=dtype,
32
+ device=device,
33
+ operations=operations
34
+ )
35
+
36
+ def forward(
37
+ self,
38
+ x: torch.Tensor,
39
+ timesteps: torch.Tensor,
40
+ y: Optional[torch.Tensor] = None,
41
+ context: Optional[torch.Tensor] = None,
42
+ hint = None,
43
+ ) -> torch.Tensor:
44
+
45
+ #weird sd3 controlnet specific stuff
46
+ y = torch.zeros_like(y)
47
+
48
+ if self.context_processor is not None:
49
+ context = self.context_processor(context)
50
+
51
+ hw = x.shape[-2:]
52
+ x = self.x_embedder(x) + self.cropped_pos_embed(hw, device=x.device).to(dtype=x.dtype, device=x.device)
53
+ x += self.pos_embed_input(hint)
54
+
55
+ c = self.t_embedder(timesteps, dtype=x.dtype)
56
+ if y is not None and self.y_embedder is not None:
57
+ y = self.y_embedder(y)
58
+ c = c + y
59
+
60
+ if context is not None:
61
+ context = self.context_embedder(context)
62
+
63
+ output = []
64
+
65
+ blocks = len(self.joint_blocks)
66
+ for i in range(blocks):
67
+ context, x = self.joint_blocks[i](
68
+ context,
69
+ x,
70
+ c=c,
71
+ use_checkpoint=self.use_checkpoint,
72
+ )
73
+
74
+ out = self.controlnet_blocks[i](x)
75
+ count = self.depth // blocks
76
+ if i == blocks - 1:
77
+ count -= 1
78
+ for j in range(count):
79
+ output.append(out)
80
+
81
+ return {"output": output}
Imagine/imagine-v5-ultra/comfy/cli_args.py ADDED
@@ -0,0 +1,214 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import argparse
2
+ import enum
3
+ import os
4
+ import comfy.options
5
+
6
+
7
+ class EnumAction(argparse.Action):
8
+ """
9
+ Argparse action for handling Enums
10
+ """
11
+ def __init__(self, **kwargs):
12
+ # Pop off the type value
13
+ enum_type = kwargs.pop("type", None)
14
+
15
+ # Ensure an Enum subclass is provided
16
+ if enum_type is None:
17
+ raise ValueError("type must be assigned an Enum when using EnumAction")
18
+ if not issubclass(enum_type, enum.Enum):
19
+ raise TypeError("type must be an Enum when using EnumAction")
20
+
21
+ # Generate choices from the Enum
22
+ choices = tuple(e.value for e in enum_type)
23
+ kwargs.setdefault("choices", choices)
24
+ kwargs.setdefault("metavar", f"[{','.join(list(choices))}]")
25
+
26
+ super(EnumAction, self).__init__(**kwargs)
27
+
28
+ self._enum = enum_type
29
+
30
+ def __call__(self, parser, namespace, values, option_string=None):
31
+ # Convert value back into an Enum
32
+ value = self._enum(values)
33
+ setattr(namespace, self.dest, value)
34
+
35
+
36
+ parser = argparse.ArgumentParser()
37
+
38
+ parser.add_argument("--listen", type=str, default="127.0.0.1", metavar="IP", nargs="?", const="0.0.0.0,::", help="Specify the IP address to listen on (default: 127.0.0.1). You can give a list of ip addresses by separating them with a comma like: 127.2.2.2,127.3.3.3 If --listen is provided without an argument, it defaults to 0.0.0.0,:: (listens on all ipv4 and ipv6)")
39
+ parser.add_argument("--port", type=int, default=8188, help="Set the listen port.")
40
+ parser.add_argument("--tls-keyfile", type=str, help="Path to TLS (SSL) key file. Enables TLS, makes app accessible at https://... requires --tls-certfile to function")
41
+ parser.add_argument("--tls-certfile", type=str, help="Path to TLS (SSL) certificate file. Enables TLS, makes app accessible at https://... requires --tls-keyfile to function")
42
+ parser.add_argument("--enable-cors-header", type=str, default=None, metavar="ORIGIN", nargs="?", const="*", help="Enable CORS (Cross-Origin Resource Sharing) with optional origin or allow all with default '*'.")
43
+ parser.add_argument("--max-upload-size", type=float, default=100, help="Set the maximum upload size in MB.")
44
+
45
+ parser.add_argument("--base-directory", type=str, default=None, help="Set the ComfyUI base directory for models, custom_nodes, input, output, temp, and user directories.")
46
+ parser.add_argument("--extra-model-paths-config", type=str, default=None, metavar="PATH", nargs='+', action='append', help="Load one or more extra_model_paths.yaml files.")
47
+ parser.add_argument("--output-directory", type=str, default=None, help="Set the ComfyUI output directory. Overrides --base-directory.")
48
+ parser.add_argument("--temp-directory", type=str, default=None, help="Set the ComfyUI temp directory (default is in the ComfyUI directory). Overrides --base-directory.")
49
+ parser.add_argument("--input-directory", type=str, default=None, help="Set the ComfyUI input directory. Overrides --base-directory.")
50
+ parser.add_argument("--auto-launch", action="store_true", help="Automatically launch ComfyUI in the default browser.")
51
+ parser.add_argument("--disable-auto-launch", action="store_true", help="Disable auto launching the browser.")
52
+ parser.add_argument("--cuda-device", type=int, default=None, metavar="DEVICE_ID", help="Set the id of the cuda device this instance will use.")
53
+ cm_group = parser.add_mutually_exclusive_group()
54
+ cm_group.add_argument("--cuda-malloc", action="store_true", help="Enable cudaMallocAsync (enabled by default for torch 2.0 and up).")
55
+ cm_group.add_argument("--disable-cuda-malloc", action="store_true", help="Disable cudaMallocAsync.")
56
+
57
+
58
+ fp_group = parser.add_mutually_exclusive_group()
59
+ fp_group.add_argument("--force-fp32", action="store_true", help="Force fp32 (If this makes your GPU work better please report it).")
60
+ fp_group.add_argument("--force-fp16", action="store_true", help="Force fp16.")
61
+
62
+ fpunet_group = parser.add_mutually_exclusive_group()
63
+ fpunet_group.add_argument("--fp32-unet", action="store_true", help="Run the diffusion model in fp32.")
64
+ fpunet_group.add_argument("--fp64-unet", action="store_true", help="Run the diffusion model in fp64.")
65
+ fpunet_group.add_argument("--bf16-unet", action="store_true", help="Run the diffusion model in bf16.")
66
+ fpunet_group.add_argument("--fp16-unet", action="store_true", help="Run the diffusion model in fp16")
67
+ fpunet_group.add_argument("--fp8_e4m3fn-unet", action="store_true", help="Store unet weights in fp8_e4m3fn.")
68
+ fpunet_group.add_argument("--fp8_e5m2-unet", action="store_true", help="Store unet weights in fp8_e5m2.")
69
+
70
+ fpvae_group = parser.add_mutually_exclusive_group()
71
+ fpvae_group.add_argument("--fp16-vae", action="store_true", help="Run the VAE in fp16, might cause black images.")
72
+ fpvae_group.add_argument("--fp32-vae", action="store_true", help="Run the VAE in full precision fp32.")
73
+ fpvae_group.add_argument("--bf16-vae", action="store_true", help="Run the VAE in bf16.")
74
+
75
+ parser.add_argument("--cpu-vae", action="store_true", help="Run the VAE on the CPU.")
76
+
77
+ fpte_group = parser.add_mutually_exclusive_group()
78
+ fpte_group.add_argument("--fp8_e4m3fn-text-enc", action="store_true", help="Store text encoder weights in fp8 (e4m3fn variant).")
79
+ fpte_group.add_argument("--fp8_e5m2-text-enc", action="store_true", help="Store text encoder weights in fp8 (e5m2 variant).")
80
+ fpte_group.add_argument("--fp16-text-enc", action="store_true", help="Store text encoder weights in fp16.")
81
+ fpte_group.add_argument("--fp32-text-enc", action="store_true", help="Store text encoder weights in fp32.")
82
+ fpte_group.add_argument("--bf16-text-enc", action="store_true", help="Store text encoder weights in bf16.")
83
+
84
+ parser.add_argument("--force-channels-last", action="store_true", help="Force channels last format when inferencing the models.")
85
+
86
+ parser.add_argument("--directml", type=int, nargs="?", metavar="DIRECTML_DEVICE", const=-1, help="Use torch-directml.")
87
+
88
+ parser.add_argument("--oneapi-device-selector", type=str, default=None, metavar="SELECTOR_STRING", help="Sets the oneAPI device(s) this instance will use.")
89
+ parser.add_argument("--disable-ipex-optimize", action="store_true", help="Disables ipex.optimize default when loading models with Intel's Extension for Pytorch.")
90
+
91
+ class LatentPreviewMethod(enum.Enum):
92
+ NoPreviews = "none"
93
+ Auto = "auto"
94
+ Latent2RGB = "latent2rgb"
95
+ TAESD = "taesd"
96
+
97
+ parser.add_argument("--preview-method", type=LatentPreviewMethod, default=LatentPreviewMethod.NoPreviews, help="Default preview method for sampler nodes.", action=EnumAction)
98
+
99
+ parser.add_argument("--preview-size", type=int, default=512, help="Sets the maximum preview size for sampler nodes.")
100
+
101
+ cache_group = parser.add_mutually_exclusive_group()
102
+ cache_group.add_argument("--cache-classic", action="store_true", help="Use the old style (aggressive) caching.")
103
+ cache_group.add_argument("--cache-lru", type=int, default=0, help="Use LRU caching with a maximum of N node results cached. May use more RAM/VRAM.")
104
+
105
+ attn_group = parser.add_mutually_exclusive_group()
106
+ attn_group.add_argument("--use-split-cross-attention", action="store_true", help="Use the split cross attention optimization. Ignored when xformers is used.")
107
+ attn_group.add_argument("--use-quad-cross-attention", action="store_true", help="Use the sub-quadratic cross attention optimization . Ignored when xformers is used.")
108
+ attn_group.add_argument("--use-pytorch-cross-attention", action="store_true", help="Use the new pytorch 2.0 cross attention function.")
109
+ attn_group.add_argument("--use-sage-attention", action="store_true", help="Use sage attention.")
110
+ attn_group.add_argument("--use-flash-attention", action="store_true", help="Use FlashAttention.")
111
+
112
+ parser.add_argument("--disable-xformers", action="store_true", help="Disable xformers.")
113
+
114
+ upcast = parser.add_mutually_exclusive_group()
115
+ upcast.add_argument("--force-upcast-attention", action="store_true", help="Force enable attention upcasting, please report if it fixes black images.")
116
+ upcast.add_argument("--dont-upcast-attention", action="store_true", help="Disable all upcasting of attention. Should be unnecessary except for debugging.")
117
+
118
+
119
+ vram_group = parser.add_mutually_exclusive_group()
120
+ vram_group.add_argument("--gpu-only", action="store_true", help="Store and run everything (text encoders/CLIP models, etc... on the GPU).")
121
+ vram_group.add_argument("--highvram", action="store_true", help="By default models will be unloaded to CPU memory after being used. This option keeps them in GPU memory.")
122
+ vram_group.add_argument("--normalvram", action="store_true", help="Used to force normal vram use if lowvram gets automatically enabled.")
123
+ vram_group.add_argument("--lowvram", action="store_true", help="Split the unet in parts to use less vram.")
124
+ vram_group.add_argument("--novram", action="store_true", help="When lowvram isn't enough.")
125
+ vram_group.add_argument("--cpu", action="store_true", help="To use the CPU for everything (slow).")
126
+
127
+ parser.add_argument("--reserve-vram", type=float, default=None, help="Set the amount of vram in GB you want to reserve for use by your OS/other software. By default some amount is reserved depending on your OS.")
128
+
129
+
130
+ parser.add_argument("--default-hashing-function", type=str, choices=['md5', 'sha1', 'sha256', 'sha512'], default='sha256', help="Allows you to choose the hash function to use for duplicate filename / contents comparison. Default is sha256.")
131
+
132
+ parser.add_argument("--disable-smart-memory", action="store_true", help="Force ComfyUI to agressively offload to regular ram instead of keeping models in vram when it can.")
133
+ parser.add_argument("--deterministic", action="store_true", help="Make pytorch use slower deterministic algorithms when it can. Note that this might not make images deterministic in all cases.")
134
+
135
+ class PerformanceFeature(enum.Enum):
136
+ Fp16Accumulation = "fp16_accumulation"
137
+ Fp8MatrixMultiplication = "fp8_matrix_mult"
138
+
139
+ parser.add_argument("--fast", nargs="*", type=PerformanceFeature, help="Enable some untested and potentially quality deteriorating optimizations. --fast with no arguments enables everything. You can pass a list specific optimizations if you only want to enable specific ones. Current valid optimizations: fp16_accumulation fp8_matrix_mult")
140
+
141
+ parser.add_argument("--dont-print-server", action="store_true", help="Don't print server output.")
142
+ parser.add_argument("--quick-test-for-ci", action="store_true", help="Quick test for CI.")
143
+ parser.add_argument("--windows-standalone-build", action="store_true", help="Windows standalone build: Enable convenient things that most people using the standalone windows build will probably enjoy (like auto opening the page on startup).")
144
+
145
+ parser.add_argument("--disable-metadata", action="store_true", help="Disable saving prompt metadata in files.")
146
+ parser.add_argument("--disable-all-custom-nodes", action="store_true", help="Disable loading all custom nodes.")
147
+
148
+ parser.add_argument("--multi-user", action="store_true", help="Enables per-user storage.")
149
+
150
+ parser.add_argument("--verbose", default='INFO', const='DEBUG', nargs="?", choices=['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'], help='Set the logging level')
151
+ parser.add_argument("--log-stdout", action="store_true", help="Send normal process output to stdout instead of stderr (default).")
152
+
153
+ # The default built-in provider hosted under web/
154
+ DEFAULT_VERSION_STRING = "comfyanonymous/ComfyUI@latest"
155
+
156
+ parser.add_argument(
157
+ "--front-end-version",
158
+ type=str,
159
+ default=DEFAULT_VERSION_STRING,
160
+ help="""
161
+ Specifies the version of the frontend to be used. This command needs internet connectivity to query and
162
+ download available frontend implementations from GitHub releases.
163
+
164
+ The version string should be in the format of:
165
+ [repoOwner]/[repoName]@[version]
166
+ where version is one of: "latest" or a valid version number (e.g. "1.0.0")
167
+ """,
168
+ )
169
+
170
+ def is_valid_directory(path: str) -> str:
171
+ """Validate if the given path is a directory, and check permissions."""
172
+ if not os.path.exists(path):
173
+ raise argparse.ArgumentTypeError(f"The path '{path}' does not exist.")
174
+ if not os.path.isdir(path):
175
+ raise argparse.ArgumentTypeError(f"'{path}' is not a directory.")
176
+ if not os.access(path, os.R_OK):
177
+ raise argparse.ArgumentTypeError(f"You do not have read permissions for '{path}'.")
178
+ return path
179
+
180
+ parser.add_argument(
181
+ "--front-end-root",
182
+ type=is_valid_directory,
183
+ default=None,
184
+ help="The local filesystem path to the directory where the frontend is located. Overrides --front-end-version.",
185
+ )
186
+
187
+ parser.add_argument("--user-directory", type=is_valid_directory, default=None, help="Set the ComfyUI user directory with an absolute path. Overrides --base-directory.")
188
+
189
+ parser.add_argument("--enable-compress-response-body", action="store_true", help="Enable compressing response body.")
190
+
191
+ if comfy.options.args_parsing:
192
+ args = parser.parse_args()
193
+ else:
194
+ args = parser.parse_args([])
195
+
196
+ if args.windows_standalone_build:
197
+ args.auto_launch = True
198
+
199
+ if args.disable_auto_launch:
200
+ args.auto_launch = False
201
+
202
+ if args.force_fp16:
203
+ args.fp16_unet = True
204
+
205
+
206
+ # '--fast' is not provided, use an empty set
207
+ if args.fast is None:
208
+ args.fast = set()
209
+ # '--fast' is provided with an empty list, enable all optimizations
210
+ elif args.fast == []:
211
+ args.fast = set(PerformanceFeature)
212
+ # '--fast' is provided with a list of performance features, use that list
213
+ else:
214
+ args.fast = set(args.fast)
Imagine/imagine-v5-ultra/comfy/clip_config_bigg.json ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "CLIPTextModel"
4
+ ],
5
+ "attention_dropout": 0.0,
6
+ "bos_token_id": 0,
7
+ "dropout": 0.0,
8
+ "eos_token_id": 49407,
9
+ "hidden_act": "gelu",
10
+ "hidden_size": 1280,
11
+ "initializer_factor": 1.0,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 5120,
14
+ "layer_norm_eps": 1e-05,
15
+ "max_position_embeddings": 77,
16
+ "model_type": "clip_text_model",
17
+ "num_attention_heads": 20,
18
+ "num_hidden_layers": 32,
19
+ "pad_token_id": 1,
20
+ "projection_dim": 1280,
21
+ "torch_dtype": "float32",
22
+ "vocab_size": 49408
23
+ }
Imagine/imagine-v5-ultra/comfy/clip_model.py ADDED
@@ -0,0 +1,244 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import torch
2
+ from comfy.ldm.modules.attention import optimized_attention_for_device
3
+ import comfy.ops
4
+
5
+ class CLIPAttention(torch.nn.Module):
6
+ def __init__(self, embed_dim, heads, dtype, device, operations):
7
+ super().__init__()
8
+
9
+ self.heads = heads
10
+ self.q_proj = operations.Linear(embed_dim, embed_dim, bias=True, dtype=dtype, device=device)
11
+ self.k_proj = operations.Linear(embed_dim, embed_dim, bias=True, dtype=dtype, device=device)
12
+ self.v_proj = operations.Linear(embed_dim, embed_dim, bias=True, dtype=dtype, device=device)
13
+
14
+ self.out_proj = operations.Linear(embed_dim, embed_dim, bias=True, dtype=dtype, device=device)
15
+
16
+ def forward(self, x, mask=None, optimized_attention=None):
17
+ q = self.q_proj(x)
18
+ k = self.k_proj(x)
19
+ v = self.v_proj(x)
20
+
21
+ out = optimized_attention(q, k, v, self.heads, mask)
22
+ return self.out_proj(out)
23
+
24
+ ACTIVATIONS = {"quick_gelu": lambda a: a * torch.sigmoid(1.702 * a),
25
+ "gelu": torch.nn.functional.gelu,
26
+ "gelu_pytorch_tanh": lambda a: torch.nn.functional.gelu(a, approximate="tanh"),
27
+ }
28
+
29
+ class CLIPMLP(torch.nn.Module):
30
+ def __init__(self, embed_dim, intermediate_size, activation, dtype, device, operations):
31
+ super().__init__()
32
+ self.fc1 = operations.Linear(embed_dim, intermediate_size, bias=True, dtype=dtype, device=device)
33
+ self.activation = ACTIVATIONS[activation]
34
+ self.fc2 = operations.Linear(intermediate_size, embed_dim, bias=True, dtype=dtype, device=device)
35
+
36
+ def forward(self, x):
37
+ x = self.fc1(x)
38
+ x = self.activation(x)
39
+ x = self.fc2(x)
40
+ return x
41
+
42
+ class CLIPLayer(torch.nn.Module):
43
+ def __init__(self, embed_dim, heads, intermediate_size, intermediate_activation, dtype, device, operations):
44
+ super().__init__()
45
+ self.layer_norm1 = operations.LayerNorm(embed_dim, dtype=dtype, device=device)
46
+ self.self_attn = CLIPAttention(embed_dim, heads, dtype, device, operations)
47
+ self.layer_norm2 = operations.LayerNorm(embed_dim, dtype=dtype, device=device)
48
+ self.mlp = CLIPMLP(embed_dim, intermediate_size, intermediate_activation, dtype, device, operations)
49
+
50
+ def forward(self, x, mask=None, optimized_attention=None):
51
+ x += self.self_attn(self.layer_norm1(x), mask, optimized_attention)
52
+ x += self.mlp(self.layer_norm2(x))
53
+ return x
54
+
55
+
56
+ class CLIPEncoder(torch.nn.Module):
57
+ def __init__(self, num_layers, embed_dim, heads, intermediate_size, intermediate_activation, dtype, device, operations):
58
+ super().__init__()
59
+ self.layers = torch.nn.ModuleList([CLIPLayer(embed_dim, heads, intermediate_size, intermediate_activation, dtype, device, operations) for i in range(num_layers)])
60
+
61
+ def forward(self, x, mask=None, intermediate_output=None):
62
+ optimized_attention = optimized_attention_for_device(x.device, mask=mask is not None, small_input=True)
63
+
64
+ if intermediate_output is not None:
65
+ if intermediate_output < 0:
66
+ intermediate_output = len(self.layers) + intermediate_output
67
+
68
+ intermediate = None
69
+ for i, l in enumerate(self.layers):
70
+ x = l(x, mask, optimized_attention)
71
+ if i == intermediate_output:
72
+ intermediate = x.clone()
73
+ return x, intermediate
74
+
75
+ class CLIPEmbeddings(torch.nn.Module):
76
+ def __init__(self, embed_dim, vocab_size=49408, num_positions=77, dtype=None, device=None, operations=None):
77
+ super().__init__()
78
+ self.token_embedding = operations.Embedding(vocab_size, embed_dim, dtype=dtype, device=device)
79
+ self.position_embedding = operations.Embedding(num_positions, embed_dim, dtype=dtype, device=device)
80
+
81
+ def forward(self, input_tokens, dtype=torch.float32):
82
+ return self.token_embedding(input_tokens, out_dtype=dtype) + comfy.ops.cast_to(self.position_embedding.weight, dtype=dtype, device=input_tokens.device)
83
+
84
+
85
+ class CLIPTextModel_(torch.nn.Module):
86
+ def __init__(self, config_dict, dtype, device, operations):
87
+ num_layers = config_dict["num_hidden_layers"]
88
+ embed_dim = config_dict["hidden_size"]
89
+ heads = config_dict["num_attention_heads"]
90
+ intermediate_size = config_dict["intermediate_size"]
91
+ intermediate_activation = config_dict["hidden_act"]
92
+ num_positions = config_dict["max_position_embeddings"]
93
+ self.eos_token_id = config_dict["eos_token_id"]
94
+
95
+ super().__init__()
96
+ self.embeddings = CLIPEmbeddings(embed_dim, num_positions=num_positions, dtype=dtype, device=device, operations=operations)
97
+ self.encoder = CLIPEncoder(num_layers, embed_dim, heads, intermediate_size, intermediate_activation, dtype, device, operations)
98
+ self.final_layer_norm = operations.LayerNorm(embed_dim, dtype=dtype, device=device)
99
+
100
+ def forward(self, input_tokens=None, attention_mask=None, embeds=None, num_tokens=None, intermediate_output=None, final_layer_norm_intermediate=True, dtype=torch.float32):
101
+ if embeds is not None:
102
+ x = embeds + comfy.ops.cast_to(self.embeddings.position_embedding.weight, dtype=dtype, device=embeds.device)
103
+ else:
104
+ x = self.embeddings(input_tokens, dtype=dtype)
105
+
106
+ mask = None
107
+ if attention_mask is not None:
108
+ mask = 1.0 - attention_mask.to(x.dtype).reshape((attention_mask.shape[0], 1, -1, attention_mask.shape[-1])).expand(attention_mask.shape[0], 1, attention_mask.shape[-1], attention_mask.shape[-1])
109
+ mask = mask.masked_fill(mask.to(torch.bool), -torch.finfo(x.dtype).max)
110
+
111
+ causal_mask = torch.full((x.shape[1], x.shape[1]), -torch.finfo(x.dtype).max, dtype=x.dtype, device=x.device).triu_(1)
112
+
113
+ if mask is not None:
114
+ mask += causal_mask
115
+ else:
116
+ mask = causal_mask
117
+
118
+ x, i = self.encoder(x, mask=mask, intermediate_output=intermediate_output)
119
+ x = self.final_layer_norm(x)
120
+ if i is not None and final_layer_norm_intermediate:
121
+ i = self.final_layer_norm(i)
122
+
123
+ if num_tokens is not None:
124
+ pooled_output = x[list(range(x.shape[0])), list(map(lambda a: a - 1, num_tokens))]
125
+ else:
126
+ pooled_output = x[torch.arange(x.shape[0], device=x.device), (torch.round(input_tokens).to(dtype=torch.int, device=x.device) == self.eos_token_id).int().argmax(dim=-1),]
127
+ return x, i, pooled_output
128
+
129
+ class CLIPTextModel(torch.nn.Module):
130
+ def __init__(self, config_dict, dtype, device, operations):
131
+ super().__init__()
132
+ self.num_layers = config_dict["num_hidden_layers"]
133
+ self.text_model = CLIPTextModel_(config_dict, dtype, device, operations)
134
+ embed_dim = config_dict["hidden_size"]
135
+ self.text_projection = operations.Linear(embed_dim, embed_dim, bias=False, dtype=dtype, device=device)
136
+ self.dtype = dtype
137
+
138
+ def get_input_embeddings(self):
139
+ return self.text_model.embeddings.token_embedding
140
+
141
+ def set_input_embeddings(self, embeddings):
142
+ self.text_model.embeddings.token_embedding = embeddings
143
+
144
+ def forward(self, *args, **kwargs):
145
+ x = self.text_model(*args, **kwargs)
146
+ out = self.text_projection(x[2])
147
+ return (x[0], x[1], out, x[2])
148
+
149
+
150
+ class CLIPVisionEmbeddings(torch.nn.Module):
151
+ def __init__(self, embed_dim, num_channels=3, patch_size=14, image_size=224, model_type="", dtype=None, device=None, operations=None):
152
+ super().__init__()
153
+
154
+ num_patches = (image_size // patch_size) ** 2
155
+ if model_type == "siglip_vision_model":
156
+ self.class_embedding = None
157
+ patch_bias = True
158
+ else:
159
+ num_patches = num_patches + 1
160
+ self.class_embedding = torch.nn.Parameter(torch.empty(embed_dim, dtype=dtype, device=device))
161
+ patch_bias = False
162
+
163
+ self.patch_embedding = operations.Conv2d(
164
+ in_channels=num_channels,
165
+ out_channels=embed_dim,
166
+ kernel_size=patch_size,
167
+ stride=patch_size,
168
+ bias=patch_bias,
169
+ dtype=dtype,
170
+ device=device
171
+ )
172
+
173
+ self.position_embedding = operations.Embedding(num_patches, embed_dim, dtype=dtype, device=device)
174
+
175
+ def forward(self, pixel_values):
176
+ embeds = self.patch_embedding(pixel_values).flatten(2).transpose(1, 2)
177
+ if self.class_embedding is not None:
178
+ embeds = torch.cat([comfy.ops.cast_to_input(self.class_embedding, embeds).expand(pixel_values.shape[0], 1, -1), embeds], dim=1)
179
+ return embeds + comfy.ops.cast_to_input(self.position_embedding.weight, embeds)
180
+
181
+
182
+ class CLIPVision(torch.nn.Module):
183
+ def __init__(self, config_dict, dtype, device, operations):
184
+ super().__init__()
185
+ num_layers = config_dict["num_hidden_layers"]
186
+ embed_dim = config_dict["hidden_size"]
187
+ heads = config_dict["num_attention_heads"]
188
+ intermediate_size = config_dict["intermediate_size"]
189
+ intermediate_activation = config_dict["hidden_act"]
190
+ model_type = config_dict["model_type"]
191
+
192
+ self.embeddings = CLIPVisionEmbeddings(embed_dim, config_dict["num_channels"], config_dict["patch_size"], config_dict["image_size"], model_type=model_type, dtype=dtype, device=device, operations=operations)
193
+ if model_type == "siglip_vision_model":
194
+ self.pre_layrnorm = lambda a: a
195
+ self.output_layernorm = True
196
+ else:
197
+ self.pre_layrnorm = operations.LayerNorm(embed_dim)
198
+ self.output_layernorm = False
199
+ self.encoder = CLIPEncoder(num_layers, embed_dim, heads, intermediate_size, intermediate_activation, dtype, device, operations)
200
+ self.post_layernorm = operations.LayerNorm(embed_dim)
201
+
202
+ def forward(self, pixel_values, attention_mask=None, intermediate_output=None):
203
+ x = self.embeddings(pixel_values)
204
+ x = self.pre_layrnorm(x)
205
+ #TODO: attention_mask?
206
+ x, i = self.encoder(x, mask=None, intermediate_output=intermediate_output)
207
+ if self.output_layernorm:
208
+ x = self.post_layernorm(x)
209
+ pooled_output = x
210
+ else:
211
+ pooled_output = self.post_layernorm(x[:, 0, :])
212
+ return x, i, pooled_output
213
+
214
+ class LlavaProjector(torch.nn.Module):
215
+ def __init__(self, in_dim, out_dim, dtype, device, operations):
216
+ super().__init__()
217
+ self.linear_1 = operations.Linear(in_dim, out_dim, bias=True, device=device, dtype=dtype)
218
+ self.linear_2 = operations.Linear(out_dim, out_dim, bias=True, device=device, dtype=dtype)
219
+
220
+ def forward(self, x):
221
+ return self.linear_2(torch.nn.functional.gelu(self.linear_1(x[:, 1:])))
222
+
223
+ class CLIPVisionModelProjection(torch.nn.Module):
224
+ def __init__(self, config_dict, dtype, device, operations):
225
+ super().__init__()
226
+ self.vision_model = CLIPVision(config_dict, dtype, device, operations)
227
+ if "projection_dim" in config_dict:
228
+ self.visual_projection = operations.Linear(config_dict["hidden_size"], config_dict["projection_dim"], bias=False)
229
+ else:
230
+ self.visual_projection = lambda a: a
231
+
232
+ if "llava3" == config_dict.get("projector_type", None):
233
+ self.multi_modal_projector = LlavaProjector(config_dict["hidden_size"], 4096, dtype, device, operations)
234
+ else:
235
+ self.multi_modal_projector = None
236
+
237
+ def forward(self, *args, **kwargs):
238
+ x = self.vision_model(*args, **kwargs)
239
+ out = self.visual_projection(x[2])
240
+ projected = None
241
+ if self.multi_modal_projector is not None:
242
+ projected = self.multi_modal_projector(x[1])
243
+
244
+ return (x[0], x[1], out, projected)
Imagine/imagine-v5-ultra/comfy/clip_vision.py ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from .utils import load_torch_file, transformers_convert, state_dict_prefix_replace
2
+ import os
3
+ import torch
4
+ import json
5
+ import logging
6
+
7
+ import comfy.ops
8
+ import comfy.model_patcher
9
+ import comfy.model_management
10
+ import comfy.utils
11
+ import comfy.clip_model
12
+ import comfy.image_encoders.dino2
13
+
14
+ class Output:
15
+ def __getitem__(self, key):
16
+ return getattr(self, key)
17
+ def __setitem__(self, key, item):
18
+ setattr(self, key, item)
19
+
20
+ def clip_preprocess(image, size=224, mean=[0.48145466, 0.4578275, 0.40821073], std=[0.26862954, 0.26130258, 0.27577711], crop=True):
21
+ mean = torch.tensor(mean, device=image.device, dtype=image.dtype)
22
+ std = torch.tensor(std, device=image.device, dtype=image.dtype)
23
+ image = image.movedim(-1, 1)
24
+ if not (image.shape[2] == size and image.shape[3] == size):
25
+ if crop:
26
+ scale = (size / min(image.shape[2], image.shape[3]))
27
+ scale_size = (round(scale * image.shape[2]), round(scale * image.shape[3]))
28
+ else:
29
+ scale_size = (size, size)
30
+
31
+ image = torch.nn.functional.interpolate(image, size=scale_size, mode="bicubic", antialias=True)
32
+ h = (image.shape[2] - size)//2
33
+ w = (image.shape[3] - size)//2
34
+ image = image[:,:,h:h+size,w:w+size]
35
+ image = torch.clip((255. * image), 0, 255).round() / 255.0
36
+ return (image - mean.view([3,1,1])) / std.view([3,1,1])
37
+
38
+ IMAGE_ENCODERS = {
39
+ "clip_vision_model": comfy.clip_model.CLIPVisionModelProjection,
40
+ "siglip_vision_model": comfy.clip_model.CLIPVisionModelProjection,
41
+ "dinov2": comfy.image_encoders.dino2.Dinov2Model,
42
+ }
43
+
44
+ class ClipVisionModel():
45
+ def __init__(self, json_config):
46
+ with open(json_config) as f:
47
+ config = json.load(f)
48
+
49
+ self.image_size = config.get("image_size", 224)
50
+ self.image_mean = config.get("image_mean", [0.48145466, 0.4578275, 0.40821073])
51
+ self.image_std = config.get("image_std", [0.26862954, 0.26130258, 0.27577711])
52
+ model_class = IMAGE_ENCODERS.get(config.get("model_type", "clip_vision_model"))
53
+ self.load_device = comfy.model_management.text_encoder_device()
54
+ offload_device = comfy.model_management.text_encoder_offload_device()
55
+ self.dtype = comfy.model_management.text_encoder_dtype(self.load_device)
56
+ self.model = model_class(config, self.dtype, offload_device, comfy.ops.manual_cast)
57
+ self.model.eval()
58
+
59
+ self.patcher = comfy.model_patcher.ModelPatcher(self.model, load_device=self.load_device, offload_device=offload_device)
60
+
61
+ def load_sd(self, sd):
62
+ return self.model.load_state_dict(sd, strict=False)
63
+
64
+ def get_sd(self):
65
+ return self.model.state_dict()
66
+
67
+ def encode_image(self, image, crop=True):
68
+ comfy.model_management.load_model_gpu(self.patcher)
69
+ pixel_values = clip_preprocess(image.to(self.load_device), size=self.image_size, mean=self.image_mean, std=self.image_std, crop=crop).float()
70
+ out = self.model(pixel_values=pixel_values, intermediate_output=-2)
71
+
72
+ outputs = Output()
73
+ outputs["last_hidden_state"] = out[0].to(comfy.model_management.intermediate_device())
74
+ outputs["image_embeds"] = out[2].to(comfy.model_management.intermediate_device())
75
+ outputs["penultimate_hidden_states"] = out[1].to(comfy.model_management.intermediate_device())
76
+ outputs["mm_projected"] = out[3]
77
+ return outputs
78
+
79
+ def convert_to_transformers(sd, prefix):
80
+ sd_k = sd.keys()
81
+ if "{}transformer.resblocks.0.attn.in_proj_weight".format(prefix) in sd_k:
82
+ keys_to_replace = {
83
+ "{}class_embedding".format(prefix): "vision_model.embeddings.class_embedding",
84
+ "{}conv1.weight".format(prefix): "vision_model.embeddings.patch_embedding.weight",
85
+ "{}positional_embedding".format(prefix): "vision_model.embeddings.position_embedding.weight",
86
+ "{}ln_post.bias".format(prefix): "vision_model.post_layernorm.bias",
87
+ "{}ln_post.weight".format(prefix): "vision_model.post_layernorm.weight",
88
+ "{}ln_pre.bias".format(prefix): "vision_model.pre_layrnorm.bias",
89
+ "{}ln_pre.weight".format(prefix): "vision_model.pre_layrnorm.weight",
90
+ }
91
+
92
+ for x in keys_to_replace:
93
+ if x in sd_k:
94
+ sd[keys_to_replace[x]] = sd.pop(x)
95
+
96
+ if "{}proj".format(prefix) in sd_k:
97
+ sd['visual_projection.weight'] = sd.pop("{}proj".format(prefix)).transpose(0, 1)
98
+
99
+ sd = transformers_convert(sd, prefix, "vision_model.", 48)
100
+ else:
101
+ replace_prefix = {prefix: ""}
102
+ sd = state_dict_prefix_replace(sd, replace_prefix)
103
+ return sd
104
+
105
+ def load_clipvision_from_sd(sd, prefix="", convert_keys=False):
106
+ if convert_keys:
107
+ sd = convert_to_transformers(sd, prefix)
108
+ if "vision_model.encoder.layers.47.layer_norm1.weight" in sd:
109
+ json_config = os.path.join(os.path.dirname(os.path.realpath(__file__)), "clip_vision_config_g.json")
110
+ elif "vision_model.encoder.layers.30.layer_norm1.weight" in sd:
111
+ json_config = os.path.join(os.path.dirname(os.path.realpath(__file__)), "clip_vision_config_h.json")
112
+ elif "vision_model.encoder.layers.22.layer_norm1.weight" in sd:
113
+ if sd["vision_model.encoder.layers.0.layer_norm1.weight"].shape[0] == 1152:
114
+ json_config = os.path.join(os.path.dirname(os.path.realpath(__file__)), "clip_vision_siglip_384.json")
115
+ elif sd["vision_model.embeddings.position_embedding.weight"].shape[0] == 577:
116
+ if "multi_modal_projector.linear_1.bias" in sd:
117
+ json_config = os.path.join(os.path.dirname(os.path.realpath(__file__)), "clip_vision_config_vitl_336_llava.json")
118
+ else:
119
+ json_config = os.path.join(os.path.dirname(os.path.realpath(__file__)), "clip_vision_config_vitl_336.json")
120
+ else:
121
+ json_config = os.path.join(os.path.dirname(os.path.realpath(__file__)), "clip_vision_config_vitl.json")
122
+ elif "embeddings.patch_embeddings.projection.weight" in sd:
123
+ json_config = os.path.join(os.path.join(os.path.dirname(os.path.realpath(__file__)), "image_encoders"), "dino2_giant.json")
124
+ else:
125
+ return None
126
+
127
+ clip = ClipVisionModel(json_config)
128
+ m, u = clip.load_sd(sd)
129
+ if len(m) > 0:
130
+ logging.warning("missing clip vision: {}".format(m))
131
+ u = set(u)
132
+ keys = list(sd.keys())
133
+ for k in keys:
134
+ if k not in u:
135
+ sd.pop(k)
136
+ return clip
137
+
138
+ def load(ckpt_path):
139
+ sd = load_torch_file(ckpt_path)
140
+ if "visual.transformer.resblocks.0.attn.in_proj_weight" in sd:
141
+ return load_clipvision_from_sd(sd, prefix="visual.", convert_keys=True)
142
+ else:
143
+ return load_clipvision_from_sd(sd)
Imagine/imagine-v5-ultra/comfy/clip_vision_config_g.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "attention_dropout": 0.0,
3
+ "dropout": 0.0,
4
+ "hidden_act": "gelu",
5
+ "hidden_size": 1664,
6
+ "image_size": 224,
7
+ "initializer_factor": 1.0,
8
+ "initializer_range": 0.02,
9
+ "intermediate_size": 8192,
10
+ "layer_norm_eps": 1e-05,
11
+ "model_type": "clip_vision_model",
12
+ "num_attention_heads": 16,
13
+ "num_channels": 3,
14
+ "num_hidden_layers": 48,
15
+ "patch_size": 14,
16
+ "projection_dim": 1280,
17
+ "torch_dtype": "float32"
18
+ }
Imagine/imagine-v5-ultra/comfy/clip_vision_config_h.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "attention_dropout": 0.0,
3
+ "dropout": 0.0,
4
+ "hidden_act": "gelu",
5
+ "hidden_size": 1280,
6
+ "image_size": 224,
7
+ "initializer_factor": 1.0,
8
+ "initializer_range": 0.02,
9
+ "intermediate_size": 5120,
10
+ "layer_norm_eps": 1e-05,
11
+ "model_type": "clip_vision_model",
12
+ "num_attention_heads": 16,
13
+ "num_channels": 3,
14
+ "num_hidden_layers": 32,
15
+ "patch_size": 14,
16
+ "projection_dim": 1024,
17
+ "torch_dtype": "float32"
18
+ }
Imagine/imagine-v5-ultra/comfy/clip_vision_config_vitl.json ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "attention_dropout": 0.0,
3
+ "dropout": 0.0,
4
+ "hidden_act": "quick_gelu",
5
+ "hidden_size": 1024,
6
+ "image_size": 224,
7
+ "initializer_factor": 1.0,
8
+ "initializer_range": 0.02,
9
+ "intermediate_size": 4096,
10
+ "layer_norm_eps": 1e-05,
11
+ "model_type": "clip_vision_model",
12
+ "num_attention_heads": 16,
13
+ "num_channels": 3,
14
+ "num_hidden_layers": 24,
15
+ "patch_size": 14,
16
+ "projection_dim": 768,
17
+ "torch_dtype": "float32"
18
+ }