Erfahren Sie, wie Sie Imagen im Feature "Text-zu-Bild-Generierung" von Vertex AI verwenden und ein digitales Wasserzeichen (SynthID) für ein generiertes Bild prüfen. In dieser Kurzanleitung erfahren Sie, wie Sie die Bildgenerierung von Imagen in derGoogle Cloud -Konsole verwenden.
Die Preise für Vertex AI basieren auf der von Ihnen verwendeten Funktion. Weitere Informationen finden Sie unter Preise.

Hinweise
- Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator
(
roles/resourcemanager.projectCreator
), which contains theresourcemanager.projects.create
permission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
-
Enable the Vertex AI API.
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin
), which contains theserviceusage.services.enable
permission. Learn how to grant roles. -
Make sure that you have the following role or roles on the project: Vertex AI User
Check for the roles
-
In the Google Cloud console, go to the IAM page.
Go to IAM - Select the project.
-
In the Principal column, find all rows that identify you or a group that you're included in. To learn which groups you're included in, contact your administrator.
- For all rows that specify or include you, check the Role column to see whether the list of roles includes the required roles.
Grant the roles
-
In the Google Cloud console, go to the IAM page.
IAM aufrufen - Wählen Sie das Projekt aus.
- Klicken Sie auf Zugriffsrechte erteilen.
-
Geben Sie im Feld Neue Hauptkonten Ihre Nutzer-ID ein. Das ist in der Regel die E‑Mail-Adresse eines Google-Kontos.
- Wählen Sie in der Liste Rolle auswählen eine Rolle aus.
- Klicken Sie auf Weitere Rolle hinzufügen, wenn Sie weitere Rollen zuweisen möchten.
- Klicken Sie auf Speichern.
-
-
In the Google Cloud console, on the project selector page, select or create a Google Cloud project.
Roles required to select or create a project
- Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
-
Create a project: To create a project, you need the Project Creator
(
roles/resourcemanager.projectCreator
), which contains theresourcemanager.projects.create
permission. Learn how to grant roles.
-
Verify that billing is enabled for your Google Cloud project.
-
Enable the Vertex AI API.
Roles required to enable APIs
To enable APIs, you need the Service Usage Admin IAM role (
roles/serviceusage.serviceUsageAdmin
), which contains theserviceusage.services.enable
permission. Learn how to grant roles. -
Make sure that you have the following role or roles on the project: Vertex AI User
Check for the roles
-
In the Google Cloud console, go to the IAM page.
Go to IAM - Select the project.
-
In the Principal column, find all rows that identify you or a group that you're included in. To learn which groups you're included in, contact your administrator.
- For all rows that specify or include you, check the Role column to see whether the list of roles includes the required roles.
Grant the roles
-
In the Google Cloud console, go to the IAM page.
IAM aufrufen - Wählen Sie das Projekt aus.
- Klicken Sie auf Zugriffsrechte erteilen.
-
Geben Sie im Feld Neue Hauptkonten Ihre Nutzer-ID ein. Das ist in der Regel die E‑Mail-Adresse eines Google-Kontos.
- Wählen Sie in der Liste Rolle auswählen eine Rolle aus.
- Klicken Sie auf Weitere Rolle hinzufügen, wenn Sie weitere Rollen zuweisen möchten.
- Klicken Sie auf Speichern.
-
Rufen Sie in der Google Cloud Console die Seite Vertex AI > Media Studio auf.
Geben Sie in das Feld Prompt (Prompt hier schreiben) den folgenden Prompt ein:
portrait of a french bulldog at the beach, 85mm f/2.8
Wenn nicht bereits ausgewählt, wählen Sie im Feld Modelloptionen im Bereich Parameter (
Imagen 3
) aus.Wenn nicht ausgewählt, wählen Sie im Bereich Seitenverhältnis des Bereichs Parameter die Option
1:1
aus.Ändern Sie im Abschnitt Anzahl der Ergebnisse die Anzahl der Ergebnisse in
2
.Klicken Sie auf
Erstellen.Durch die Erstellung von Bildern werden Bilder erzeugt, die folgenden Bildern ähneln:
Klicken Sie auf eines der Bilder, um eine lokale Kopie des Bildes zu speichern.
Klicken Sie im angezeigten Fenster Bilddetails auf Exportieren.
Klicken Sie im Dialogfeld Image exportieren auf Exportieren.
Erstellen Sie generierte Bilder und speichern Sie eine lokale Kopie wie im vorherigen Schritt.
Klicken Sie im Fenster Bilddetail auf Exportieren.
Klicken Sie im unteren Bereich auf
Bestätigen.Klicken Sie auf Bild hochladen.
Wählen Sie ein lokal gespeichertes Bild aus.
- In the Google Cloud console, go to the Manage resources page.
- In the project list, select the project that you want to delete, and then click Delete.
- In the dialog, type the project ID, and then click Shut down to delete the project.
- Weitere Informationen zu allen Bildgenerierungs-KI-Features finden Sie in der Übersicht zu Imagen in Vertex AI.
- Lesen Sie die Nutzungsrichtlinien für Imagen in Vertex AI
- Weitere vortrainierte Modelle in Model Garden untersuchen.
- Weitere Informationen zu Best Practices für verantwortungsvolle KI und den Sicherheitsfiltern von Vertex AI.
Bilder generieren und lokale Kopie speichern
Senden Sie über die Google Cloud Console die Anfrage zur Text-zu-Bild-Generierung.
Digitales Wasserzeichen eines Bildes prüfen
Nachdem Sie Bilder mit Wasserzeichen generiert haben, können Sie das digitale Wasserzeichen der neuen Bilder prüfen.
Glückwunsch! Sie haben gerade das Feature "Imagen Text-zu-Bild-Generierung" verwendet, um neue Bilder zu erstellen und das digitale Wasserzeichen eines der Bilder zu prüfen.
Bereinigen
Mit den folgenden Schritten vermeiden Sie, dass Ihrem Google Cloud -Konto die auf dieser Seite verwendeten Ressourcen in Rechnung gestellt werden: