Join the conversation

Join the community of Machine Learners and AI enthusiasts.

Sign Up
prithivMLmods 
posted an update 23 days ago
Post
3424
Hey Guys !! 🧋

This is the time to Share the Collection of Prompts which have high parametric details to produce the most detailed flawless images.

🔗You can watch out the Collection on: prithivMLmods/Top-Prompt-Collection

🔢More than 200+ High Detailed prompts have been used in the Spaces.
@prithivMLmods

Thank you for the read. !!

Hello sir

Can we use Midjourney on Google Collab

·

Hi Yasirkh,

Yes!, you can run any Python-based SDK in Google Colab with the appropriate model and its api_url by using the correct request library. For example, if you are trying to run a text-to-image model, you can do it with the inference API.

⚠️For example:

import requests
API_URL = "----------your api addr goes here---------"
headers = {"Authorization": "Bearer hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}
def query(payload):
response = requests.post(API_URL, headers=headers, json=payload)
return response.content
image_bytes = query({
"inputs": "Astronaut riding a horse",
})
--You can access the image with PIL.Image for example
import io
from PIL import Image
image = Image.open(io.BytesIO(image_bytes))

⚠️You can find your access token on hf settings >> access token, replace it on this "headers = {"Authorization": "Bearer hf_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}" instead of x

⚠️Example: headers = {"Authorization": "Bearer hf_ABC1234567890xyz9876543210"}, install the required PyPI Libs.

🚀Then add the Gradio blocks what you need to perform in the interface func().

🚀 For your information, this is not the original MidJourney model; I have named the space "MidJourney" to perform the same work similarly. Make try & let me know you got it or else. And one more you cannot commit / push the code when the access tokens are visible use secret key or variables ( when in repos).

⚠️If you feel any difficulties, you can reply me again ; i will sure help you with the logic or i will share the colab work link for make the case easier.

------ Try in Google Colab / Jupyter Nb / Data Spell / even in VsCode were you find the easier way ------

-Thank You !

Hi @prithivMLmods

A huge thank you for creating Collection Zero and giving us access to explore Generation 2 AI as designers! I've been really impressed with DALLE 4K, STABLE HAMSTER, and Midjourney - the results are truly mind-blowing.

Could you please let me know if it's possible to use these (DALLE 4K, STABLE HAMSTER, and Midjourney) locally, just like Automatioc 1111, Foooocus, or ComfiyUI? If so, could you share the necessary details?

Once again, thank you for creating this space for us to explore and learn!

·

Hi @mk230580 !!

You are asked for the image that has high res quality with the fast computation, for your instance i came up with the idea in acceleration of GPU T4, Yes we know NVIDIA A100 TC GPU is unmatched in its power and highest- performing elastic computations (HPC) tasks. Apart from that you can use T4 as hardware accelerators. You asked me how to run externally from hugging face right. Use T4 in Google Colab or any other work spaces that compatible of it. A100 is also available in Colab but you be a premium user.

Running in the local system same as follows

Just have the HF Token to passed for login...

--Authenticate with Hugging Face
from huggingface_hub import login

--Log in to Hugging Face using the provided token
hf_token = '---pass your huging face access token---'
login(hf_token)

Visit my colab space for an instances to run local out of HF
Hardware accelerator : T4 GPU
See we know, we can get A100, L4 there in colab for premium / for cost. T4 is free for certain amount of computation i went with it . In local hardware you know what to do...

Second thing: the amount details you have in prompt also will have the desired results. see the higher-end details prompts via https://huggingface.co/spaces/prithivMLmods/Top-Prompt-Collection or in freeflo.ai, prompthero for better details results.

Colab link ( example of the stabilityai/sdxl-turbo) :
https://colab.research.google.com/drive/1zYj5w0howOT3kiuASjn8PnBUXGh_MvhJ#scrollTo=Ok9PcD_kVwUI
You can use the various model like RealVisXL_V4.0, Turbo, & more for better results
** After passing the Access Token, Remove your token to share for others**