{ "cells": [ { "cell_type": "code", "execution_count": null, "metadata": { "cellView": "form", "id": "VjYy0F2gZIPR" }, "outputs": [], "source": [ "#@title DeFooocus\n", "#@markdown **Launch the interface DeFocus (Fooocus fork)** | You need to connect with T4/A100/V100\n", "#@markdown ****\n", "#@markdown *Attention!* When working in the interface with the FaceSwap and CPDS controlnet, crashes are possible; it is also recommended to work in *Extreme speed* mode for additional stability. When working with the ImagePrompt and PyraCanny controls, 85% of the work will be stable.\n", "#@markdown ****\n", "\n", "print(\"[DeFooocus] Preparing ...\")\n", "\n", "theme = \"dark\" #@param [\"dark\", \"light\"]\n", "preset = \"deafult\" #@param [\"deafult\", \"realistic\", \"anime\", \"lcm\", \"sai\", \"turbo\", \"lighting\", \"hypersd\", \"playground_v2.5\", \"dpo\", \"spo\", \"sd1.5\"]\n", "advenced_args = \"--share --attention-split --always-high-vram --disable-offload-from-vram --all-in-fp16\" #@param {type: \"string\"}\n", "\n", "if preset != \"deafult\":\n", " args = f\"{advenced_args} --theme {theme} --preset {preset}\"\n", "else:\n", " args = f\"{advenced_args} --theme {theme}\"\n", "\n", "!pip install -q pygit2==1.12.2\n", "%cd /content\n", "!git clone https://github.com/ehristoforu/DeFooocus.git\n", "%cd /content/DeFooocus\n", "!pip install -q -r requirements_versions.txt\n", "\n", "print(\"[DeFooocus] Starting ...\")\n", "!python entry_with_update.py $args" ] } ], "metadata": { "accelerator": "GPU", "colab": { "gpuType": "T4", "provenance": [] }, "kernelspec": { "display_name": "Python 3", "name": "python3" }, "language_info": { "name": "python" } }, "nbformat": 4, "nbformat_minor": 0 }