ComfyGen Studio is a sleek and intuitive mobile interface for ComfyUI, designed to simplify your image generation workflow on the go. This project enhances the original ComfyUI with a user-friendly interface and additional features.
This fork of ComfyGen Studio was created to bypass the limitations of ComfyUI's node-based interface on mobile devices, providing a streamlined, touch-friendly way to use the Flux image generation model directly from iPhones and iPads without dealing with complex node arrangements.
- Project Screenshots
- Setting Up ComfyGen Studio
- New Features and Enhancements
- Using the Default Flux Workflow
- Troubleshooting
- Contributing
- License
- Acknowledgments
- ComfyUI installed
- A compatible GPU (for optimal performance)
- Basic familiarity with ComfyUI workflows
To set up ComfyGen Studio using ComfyUI, follow these steps:
- Clone or download this repository directly into the
custom_nodes
directory within ComfyUI. - Execute
run_nvidia_gpu.bat
orrun_cpu.bat
to start the ComfyUI server. - (Optional) Replace the default workflow:
- Enable Dev Mode Options: Click on "Settings" in the ComfyUI interface to enable Dev Mode Options.
- Generate Workflow JSON: Go back and click "Save (API Format)" to create a JSON for your workflow.
- Replace Base Workflow: Replace
web/js/base_workflow.json
with your JSON to use your custom workflow.
- Access ComfyGen Studio: Open your web browser and navigate to
http://<comfy_address>:<comfy_port>/comfygen
(e.g., http://127.0.0.1:8188/comfygen).
ComfyGen Studio introduces several improvements to the original ComfyUI interface:
- Responsive Design: Optimized for mobile devices with a clean, card-based layout.
- Image Size Control: Presets and custom inputs for width and height.
- Advanced Generation Settings: Control steps and seed for image generation.
- Image History: Navigate through previously generated images.
- Prompt Management: Recent and favorite prompts lists for quick access.
- Real-time Updates: WebSocket integration for live progress tracking.
The default workflow is optimized for Flux. Here's what you need to know:
- Performance: On an RTX3070 8GB VRAM and 64GB RAM, expect 47-50 seconds per 512x512 prompt.
To set up Flux with ComfyUI:
- Download the fp8 Model (not fp16) from this link. Place it in the
/unet
folder. - Download the VAE from this link. Rename "diffusion_pytorch_model.safetensors" to something like "flux-schnell.safetensors" and place it in the VAE folder.
- Download the clips from this link. You need "clip_l.safetensors" and "t5xxl_fp8...safetensors". Place them in the clip folder.
- Update/install missing nodes in ComfyUI and restart.
- Note: Adding
--lowvram
as an argument in the run batch file may slow down performance. - Optional: You can also load the base_workflow.json from this project directly in the regular ComfyUI interface.
This setup is optimized for low-mid range GPUs. Adjust as necessary for your hardware.
If you want to use your own workflow instead of the default Flux workflow, follow these steps:
-
In ComfyUI, create your desired workflow.
-
Enable Dev Mode Options: Click on "Settings" in the ComfyUI interface to enable Dev Mode Options.
-
Generate Workflow JSON: Go back and click "Save (API Format)" to create a JSON for your workflow.
-
Replace the content of
web/js/base_workflow.json
with your newly generated JSON. -
Open
web/js/app.js
and locate the following lines:workflow['87']['inputs']['wildcard_text'] = text.replace(/(\r\n|\n|\r)/gm, ' ') workflow['34']['inputs']['noise_seed'] = currentSeed workflow['25']['inputs']['width'] = width workflow['25']['inputs']['height'] = height workflow['32']['inputs']['steps'] = steps
-
Update these lines to match the node IDs in your new workflow. For example, if your text input node where you normally enter your prompt in the workflow has ID '983', you would change the first line to:
workflow['983']['inputs']['text'] = text.replace(/(\r\n|\n|\r)/gm, ' ')
-
Make similar adjustments for other nodes (seed, width, height, steps) based on your workflow structure.
-
Changes not reflecting: If you make changes to
app.js
they should take effect without restarting ComfyUI if you refresh the browser window. -
Queue prompt not working: Ensure that the node IDs in
app.js
exactly match those in yourbase_workflow.json
. Even a small mismatch can prevent the prompt from being queued.
If you're still experiencing issues:
- Double-check that all file paths and node IDs are correct.
- Consult the ComfyUI documentation for any specific node-related questions.
We welcome contributions to ComfyGen Studio! If you have suggestions or improvements, feel free to fork this repository and submit a pull request.
This project is licensed under the MIT License.
- Original ComfyUI project
- All contributors and users of ComfyGen Studio
- Flux model developers
This project is not actively maintained. Updates are made for personal use and released periodically.