zsxkib
/
ic-light-background
πΌοΈβ¨Background images + prompts to auto-magically relights your images (+normal mapsπΊοΈ)
Prediction
zsxkib/ic-light-background:60015df7IDdy04rgfxahrgm0cfkfervg061mStatusSucceededSourceWebHardwareA40 (Large)Total durationCreatedInput
- cfg
- 2
- steps
- 25
- width
- 512
- height
- 832
- prompt
- Woman, detailed face, sci-fi RGB glowing, cyberpunk
- light_source
- Use Background Image
- highres_scale
- 1.5
- output_format
- webp
- compute_normal
- output_quality
- 80
- appended_prompt
- best quality
- highres_denoise
- 0.5
- negative_prompt
- lowres, bad anatomy, bad hands, cropped, worst quality
- number_of_images
- 1
{ "cfg": 2, "steps": 25, "width": 512, "height": 832, "prompt": "Woman, detailed face, sci-fi RGB glowing, cyberpunk", "light_source": "Use Background Image", "highres_scale": 1.5, "output_format": "webp", "subject_image": "https://replicate.delivery/pbxt/KtCKrs9sxPF3HciwoWL0TTVM9Nde7ySDWpO9S2flTiyi9Pp3/i3.png", "compute_normal": false, "output_quality": 80, "appended_prompt": "best quality", "highres_denoise": 0.5, "negative_prompt": "lowres, bad anatomy, bad hands, cropped, worst quality", "background_image": "https://replicate.delivery/pbxt/KxPIbJUjSmVBlvn0M3C8PAz6brN5Z0eyZSGcKIVw3XfJ6vNV/7.webp", "number_of_images": 1 }
Install Replicateβs Node.js client library:npm install replicate
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import and set up the client:import Replicate from "replicate"; const replicate = new Replicate({ auth: process.env.REPLICATE_API_TOKEN, });
Run zsxkib/ic-light-background using Replicateβs API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run( "zsxkib/ic-light-background:60015df78a8a795470da6494822982140d57b150b9ef14354e79302ff89f69e3", { input: { cfg: 2, steps: 25, width: 512, height: 832, prompt: "Woman, detailed face, sci-fi RGB glowing, cyberpunk", light_source: "Use Background Image", highres_scale: 1.5, output_format: "webp", subject_image: "https://replicate.delivery/pbxt/KtCKrs9sxPF3HciwoWL0TTVM9Nde7ySDWpO9S2flTiyi9Pp3/i3.png", compute_normal: false, output_quality: 80, appended_prompt: "best quality", highres_denoise: 0.5, negative_prompt: "lowres, bad anatomy, bad hands, cropped, worst quality", background_image: "https://replicate.delivery/pbxt/KxPIbJUjSmVBlvn0M3C8PAz6brN5Z0eyZSGcKIVw3XfJ6vNV/7.webp", number_of_images: 1 } } ); console.log(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
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Import the client:import replicate
Run zsxkib/ic-light-background using Replicateβs API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run( "zsxkib/ic-light-background:60015df78a8a795470da6494822982140d57b150b9ef14354e79302ff89f69e3", input={ "cfg": 2, "steps": 25, "width": 512, "height": 832, "prompt": "Woman, detailed face, sci-fi RGB glowing, cyberpunk", "light_source": "Use Background Image", "highres_scale": 1.5, "output_format": "webp", "subject_image": "https://replicate.delivery/pbxt/KtCKrs9sxPF3HciwoWL0TTVM9Nde7ySDWpO9S2flTiyi9Pp3/i3.png", "compute_normal": False, "output_quality": 80, "appended_prompt": "best quality", "highres_denoise": 0.5, "negative_prompt": "lowres, bad anatomy, bad hands, cropped, worst quality", "background_image": "https://replicate.delivery/pbxt/KxPIbJUjSmVBlvn0M3C8PAz6brN5Z0eyZSGcKIVw3XfJ6vNV/7.webp", "number_of_images": 1 } ) print(output)
To learn more, take a look at the guide on getting started with Python.
Set theREPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
Run zsxkib/ic-light-background 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": "60015df78a8a795470da6494822982140d57b150b9ef14354e79302ff89f69e3", "input": { "cfg": 2, "steps": 25, "width": 512, "height": 832, "prompt": "Woman, detailed face, sci-fi RGB glowing, cyberpunk", "light_source": "Use Background Image", "highres_scale": 1.5, "output_format": "webp", "subject_image": "https://replicate.delivery/pbxt/KtCKrs9sxPF3HciwoWL0TTVM9Nde7ySDWpO9S2flTiyi9Pp3/i3.png", "compute_normal": false, "output_quality": 80, "appended_prompt": "best quality", "highres_denoise": 0.5, "negative_prompt": "lowres, bad anatomy, bad hands, cropped, worst quality", "background_image": "https://replicate.delivery/pbxt/KxPIbJUjSmVBlvn0M3C8PAz6brN5Z0eyZSGcKIVw3XfJ6vNV/7.webp", "number_of_images": 1 } }' \ https://api.replicate.com/v1/predictions
To learn more, take a look at Replicateβs HTTP API reference docs.
Output
{ "completed_at": "2024-05-21T16:00:18.200867Z", "created_at": "2024-05-21T15:56:07.892000Z", "data_removed": false, "error": null, "id": "dy04rgfxahrgm0cfkfervg061m", "input": { "cfg": 2, "steps": 25, "width": 512, "height": 832, "prompt": "Woman, detailed face, sci-fi RGB glowing, cyberpunk", "light_source": "Use Background Image", "highres_scale": 1.5, "output_format": "webp", "subject_image": "https://replicate.delivery/pbxt/KtCKrs9sxPF3HciwoWL0TTVM9Nde7ySDWpO9S2flTiyi9Pp3/i3.png", "compute_normal": false, "output_quality": 80, "appended_prompt": "best quality", "highres_denoise": 0.5, "negative_prompt": "lowres, bad anatomy, bad hands, cropped, worst quality", "background_image": "https://replicate.delivery/pbxt/KxPIbJUjSmVBlvn0M3C8PAz6brN5Z0eyZSGcKIVw3XfJ6vNV/7.webp", "number_of_images": 1 }, "logs": "Using seed: 62600\n[!] (<class 'cog.types.Path'>) input_fg=/tmp/tmpcq1zmhq8i3.png\n[!] (<class 'cog.types.Path'>) input_bg=/tmp/tmphw3rq_ql7.webp\n[!] (<class 'str'>) prompt=Woman, detailed face, sci-fi RGB glowing, cyberpunk\n[!] (<class 'int'>) image_width=512\n[!] (<class 'int'>) image_height=832\n[!] (<class 'int'>) num_samples=1\n[!] (<class 'int'>) seed=62600\n[!] (<class 'int'>) steps=25\n[!] (<class 'str'>) a_prompt=best quality\n[!] (<class 'str'>) n_prompt=lowres, bad anatomy, bad hands, cropped, worst quality\n[!] (<class 'float'>) cfg=2.0\n[!] (<class 'float'>) highres_scale=1.5\n[!] (<class 'float'>) highres_denoise=0.5\n[!] (<class 'str'>) bg_source=Use Background Image\n/root/.pyenv/versions/3.10.14/lib/python3.10/site-packages/torch/nn/modules/conv.py:456: UserWarning: Plan failed with a cudnnException: CUDNN_BACKEND_EXECUTION_PLAN_DESCRIPTOR: cudnnFinalize Descriptor Failed cudnn_status: CUDNN_STATUS_NOT_SUPPORTED (Triggered internally at ../aten/src/ATen/native/cudnn/Conv_v8.cpp:919.)\nreturn F.conv2d(input, weight, bias, self.stride,\n 0%| | 0/25 [00:00<?, ?it/s]\n 4%|β | 1/25 [00:00<00:03, 6.67it/s]\n 16%|ββ | 4/25 [00:00<00:01, 16.07it/s]\n 24%|βββ | 6/25 [00:00<00:01, 16.74it/s]\n 32%|ββββ | 8/25 [00:00<00:00, 17.09it/s]\n 40%|ββββ | 10/25 [00:00<00:00, 17.29it/s]\n 48%|βββββ | 12/25 [00:00<00:00, 17.40it/s]\n 56%|ββββββ | 14/25 [00:00<00:00, 17.46it/s]\n 64%|βββββββ | 16/25 [00:00<00:00, 17.52it/s]\n 72%|ββββββββ | 18/25 [00:01<00:00, 17.56it/s]\n 80%|ββββββββ | 20/25 [00:01<00:00, 17.55it/s]\n 88%|βββββββββ | 22/25 [00:01<00:00, 17.54it/s]\n 96%|ββββββββββ| 24/25 [00:01<00:00, 17.57it/s]\n100%|ββββββββββ| 25/25 [00:01<00:00, 17.04it/s]\n 0%| | 0/25 [00:00<?, ?it/s]\n 4%|β | 1/25 [00:00<00:04, 5.71it/s]\n 12%|ββ | 3/25 [00:00<00:02, 9.01it/s]\n 16%|ββ | 4/25 [00:00<00:02, 8.16it/s]\n 20%|ββ | 5/25 [00:00<00:02, 7.71it/s]\n 24%|βββ | 6/25 [00:00<00:02, 7.44it/s]\n 28%|βββ | 7/25 [00:00<00:02, 7.26it/s]\n 32%|ββββ | 8/25 [00:01<00:02, 7.16it/s]\n 36%|ββββ | 9/25 [00:01<00:02, 7.08it/s]\n 40%|ββββ | 10/25 [00:01<00:02, 7.03it/s]\n 44%|βββββ | 11/25 [00:01<00:02, 7.00it/s]\n 48%|βββββ | 12/25 [00:01<00:01, 6.98it/s]\n 52%|ββββββ | 13/25 [00:01<00:01, 6.96it/s]\n 56%|ββββββ | 14/25 [00:01<00:01, 6.95it/s]\n 60%|ββββββ | 15/25 [00:02<00:01, 6.93it/s]\n 64%|βββββββ | 16/25 [00:02<00:01, 6.92it/s]\n 68%|βββββββ | 17/25 [00:02<00:01, 6.92it/s]\n 72%|ββββββββ | 18/25 [00:02<00:01, 6.92it/s]\n 76%|ββββββββ | 19/25 [00:02<00:00, 6.91it/s]\n 80%|ββββββββ | 20/25 [00:02<00:00, 6.91it/s]\n 84%|βββββββββ | 21/25 [00:02<00:00, 6.91it/s]\n 88%|βββββββββ | 22/25 [00:03<00:00, 6.91it/s]\n 92%|ββββββββββ| 23/25 [00:03<00:00, 6.91it/s]\n 96%|ββββββββββ| 24/25 [00:03<00:00, 6.90it/s]\n100%|ββββββββββ| 25/25 [00:03<00:00, 6.90it/s]\n100%|ββββββββββ| 25/25 [00:03<00:00, 7.07it/s]\n[~] Saving to output_images/generated_0.webp...\n[~] Output format: WEBP\n[~] Output quality: 80", "metrics": { "predict_time": 8.91385, "total_time": 250.308867 }, "output": [ "https://replicate.delivery/pbxt/0Rvqxkyk7z6uAtrjVIElxQVV5Ke1cdAwIru4h6OU04nIuTbJA/generated_0.webp" ], "started_at": "2024-05-21T16:00:09.287017Z", "status": "succeeded", "urls": { "get": "https://api.replicate.com/v1/predictions/dy04rgfxahrgm0cfkfervg061m", "cancel": "https://api.replicate.com/v1/predictions/dy04rgfxahrgm0cfkfervg061m/cancel" }, "version": "60015df78a8a795470da6494822982140d57b150b9ef14354e79302ff89f69e3" }
Generated inUsing seed: 62600 [!] (<class 'cog.types.Path'>) input_fg=/tmp/tmpcq1zmhq8i3.png [!] (<class 'cog.types.Path'>) input_bg=/tmp/tmphw3rq_ql7.webp [!] (<class 'str'>) prompt=Woman, detailed face, sci-fi RGB glowing, cyberpunk [!] (<class 'int'>) image_width=512 [!] (<class 'int'>) image_height=832 [!] (<class 'int'>) num_samples=1 [!] (<class 'int'>) seed=62600 [!] (<class 'int'>) steps=25 [!] (<class 'str'>) a_prompt=best quality [!] (<class 'str'>) n_prompt=lowres, bad anatomy, bad hands, cropped, worst quality [!] (<class 'float'>) cfg=2.0 [!] (<class 'float'>) highres_scale=1.5 [!] (<class 'float'>) highres_denoise=0.5 [!] (<class 'str'>) bg_source=Use Background Image /root/.pyenv/versions/3.10.14/lib/python3.10/site-packages/torch/nn/modules/conv.py:456: UserWarning: Plan failed with a cudnnException: CUDNN_BACKEND_EXECUTION_PLAN_DESCRIPTOR: cudnnFinalize Descriptor Failed cudnn_status: CUDNN_STATUS_NOT_SUPPORTED (Triggered internally at ../aten/src/ATen/native/cudnn/Conv_v8.cpp:919.) return F.conv2d(input, weight, bias, self.stride, 0%| | 0/25 [00:00<?, ?it/s] 4%|β | 1/25 [00:00<00:03, 6.67it/s] 16%|ββ | 4/25 [00:00<00:01, 16.07it/s] 24%|βββ | 6/25 [00:00<00:01, 16.74it/s] 32%|ββββ | 8/25 [00:00<00:00, 17.09it/s] 40%|ββββ | 10/25 [00:00<00:00, 17.29it/s] 48%|βββββ | 12/25 [00:00<00:00, 17.40it/s] 56%|ββββββ | 14/25 [00:00<00:00, 17.46it/s] 64%|βββββββ | 16/25 [00:00<00:00, 17.52it/s] 72%|ββββββββ | 18/25 [00:01<00:00, 17.56it/s] 80%|ββββββββ | 20/25 [00:01<00:00, 17.55it/s] 88%|βββββββββ | 22/25 [00:01<00:00, 17.54it/s] 96%|ββββββββββ| 24/25 [00:01<00:00, 17.57it/s] 100%|ββββββββββ| 25/25 [00:01<00:00, 17.04it/s] 0%| | 0/25 [00:00<?, ?it/s] 4%|β | 1/25 [00:00<00:04, 5.71it/s] 12%|ββ | 3/25 [00:00<00:02, 9.01it/s] 16%|ββ | 4/25 [00:00<00:02, 8.16it/s] 20%|ββ | 5/25 [00:00<00:02, 7.71it/s] 24%|βββ | 6/25 [00:00<00:02, 7.44it/s] 28%|βββ | 7/25 [00:00<00:02, 7.26it/s] 32%|ββββ | 8/25 [00:01<00:02, 7.16it/s] 36%|ββββ | 9/25 [00:01<00:02, 7.08it/s] 40%|ββββ | 10/25 [00:01<00:02, 7.03it/s] 44%|βββββ | 11/25 [00:01<00:02, 7.00it/s] 48%|βββββ | 12/25 [00:01<00:01, 6.98it/s] 52%|ββββββ | 13/25 [00:01<00:01, 6.96it/s] 56%|ββββββ | 14/25 [00:01<00:01, 6.95it/s] 60%|ββββββ | 15/25 [00:02<00:01, 6.93it/s] 64%|βββββββ | 16/25 [00:02<00:01, 6.92it/s] 68%|βββββββ | 17/25 [00:02<00:01, 6.92it/s] 72%|ββββββββ | 18/25 [00:02<00:01, 6.92it/s] 76%|ββββββββ | 19/25 [00:02<00:00, 6.91it/s] 80%|ββββββββ | 20/25 [00:02<00:00, 6.91it/s] 84%|βββββββββ | 21/25 [00:02<00:00, 6.91it/s] 88%|βββββββββ | 22/25 [00:03<00:00, 6.91it/s] 92%|ββββββββββ| 23/25 [00:03<00:00, 6.91it/s] 96%|ββββββββββ| 24/25 [00:03<00:00, 6.90it/s] 100%|ββββββββββ| 25/25 [00:03<00:00, 6.90it/s] 100%|ββββββββββ| 25/25 [00:03<00:00, 7.07it/s] [~] Saving to output_images/generated_0.webp... [~] Output format: WEBP [~] Output quality: 80
Want to make some of these yourself?
Run this model