cjwbw/blipdiffusion

Pre-trained Subject Representation for Controllable Text-to-Image Generation and Editing

Clip-Guided Diffusion Model for Image Generation

Generates pokemon sprites from prompt

Real-ESRGAN super-resolution model from ruDALL-E

face alignment using stylegan-encoding

Image Manipulatinon with Diffusion Autoencoders

Blind Face Restoration with Vector-Quantized Dictionary and Parallel Decoder
Global Tracking Transformers

Colorization using a Generative Color Prior for Natural Images

Language-Free Training of a Text-to-Image Generator with CLIP

Composable Diffusion

Decoding Micromotion in Low-dimensional Latent Spaces from StyleGAN

VQ-Diffusion for Text-to-Image Synthesis

text-to-image generation

Panoptic Scene Graph Generation

text-to-image with latent diffusion

Unsupervised Night Image Enhancement

Inpainting using Denoising Diffusion Probabilistic Models

stable-diffusion with negative prompts, more scheduler

Pose-Invariant Hairstyle Transfer

End-to-End Document Image Enhancement Transformer

Pre-trained Subject Representation for Controllable Text-to-Image Generation and Editing
Prediction
cjwbw/blipdiffusion:501be8d57d86d63f9b9a06f8ea6d7a051ec7a7a7fc7b71d63764c8fb49a4fcfcIDob7mjq3bkttx5vdh5pkn6rhnweStatusSucceededSourceWebHardwareA40 (Large)Total durationCreatedInput
- width
- 512
- height
- 512
- prompt
- eating ramen
- guidance_scale
- 7.5
- negative_prompt
- over-exposure, under-exposure, saturated, duplicate, out of frame, lowres, cropped, worst quality, low quality, jpeg artifacts, morbid, mutilated, ugly, bad anatomy, bad proportions, deformed, blurry
- num_inference_steps
- 25
- source_subject_category
- dog
- target_subject_category
- dog
{ "width": 512, "height": 512, "prompt": "eating ramen", "guidance_scale": 7.5, "negative_prompt": "over-exposure, under-exposure, saturated, duplicate, out of frame, lowres, cropped, worst quality, low quality, jpeg artifacts, morbid, mutilated, ugly, bad anatomy, bad proportions, deformed, blurry", "reference_image": "https://replicate.delivery/pbxt/KNZcJhVZuWiMWYReUDO2J0Up9CrBN7NmubFg2ZHADbJ5tP9c/dog.png", "num_inference_steps": 25, "source_subject_category": "dog", "target_subject_category": "dog" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run cjwbw/blipdiffusion using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "cjwbw/blipdiffusion:501be8d57d86d63f9b9a06f8ea6d7a051ec7a7a7fc7b71d63764c8fb49a4fcfc", { input: { width: 512, height: 512, prompt: "eating ramen", guidance_scale: 7.5, negative_prompt: "over-exposure, under-exposure, saturated, duplicate, out of frame, lowres, cropped, worst quality, low quality, jpeg artifacts, morbid, mutilated, ugly, bad anatomy, bad proportions, deformed, blurry", reference_image: "https://replicate.delivery/pbxt/KNZcJhVZuWiMWYReUDO2J0Up9CrBN7NmubFg2ZHADbJ5tP9c/dog.png", num_inference_steps: 25, source_subject_category: "dog", target_subject_category: "dog" } } ); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run cjwbw/blipdiffusion using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "cjwbw/blipdiffusion:501be8d57d86d63f9b9a06f8ea6d7a051ec7a7a7fc7b71d63764c8fb49a4fcfc", input={ "width": 512, "height": 512, "prompt": "eating ramen", "guidance_scale": 7.5, "negative_prompt": "over-exposure, under-exposure, saturated, duplicate, out of frame, lowres, cropped, worst quality, low quality, jpeg artifacts, morbid, mutilated, ugly, bad anatomy, bad proportions, deformed, blurry", "reference_image": "https://replicate.delivery/pbxt/KNZcJhVZuWiMWYReUDO2J0Up9CrBN7NmubFg2ZHADbJ5tP9c/dog.png", "num_inference_steps": 25, "source_subject_category": "dog", "target_subject_category": "dog" } ) # To access the file URL: print(output.url()) #=> "http://example.com" # To write the file to disk: with open("my-image.png", "wb") as file: file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
Run cjwbw/blipdiffusion using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "cjwbw/blipdiffusion:501be8d57d86d63f9b9a06f8ea6d7a051ec7a7a7fc7b71d63764c8fb49a4fcfc", "input": { "width": 512, "height": 512, "prompt": "eating ramen", "guidance_scale": 7.5, "negative_prompt": "over-exposure, under-exposure, saturated, duplicate, out of frame, lowres, cropped, worst quality, low quality, jpeg artifacts, morbid, mutilated, ugly, bad anatomy, bad proportions, deformed, blurry", "reference_image": "https://replicate.delivery/pbxt/KNZcJhVZuWiMWYReUDO2J0Up9CrBN7NmubFg2ZHADbJ5tP9c/dog.png", "num_inference_steps": 25, "source_subject_category": "dog", "target_subject_category": "dog" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
You can run this model locally using Cog. First, install Cog:brew install cog
If you don’t have Homebrew, there are other installation options available.
Run this to download the model and run it in your local environment:
cog predict r8.im/chenxwh/blipdiffusion@sha256:501be8d57d86d63f9b9a06f8ea6d7a051ec7a7a7fc7b71d63764c8fb49a4fcfc \ -i 'width=512' \ -i 'height=512' \ -i 'prompt="eating ramen"' \ -i 'guidance_scale=7.5' \ -i 'negative_prompt="over-exposure, under-exposure, saturated, duplicate, out of frame, lowres, cropped, worst quality, low quality, jpeg artifacts, morbid, mutilated, ugly, bad anatomy, bad proportions, deformed, blurry"' \ -i 'reference_image="https://replicate.delivery/pbxt/KNZcJhVZuWiMWYReUDO2J0Up9CrBN7NmubFg2ZHADbJ5tP9c/dog.png"' \ -i 'num_inference_steps=25' \ -i 'source_subject_category="dog"' \ -i 'target_subject_category="dog"'
To learn more, take a look at the Cog documentation.
Run this to download the model and run it in your local environment:
docker run -d -p 5000:5000 --gpus=all r8.im/chenxwh/blipdiffusion@sha256:501be8d57d86d63f9b9a06f8ea6d7a051ec7a7a7fc7b71d63764c8fb49a4fcfc
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "width": 512, "height": 512, "prompt": "eating ramen", "guidance_scale": 7.5, "negative_prompt": "over-exposure, under-exposure, saturated, duplicate, out of frame, lowres, cropped, worst quality, low quality, jpeg artifacts, morbid, mutilated, ugly, bad anatomy, bad proportions, deformed, blurry", "reference_image": "https://replicate.delivery/pbxt/KNZcJhVZuWiMWYReUDO2J0Up9CrBN7NmubFg2ZHADbJ5tP9c/dog.png", "num_inference_steps": 25, "source_subject_category": "dog", "target_subject_category": "dog" } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Output
{ "completed_at": "2024-02-10T12:25:53.859686Z", "created_at": "2024-02-10T12:25:51.234224Z", "data_removed": false, "error": null, "id": "ob7mjq3bkttx5vdh5pkn6rhnwe", "input": { "width": 512, "height": 512, "prompt": "eating ramen", "guidance_scale": 7.5, "negative_prompt": "over-exposure, under-exposure, saturated, duplicate, out of frame, lowres, cropped, worst quality, low quality, jpeg artifacts, morbid, mutilated, ugly, bad anatomy, bad proportions, deformed, blurry", "reference_image": "https://replicate.delivery/pbxt/KNZcJhVZuWiMWYReUDO2J0Up9CrBN7NmubFg2ZHADbJ5tP9c/dog.png", "num_inference_steps": 25, "source_subject_category": "dog", "target_subject_category": "dog" }, "logs": "0%| | 0/26 [00:00<?, ?it/s]\n 12%|█▏ | 3/26 [00:00<00:00, 28.17it/s]\n 23%|██▎ | 6/26 [00:00<00:00, 26.12it/s]\n 35%|███▍ | 9/26 [00:00<00:00, 25.49it/s]\n 46%|████▌ | 12/26 [00:00<00:00, 25.14it/s]\n 58%|█████▊ | 15/26 [00:00<00:00, 24.95it/s]\n 69%|██████▉ | 18/26 [00:00<00:00, 24.98it/s]\n 81%|████████ | 21/26 [00:00<00:00, 24.84it/s]\n 92%|█████████▏| 24/26 [00:00<00:00, 24.78it/s]\n100%|██████████| 26/26 [00:01<00:00, 25.06it/s]", "metrics": { "predict_time": 2.583945, "total_time": 2.625462 }, "output": "https://replicate.delivery/pbxt/pb1ZdSd7RJ5LAxfcdC5hKuOxK36MOo1DEtOJfTp3eMRhqjqkA/out.png", "started_at": "2024-02-10T12:25:51.275741Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/ob7mjq3bkttx5vdh5pkn6rhnwe", "cancel": "https://api.replicate.com/v1/predictions/ob7mjq3bkttx5vdh5pkn6rhnwe/cancel" }, "version": "501be8d57d86d63f9b9a06f8ea6d7a051ec7a7a7fc7b71d63764c8fb49a4fcfc" }
Generated in0%| | 0/26 [00:00<?, ?it/s] 12%|█▏ | 3/26 [00:00<00:00, 28.17it/s] 23%|██▎ | 6/26 [00:00<00:00, 26.12it/s] 35%|███▍ | 9/26 [00:00<00:00, 25.49it/s] 46%|████▌ | 12/26 [00:00<00:00, 25.14it/s] 58%|█████▊ | 15/26 [00:00<00:00, 24.95it/s] 69%|██████▉ | 18/26 [00:00<00:00, 24.98it/s] 81%|████████ | 21/26 [00:00<00:00, 24.84it/s] 92%|█████████▏| 24/26 [00:00<00:00, 24.78it/s] 100%|██████████| 26/26 [00:01<00:00, 25.06it/s]
Prediction
cjwbw/blipdiffusion:81a70441392af1288983861c01b09317acfc5eb5ba1343e86a2578487b26620fID3daa7ydbsyu7averijiuedlpqqStatusSucceededSourceWebHardwareA40 (Large)Total durationCreatedInput
- prompt
- swimming underwater
- guidance_scale
- 7.5
- negative_prompt
- over-exposure, under-exposure, saturated, duplicate, out of frame, lowres, cropped, worst quality, low quality, jpeg artifacts, morbid, mutilated, ugly, bad anatomy, bad proportions, deformed, blurry
- num_inference_steps
- 50
- source_subject_category
- dog
- target_subject_category
- dog
{ "prompt": "swimming underwater", "guidance_scale": 7.5, "negative_prompt": "over-exposure, under-exposure, saturated, duplicate, out of frame, lowres, cropped, worst quality, low quality, jpeg artifacts, morbid, mutilated, ugly, bad anatomy, bad proportions, deformed, blurry", "reference_image": "https://replicate.delivery/pbxt/KNZcJhVZuWiMWYReUDO2J0Up9CrBN7NmubFg2ZHADbJ5tP9c/dog.png", "num_inference_steps": 50, "source_subject_category": "dog", "target_subject_category": "dog" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run cjwbw/blipdiffusion using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "cjwbw/blipdiffusion:81a70441392af1288983861c01b09317acfc5eb5ba1343e86a2578487b26620f", { input: { prompt: "swimming underwater", guidance_scale: 7.5, negative_prompt: "over-exposure, under-exposure, saturated, duplicate, out of frame, lowres, cropped, worst quality, low quality, jpeg artifacts, morbid, mutilated, ugly, bad anatomy, bad proportions, deformed, blurry", reference_image: "https://replicate.delivery/pbxt/KNZcJhVZuWiMWYReUDO2J0Up9CrBN7NmubFg2ZHADbJ5tP9c/dog.png", num_inference_steps: 50, source_subject_category: "dog", target_subject_category: "dog" } } ); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run cjwbw/blipdiffusion using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "cjwbw/blipdiffusion:81a70441392af1288983861c01b09317acfc5eb5ba1343e86a2578487b26620f", input={ "prompt": "swimming underwater", "guidance_scale": 7.5, "negative_prompt": "over-exposure, under-exposure, saturated, duplicate, out of frame, lowres, cropped, worst quality, low quality, jpeg artifacts, morbid, mutilated, ugly, bad anatomy, bad proportions, deformed, blurry", "reference_image": "https://replicate.delivery/pbxt/KNZcJhVZuWiMWYReUDO2J0Up9CrBN7NmubFg2ZHADbJ5tP9c/dog.png", "num_inference_steps": 50, "source_subject_category": "dog", "target_subject_category": "dog" } ) # To access the file URL: print(output.url()) #=> "http://example.com" # To write the file to disk: with open("my-image.png", "wb") as file: file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
Run cjwbw/blipdiffusion using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "cjwbw/blipdiffusion:81a70441392af1288983861c01b09317acfc5eb5ba1343e86a2578487b26620f", "input": { "prompt": "swimming underwater", "guidance_scale": 7.5, "negative_prompt": "over-exposure, under-exposure, saturated, duplicate, out of frame, lowres, cropped, worst quality, low quality, jpeg artifacts, morbid, mutilated, ugly, bad anatomy, bad proportions, deformed, blurry", "reference_image": "https://replicate.delivery/pbxt/KNZcJhVZuWiMWYReUDO2J0Up9CrBN7NmubFg2ZHADbJ5tP9c/dog.png", "num_inference_steps": 50, "source_subject_category": "dog", "target_subject_category": "dog" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
You can run this model locally using Cog. First, install Cog:brew install cog
If you don’t have Homebrew, there are other installation options available.
Run this to download the model and run it in your local environment:
cog predict r8.im/chenxwh/blipdiffusion@sha256:81a70441392af1288983861c01b09317acfc5eb5ba1343e86a2578487b26620f \ -i 'prompt="swimming underwater"' \ -i 'guidance_scale=7.5' \ -i 'negative_prompt="over-exposure, under-exposure, saturated, duplicate, out of frame, lowres, cropped, worst quality, low quality, jpeg artifacts, morbid, mutilated, ugly, bad anatomy, bad proportions, deformed, blurry"' \ -i 'reference_image="https://replicate.delivery/pbxt/KNZcJhVZuWiMWYReUDO2J0Up9CrBN7NmubFg2ZHADbJ5tP9c/dog.png"' \ -i 'num_inference_steps=50' \ -i 'source_subject_category="dog"' \ -i 'target_subject_category="dog"'
To learn more, take a look at the Cog documentation.
Run this to download the model and run it in your local environment:
docker run -d -p 5000:5000 --gpus=all r8.im/chenxwh/blipdiffusion@sha256:81a70441392af1288983861c01b09317acfc5eb5ba1343e86a2578487b26620f
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "prompt": "swimming underwater", "guidance_scale": 7.5, "negative_prompt": "over-exposure, under-exposure, saturated, duplicate, out of frame, lowres, cropped, worst quality, low quality, jpeg artifacts, morbid, mutilated, ugly, bad anatomy, bad proportions, deformed, blurry", "reference_image": "https://replicate.delivery/pbxt/KNZcJhVZuWiMWYReUDO2J0Up9CrBN7NmubFg2ZHADbJ5tP9c/dog.png", "num_inference_steps": 50, "source_subject_category": "dog", "target_subject_category": "dog" } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Output
{ "completed_at": "2024-02-10T15:17:47.934133Z", "created_at": "2024-02-10T15:16:28.691482Z", "data_removed": false, "error": null, "id": "3daa7ydbsyu7averijiuedlpqq", "input": { "prompt": "swimming underwater", "guidance_scale": 7.5, "negative_prompt": "over-exposure, under-exposure, saturated, duplicate, out of frame, lowres, cropped, worst quality, low quality, jpeg artifacts, morbid, mutilated, ugly, bad anatomy, bad proportions, deformed, blurry", "reference_image": "https://replicate.delivery/pbxt/KNZcJhVZuWiMWYReUDO2J0Up9CrBN7NmubFg2ZHADbJ5tP9c/dog.png", "num_inference_steps": 50, "source_subject_category": "dog", "target_subject_category": "dog" }, "logs": "Using seed: 49496\n 0%| | 0/51 [00:00<?, ?it/s]\n 2%|▏ | 1/51 [00:00<00:06, 7.87it/s]\n 8%|▊ | 4/51 [00:00<00:02, 19.08it/s]\n 14%|█▎ | 7/51 [00:00<00:02, 21.93it/s]\n 20%|█▉ | 10/51 [00:00<00:01, 23.13it/s]\n 25%|██▌ | 13/51 [00:00<00:01, 23.93it/s]\n 31%|███▏ | 16/51 [00:00<00:01, 24.24it/s]\n 37%|███▋ | 19/51 [00:00<00:01, 24.38it/s]\n 43%|████▎ | 22/51 [00:00<00:01, 24.68it/s]\n 49%|████▉ | 25/51 [00:01<00:01, 24.74it/s]\n 55%|█████▍ | 28/51 [00:01<00:00, 24.76it/s]\n 61%|██████ | 31/51 [00:01<00:00, 24.79it/s]\n 67%|██████▋ | 34/51 [00:01<00:00, 24.87it/s]\n 73%|███████▎ | 37/51 [00:01<00:00, 24.92it/s]\n 78%|███████▊ | 40/51 [00:01<00:00, 24.96it/s]\n 84%|████████▍ | 43/51 [00:01<00:00, 24.89it/s]\n 90%|█████████ | 46/51 [00:01<00:00, 24.98it/s]\n 96%|█████████▌| 49/51 [00:02<00:00, 24.98it/s]\n100%|██████████| 51/51 [00:02<00:00, 24.12it/s]", "metrics": { "predict_time": 3.877075, "total_time": 79.242651 }, "output": "https://replicate.delivery/pbxt/veCAqO2Ne3jEYUdfBwATq5G2J4dbpwyq0TF0kYLaC6g0soqkA/out.png", "started_at": "2024-02-10T15:17:44.057058Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/3daa7ydbsyu7averijiuedlpqq", "cancel": "https://api.replicate.com/v1/predictions/3daa7ydbsyu7averijiuedlpqq/cancel" }, "version": "81a70441392af1288983861c01b09317acfc5eb5ba1343e86a2578487b26620f" }
Generated inUsing seed: 49496 0%| | 0/51 [00:00<?, ?it/s] 2%|▏ | 1/51 [00:00<00:06, 7.87it/s] 8%|▊ | 4/51 [00:00<00:02, 19.08it/s] 14%|█▎ | 7/51 [00:00<00:02, 21.93it/s] 20%|█▉ | 10/51 [00:00<00:01, 23.13it/s] 25%|██▌ | 13/51 [00:00<00:01, 23.93it/s] 31%|███▏ | 16/51 [00:00<00:01, 24.24it/s] 37%|███▋ | 19/51 [00:00<00:01, 24.38it/s] 43%|████▎ | 22/51 [00:00<00:01, 24.68it/s] 49%|████▉ | 25/51 [00:01<00:01, 24.74it/s] 55%|█████▍ | 28/51 [00:01<00:00, 24.76it/s] 61%|██████ | 31/51 [00:01<00:00, 24.79it/s] 67%|██████▋ | 34/51 [00:01<00:00, 24.87it/s] 73%|███████▎ | 37/51 [00:01<00:00, 24.92it/s] 78%|███████▊ | 40/51 [00:01<00:00, 24.96it/s] 84%|████████▍ | 43/51 [00:01<00:00, 24.89it/s] 90%|█████████ | 46/51 [00:01<00:00, 24.98it/s] 96%|█████████▌| 49/51 [00:02<00:00, 24.98it/s] 100%|██████████| 51/51 [00:02<00:00, 24.12it/s]
Prediction
cjwbw/blipdiffusion:501be8d57d86d63f9b9a06f8ea6d7a051ec7a7a7fc7b71d63764c8fb49a4fcfcIDkyvlgylb5jbdi3khmmjotened4StatusSucceededSourceWebHardwareA40 (Large)Total durationCreatedInput
- width
- 512
- height
- 512
- prompt
- painting by Van Gogh
- guidance_scale
- 7.5
- negative_prompt
- over-exposure, under-exposure, saturated, duplicate, out of frame, lowres, cropped, worst quality, low quality, jpeg artifacts, morbid, mutilated, ugly, bad anatomy, bad proportions, deformed, blurry
- num_inference_steps
- 25
- source_subject_category
- dog
- target_subject_category
- dog
{ "width": 512, "height": 512, "prompt": "painting by Van Gogh", "guidance_scale": 7.5, "negative_prompt": "over-exposure, under-exposure, saturated, duplicate, out of frame, lowres, cropped, worst quality, low quality, jpeg artifacts, morbid, mutilated, ugly, bad anatomy, bad proportions, deformed, blurry", "reference_image": "https://replicate.delivery/pbxt/KNZcJhVZuWiMWYReUDO2J0Up9CrBN7NmubFg2ZHADbJ5tP9c/dog.png", "num_inference_steps": 25, "source_subject_category": "dog", "target_subject_category": "dog" }
Install Replicate’s Node.js client library:npm install replicate
Import and set up the client:import Replicate from "replicate"; import fs from "node:fs"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run cjwbw/blipdiffusion using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "cjwbw/blipdiffusion:501be8d57d86d63f9b9a06f8ea6d7a051ec7a7a7fc7b71d63764c8fb49a4fcfc", { input: { width: 512, height: 512, prompt: "painting by Van Gogh", guidance_scale: 7.5, negative_prompt: "over-exposure, under-exposure, saturated, duplicate, out of frame, lowres, cropped, worst quality, low quality, jpeg artifacts, morbid, mutilated, ugly, bad anatomy, bad proportions, deformed, blurry", reference_image: "https://replicate.delivery/pbxt/KNZcJhVZuWiMWYReUDO2J0Up9CrBN7NmubFg2ZHADbJ5tP9c/dog.png", num_inference_steps: 25, source_subject_category: "dog", target_subject_category: "dog" } } ); // To access the file URL: console.log(output.url()); //=> "http://example.com" // To write the file to disk: fs.writeFile("my-image.png", output);
To learn more, take a look at the guide on getting started with Node.js.
Install Replicate’s Python client library:pip install replicate
Import the client:import replicate
Run cjwbw/blipdiffusion using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "cjwbw/blipdiffusion:501be8d57d86d63f9b9a06f8ea6d7a051ec7a7a7fc7b71d63764c8fb49a4fcfc", input={ "width": 512, "height": 512, "prompt": "painting by Van Gogh", "guidance_scale": 7.5, "negative_prompt": "over-exposure, under-exposure, saturated, duplicate, out of frame, lowres, cropped, worst quality, low quality, jpeg artifacts, morbid, mutilated, ugly, bad anatomy, bad proportions, deformed, blurry", "reference_image": "https://replicate.delivery/pbxt/KNZcJhVZuWiMWYReUDO2J0Up9CrBN7NmubFg2ZHADbJ5tP9c/dog.png", "num_inference_steps": 25, "source_subject_category": "dog", "target_subject_category": "dog" } ) # To access the file URL: print(output.url()) #=> "http://example.com" # To write the file to disk: with open("my-image.png", "wb") as file: file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
Run cjwbw/blipdiffusion using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \ -H "Authorization: Bearer $REPLICATE_API_TOKEN" \ -H "Content-Type: application/json" \ -H "Prefer: wait" \ -d $'{ "version": "cjwbw/blipdiffusion:501be8d57d86d63f9b9a06f8ea6d7a051ec7a7a7fc7b71d63764c8fb49a4fcfc", "input": { "width": 512, "height": 512, "prompt": "painting by Van Gogh", "guidance_scale": 7.5, "negative_prompt": "over-exposure, under-exposure, saturated, duplicate, out of frame, lowres, cropped, worst quality, low quality, jpeg artifacts, morbid, mutilated, ugly, bad anatomy, bad proportions, deformed, blurry", "reference_image": "https://replicate.delivery/pbxt/KNZcJhVZuWiMWYReUDO2J0Up9CrBN7NmubFg2ZHADbJ5tP9c/dog.png", "num_inference_steps": 25, "source_subject_category": "dog", "target_subject_category": "dog" } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
You can run this model locally using Cog. First, install Cog:brew install cog
If you don’t have Homebrew, there are other installation options available.
Run this to download the model and run it in your local environment:
cog predict r8.im/chenxwh/blipdiffusion@sha256:501be8d57d86d63f9b9a06f8ea6d7a051ec7a7a7fc7b71d63764c8fb49a4fcfc \ -i 'width=512' \ -i 'height=512' \ -i 'prompt="painting by Van Gogh"' \ -i 'guidance_scale=7.5' \ -i 'negative_prompt="over-exposure, under-exposure, saturated, duplicate, out of frame, lowres, cropped, worst quality, low quality, jpeg artifacts, morbid, mutilated, ugly, bad anatomy, bad proportions, deformed, blurry"' \ -i 'reference_image="https://replicate.delivery/pbxt/KNZcJhVZuWiMWYReUDO2J0Up9CrBN7NmubFg2ZHADbJ5tP9c/dog.png"' \ -i 'num_inference_steps=25' \ -i 'source_subject_category="dog"' \ -i 'target_subject_category="dog"'
To learn more, take a look at the Cog documentation.
Run this to download the model and run it in your local environment:
docker run -d -p 5000:5000 --gpus=all r8.im/chenxwh/blipdiffusion@sha256:501be8d57d86d63f9b9a06f8ea6d7a051ec7a7a7fc7b71d63764c8fb49a4fcfc
curl -s -X POST \ -H "Content-Type: application/json" \ -d $'{ "input": { "width": 512, "height": 512, "prompt": "painting by Van Gogh", "guidance_scale": 7.5, "negative_prompt": "over-exposure, under-exposure, saturated, duplicate, out of frame, lowres, cropped, worst quality, low quality, jpeg artifacts, morbid, mutilated, ugly, bad anatomy, bad proportions, deformed, blurry", "reference_image": "https://replicate.delivery/pbxt/KNZcJhVZuWiMWYReUDO2J0Up9CrBN7NmubFg2ZHADbJ5tP9c/dog.png", "num_inference_steps": 25, "source_subject_category": "dog", "target_subject_category": "dog" } }' \ http://localhost:5000/predictions
To learn more, take a look at the Cog documentation.
Output
{ "completed_at": "2024-02-10T15:23:20.053543Z", "created_at": "2024-02-10T15:21:41.394309Z", "data_removed": false, "error": null, "id": "kyvlgylb5jbdi3khmmjotened4", "input": { "width": 512, "height": 512, "prompt": "painting by Van Gogh", "guidance_scale": 7.5, "negative_prompt": "over-exposure, under-exposure, saturated, duplicate, out of frame, lowres, cropped, worst quality, low quality, jpeg artifacts, morbid, mutilated, ugly, bad anatomy, bad proportions, deformed, blurry", "reference_image": "https://replicate.delivery/pbxt/KNZcJhVZuWiMWYReUDO2J0Up9CrBN7NmubFg2ZHADbJ5tP9c/dog.png", "num_inference_steps": 25, "source_subject_category": "dog", "target_subject_category": "dog" }, "logs": "0%| | 0/26 [00:00<?, ?it/s]\n 4%|▍ | 1/26 [00:00<00:03, 7.75it/s]\n 15%|█▌ | 4/26 [00:00<00:01, 18.80it/s]\n 27%|██▋ | 7/26 [00:00<00:00, 21.42it/s]\n 38%|███▊ | 10/26 [00:00<00:00, 22.74it/s]\n 50%|█████ | 13/26 [00:00<00:00, 23.47it/s]\n 62%|██████▏ | 16/26 [00:00<00:00, 23.89it/s]\n 73%|███████▎ | 19/26 [00:00<00:00, 24.06it/s]\n 85%|████████▍ | 22/26 [00:00<00:00, 24.28it/s]\n 96%|█████████▌| 25/26 [00:01<00:00, 24.07it/s]\n100%|██████████| 26/26 [00:01<00:00, 22.92it/s]", "metrics": { "predict_time": 3.29707, "total_time": 98.659234 }, "output": "https://replicate.delivery/pbxt/0j242fPjvEWkHq5KMJGvLKNJECOf7sOAUHlWUrgW8V0mbUVSA/out.png", "started_at": "2024-02-10T15:23:16.756473Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/kyvlgylb5jbdi3khmmjotened4", "cancel": "https://api.replicate.com/v1/predictions/kyvlgylb5jbdi3khmmjotened4/cancel" }, "version": "501be8d57d86d63f9b9a06f8ea6d7a051ec7a7a7fc7b71d63764c8fb49a4fcfc" }
Generated in0%| | 0/26 [00:00<?, ?it/s] 4%|▍ | 1/26 [00:00<00:03, 7.75it/s] 15%|█▌ | 4/26 [00:00<00:01, 18.80it/s] 27%|██▋ | 7/26 [00:00<00:00, 21.42it/s] 38%|███▊ | 10/26 [00:00<00:00, 22.74it/s] 50%|█████ | 13/26 [00:00<00:00, 23.47it/s] 62%|██████▏ | 16/26 [00:00<00:00, 23.89it/s] 73%|███████▎ | 19/26 [00:00<00:00, 24.06it/s] 85%|████████▍ | 22/26 [00:00<00:00, 24.28it/s] 96%|█████████▌| 25/26 [00:01<00:00, 24.07it/s] 100%|██████████| 26/26 [00:01<00:00, 22.92it/s]
Want to make some of these yourself?
Run this model