Comments (3)
Found this issue today.
There seem there two options. One resize the image before putting it replicate . Two create an alternative version of the repo and fix all the issues as the dev dont seem to be developing it anymore ( ノД`)シクシク…
from cog-sdxl.
My Current quck fix to this issue for a discord bot using replicate, is to use backblaze api to hold a resized image then use that for the imgurl.
May help out
- Backblaze api setup
https://blog.teclado.com/python-file-upload-backblaze-b2/
def BB_imageFix(self,img_url,width,height):
#Download discord image and resize
r=requests.get(img_url)
image = Image.open(io.BytesIO(r.content))
image=image.resize((width,height))
file_name=f"placeholder_{os.path.basename(img_url)}"
image.save(file_name)
#Upload to backblaze
local_file = Path(file_name).resolve()
metadata = {"key": "value"}
uploaded_file = self.BB_bucket.upload_local_file(
local_file=local_file,
file_name=file_name,
file_infos=metadata,
)
img_url=self.b2_api.get_download_url_for_fileid(uploaded_file.id_)
os.remove(file_name) #Delete placeholder file from local
return img_url
from cog-sdxl.
https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion_xl/pipeline_stable_diffusion_xl_img2img.py
Going through the StableDiffusionXLImg2ImgPipeline that replicate uses there no width or height setting as these values seem to be based of the input image size but there is a target_size what could solve this issue
from cog-sdxl.
Related Issues (20)
- Training multiple concepts HOT 1
- [Feature Request] Include metadata inside the PNG header
- Fine-tuned versions fail setup runs
- Use `hf_transfer` for faster downloading of preprocessing models
- Expand training API / training data input to allow custom image descriptions HOT 3
- [Feature Request] Support Image Style
- [Bug] Captioning preprocessing step
- Add support for longer prompts than 77 tokens using compel HOT 1
- Improve "caption.csv" feature documentation
- Modifying the code of a blog post
- captions.csv files dont work HOT 1
- Inpainting creates artifacts/lowers resolution for preserved areas
- canceling while hotswap loading occurs can leave model in invalid state
- img2img significantly different outputs with same settings (model instance problem?)
- Load Replicate lora models into Automatic1111
- Fixed VAE is very low quality HOT 1
- Allow passing in lora from huggingface/civit.ai
- If a token_string contains commas then the trailing crashes
- "refine_steps" argument name and docs are misleading
- Exception in ASGI application HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cog-sdxl.