Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Colab seems not working #31

Open
Cloudaig opened this issue Oct 24, 2023 · 2 comments
Open

Colab seems not working #31

Cloudaig opened this issue Oct 24, 2023 · 2 comments

Comments

@Cloudaig
Copy link

Traceback (most recent call last):
File "/usr/local/lib/python3.10/dist-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
exec(code, module.dict)
File "/usr/local/lib/python3.10/dist-packages/diffuzers/Home.py", line 7, in
from diffuzers.x2image import X2Image
File "/usr/local/lib/python3.10/dist-packages/diffuzers/x2image.py", line 14, in
from diffusers import (
File "", line 1075, in _handle_fromlist
File "/usr/local/lib/python3.10/dist-packages/diffusers/utils/import_utils.py", line 675, in getattr
value = getattr(module, name)
File "/usr/local/lib/python3.10/dist-packages/diffusers/utils/import_utils.py", line 675, in getattr
value = getattr(module, name)
File "/usr/local/lib/python3.10/dist-packages/diffusers/utils/import_utils.py", line 674, in getattr
module = self._get_module(self._class_to_module[name])
File "/usr/local/lib/python3.10/dist-packages/diffusers/utils/import_utils.py", line 686, in _get_module
raise RuntimeError(
RuntimeError: Failed to import diffusers.pipelines.alt_diffusion.pipeline_alt_diffusion_img2img because of the following error (look up to see its traceback):
cannot import name 'CpuOffload' from 'accelerate.hooks' (/usr/local/lib/python3.10/dist-packages/accelerate/hooks.py)

  • ``
@wstria
Copy link

wstria commented Nov 3, 2023

I ran into the same error, have you been able to find a away around it yet?

@asmossunov
Copy link

asmossunov commented Nov 14, 2023

I also had such a problem. The accelerate update helped me:

pip install --upgrade accelerate

@furkanshaikh313
Copy link

Can someone help me by telling me how to run API i got 200 response but i dont know how to get images
import requests

API endpoint

api_url = "https://new-rings-yawn.loca.lt"

Prompt variable

prompt_text = "blue elephant"

Parameters to be sent with the request

params = {
'prompt': prompt_text

}

Make a GET request with parameters

response = requests.get(api_url, params=params)

Check if the request was successful (status code 200)

if response.status_code == 200:
# Print the response content (assuming it returns some data)
print("Response Content:")
print(response.text)
else:
# Print an error message if the request was not successful
print(f"Error: {response.status_code} - {response.text}")

C:\Users\HP\Desktop>python -u "c:\Users\HP\Desktop\api.py"
Response Content:
{"Hello":"World"}

image_2024-01-19_185522685

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants