-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d4690d2
Showing
13 changed files
with
2,608 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Cog SDXL Canny ControlNet with LoRA support | ||
|
||
[![Replicate demo and cloud API](https://replicate.com/stability-ai/sdxl/badge)](https://replicate.com/batouresearch/sdxl-controlnet-lora) | ||
|
||
This is an implementation of Stability AI's [SDXL](https://github.com/Stability-AI/generative-models) as a [Cog](https://github.com/replicate/cog) model with ControlNet and Replicate's LoRA support. | ||
|
||
## Basic Usage | ||
|
||
For prediction: | ||
|
||
```bash | ||
cog predict -i prompt="shot in the style of sksfer, ..." -i image=@image.png -i lora_weights="https://pbxt.replicate.delivery/mwN3AFyYZyouOB03Uhw8ubKW9rpqMgdtL9zYV9GF2WGDiwbE/trained_model.tar" | ||
``` | ||
You may need to increase the default `lora_scale` value to big values such as <strong>0.8 ... 0.95</strong>. | ||
|
||
## Limitations | ||
- `lora_weights` only accepts models trained in Replicate and is a mandatory parameter. | ||
- `expert_ensemble_refiner` is currently not supported, you can use `base_image_refiner` instead. | ||
- For the moment, the model only uses canny as the conditional image. | ||
|
||
<br> | ||
<strong>For further improvements of this project, feel free to fork and PR!</strong> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Configuration for Cog ⚙️ | ||
# Reference: https://github.com/replicate/cog/blob/main/docs/yaml.md | ||
|
||
build: | ||
gpu: true | ||
cuda: "11.8" | ||
python_version: "3.9" | ||
system_packages: | ||
- "libgl1-mesa-glx" | ||
- "ffmpeg" | ||
- "libsm6" | ||
- "libxext6" | ||
- "wget" | ||
python_packages: | ||
- "diffusers==0.21.4" | ||
- "torch==2.0.1" | ||
- "transformers==4.34.0" | ||
- "invisible-watermark==0.2.0" | ||
- "accelerate==0.21.0" | ||
- "pandas==2.0.3" | ||
- "torchvision==0.15.2" | ||
- "numpy==1.25.1" | ||
- "pandas==2.0.3" | ||
- "fire==0.5.0" | ||
- "opencv-python>=4.1.0.25" | ||
- "mediapipe==0.10.2" | ||
|
||
run: | ||
- curl -o /usr/local/bin/pget -L "https://github.com/replicate/pget/releases/download/v0.0.3/pget" && chmod +x /usr/local/bin/pget | ||
- wget http://thegiflibrary.tumblr.com/post/11565547760 -O face_landmarker_v2_with_blendshapes.task -q https://storage.googleapis.com/mediapipe-models/face_landmarker/face_landmarker/float16/1/face_landmarker.task | ||
|
||
predict: "predict.py:Predictor" | ||
train: "train.py:train" |
Oops, something went wrong.